Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

pytorch-lightning — Claude Code skill: what it does, how to install

Guides agents through structuring PyTorch Lightning 2.6.6 code, from LightningModules to distributed trainers. Useful when scaling training across GPUs.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add K-Dense-AI/scientific-agent-skills --skill pytorch-lightning -a claude-code
Open on GitHub

What pytorch-lightning does

This skill helps agents organize deep learning pipelines according to Lightning 2.6.6 patterns. It provides guidance on splitting model logic into LightningModule steps, encapsulating data processing inside LightningDataModule, and configuring Trainer instances for distributed execution using DDP, FSDP, or DeepSpeed.

The environment requires Python 3.10 or higher with lightning and a compatible PyTorch build. CPU tests run locally without active network access, but multi-GPU strategies and online loggers like Wandb or MLflow require appropriate hardware and service credentials.

A critical technical rule here is namespace consistency: use either import lightning as L or legacy pytorch_lightning, because mixing them in one codebase breaks class compatibility.

What it helps with

  • Refactor raw PyTorch training loops into structured LightningModule classes
  • Configure multi-GPU scaling strategies such as DDP and FSDP
  • Organize data downloading and batch loading inside a LightningDataModule
  • Set up training callbacks for model checkpoints and early stopping

Example prompts for the agent

  • Convert this PyTorch model and its training loop into a clean LightningModule
  • Configure a Trainer for 4 GPUs using the DDP strategy and mixed precision
  • Build a reusable LightningDataModule for caching and splitting dataset batches

How to install pytorch-lightning

1Skills CLI (Vercel)

npx skills add K-Dense-AI/scientific-agent-skills --skill pytorch-lightning -a claude-code

2Manually: put the files in place

~/.claude/skills/pytorch-lightning/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/pytorch-lightning/

From the same set120

The whole set →
scientific-visualization K-Dense-AI Generates and audits publication-ready scientific figures in Matplotlib, Seaborn, and Plotly, focusing on truthful data encoding and accessibility. Claude Code CX Codex Cursor +1 2,400installs scientific-writing K-Dense-AI This skill drafts and audits scientific manuscripts and reports while tying claims to verified evidence. Use it for sections, references, declarations, and submission checks. Claude Code CX Codex Cursor +1 2,400installs statistical-analysis K-Dense-AI Runs hypothesis tests with assumption checking, effect sizes, and APA-formatted reports. Covers t-tests, ANOVA, correlation, regression, non-parametric and Bayesian methods. Claude Code CX Codex Cursor +1 2,300installs scientific-brainstorming K-Dense-AI Structures early-stage research ideation through independent idea generation, transparent scoring, and adversarial review. Useful for ranking hypotheses without premature consensus. Claude Code CX Codex Cursor +1 2,300installs literature-review K-Dense-AI This skill searches and synthesizes research literature, checks citations, and prepares Markdown or PDF reviews. Use it for reproducible searches and screening. Claude Code CX Codex Cursor +1 2,300installs scientific-critical-thinking K-Dense-AI Evaluates scientific claims, research methodology, and evidence quality. Applies GRADE and Cochrane Risk of Bias frameworks. Claude Code CX Codex Cursor +1 2,300installs scientific-schematics K-Dense-AI Creates PNG drafts of scientific diagrams and runs a separate quality review. Use it for neural network architectures, flowcharts, system diagrams, and biological pathways. Claude Code CX Codex Cursor +1 2,200installs scikit-learn K-Dense-AI A skill for Python machine learning tasks: classification, regression, clustering, preprocessing, and building ML pipelines with scikit-learn 1.9.1. Claude Code CX Codex Cursor +1 2,200installs

Similar

recsys-pipeline-architect Seth Hobson Designs six-stage recommendation, ranking, and feed pipelines. Use it when a system must choose the top K items for a user and context. Claude Code CX Codex Cursor 4,200installs gtm-ai-gtm official Smit Patel (https://linkedin.com/in/smitkpatel) This skill helps take AI products to market by choosing positioning, handling failure-ownership objections, and shaping pricing for variable usage. GitHub Copilot 1,600installs deep-agents-memory langchain-ai A skill that maps where a Deep Agent keeps its files: thread state, a persistent store, or the real disk. Useful once the agent starts dropping context. Claude Code CX Codex Cursor +1 19,000installs azure-architecture-autopilot official github Design Azure infrastructure from a prompt or inspect existing resources, then work through diagrams, Bicep generation and deployment. Use it for a new build or changes to an existing setup. GitHub Copilot 1,500installs agent-owasp-compliance official github Checks an AI agent codebase against the 10 OWASP ASI risks. Use it before production deployment, for security review, or when preparing an audit report. GitHub Copilot 1,500installs skill-creator official anthropics Creates and refines skills, then tests them with prompts, evaluations, and performance checks. Claude Code Claude.ai 414,180installs writing-for-agents Matt Pocock Guidance for writing skills and agent-facing documents. Use it when editing AGENTS.md, CLAUDE.md, or reference files reached from them. Claude Code 466,719installs media-use heygen-com Finds or generates media for HyperFrames videos, including voiceovers, music, cutouts, and color grades. Stores files locally in assets. Claude Code CX Codex Cursor +1 1,100,000installs

Questions about pytorch-lightning

How do I install the pytorch-lightning skill in Claude Code?

Run npx skills add K-Dense-AI/scientific-agent-skills --skill pytorch-lightning -a claude-code in your terminal.

What does the pytorch-lightning skill do?

It provides the agent with structured references and best practices for creating LightningModules, data modules, and multi-device training workflows.

Can I mix lightning and pytorch-lightning imports?

No. You should use import lightning as L with the lightning package and avoid mixing class namespaces with legacy pytorch-lightning imports.

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor