Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add wentorai/research-plugins --skill pytorch-lightning-guidegit clone --depth 1 https://github.com/wentorai/research-pluginsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/wentorai/research-plugins/pytorch-lightning-guide)<a href="https://agentmods.dev/skills/wentorai/research-plugins/pytorch-lightning-guide"><img src="https://agentmods.dev/badge/skills/wentorai/research-plugins/pytorch-lightning-guide/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/wentorai/research-plugins/pytorch-lightning-guide"><img src="https://agentmods.dev/badge/skills/wentorai/research-plugins/pytorch-lightning-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00016 | $0.01782 |
| Opus 5.5 | $0.00006 | $0.00713 |
| Sonnet 5.5 | $0.00003 | $0.00356 |
| Haiku 4.5 | $0.00002 | $0.00178 |
Grade A, and why
pytorch-lightning-guide scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 245 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PyTorch Lightning Guide
Overview
PyTorch Lightning is a deep learning framework with over 31,000 GitHub stars that provides a high-level interface for PyTorch, enabling researchers to focus on model design rather than engineering boilerplate. Developed by Lightning AI, it decouples the science (model architecture, loss functions, data processing) from the engineering (distributed training, mixed precision, gradient accumulation, checkpointing) through a structured LightningModule abstraction.
For academic researchers, Lightning eliminates the need to write repetitive training loops, device management code, and distributed training logic. You define your model, training step, and data loaders, and Lightning handles everything else -- from single GPU to multi-node distributed training, from FP32 to mixed precision, from local development to cloud deployment. This means faster iteration on research ideas with production-quality training infrastructure.
Lightning is used extensively in AI research labs and has become a standard tool for reproducible deep learning experiments. It integrates seamlessly with experiment tracking tools like Weights & Biases, MLflow, and TensorBoard, and supports all PyTorch-compatible model architectures.
Installation and Setup
# Install PyTorch Lightning
pip install lightning
# Or install with specific extras
pip install lightning[extra]
# For development/research with all features
pip install lightning[all]
Lightning requires Python 3.9+ and PyTorch 2.1+. For GPU training, ensure your PyTorch installation includes CUDA support:
# Check GPU availability
python -c "import torch; print(torch.cuda.is_available())"
Verify your installation:
import lightning as L
print(L.__version__)
Core Architecture
The LightningModule
The LightningModule is the central abstraction. It organizes your PyTorch code into clearly defined methods:
import lightning as L
import torch
import torch.nn.functional as F
from torch import nn
class ResearchModel(L.LightningModule):
def __init__(self, input_dim, hidden_dim, output_dim, lr=1e-3):
super().__init__()
self.save_hyperparameters()
self.encoder = nn.Sequential(
nn.Linear(input_dim, hidden_dim),
nn.ReLU(),
nn.Dropout(0.2),
nn.Linear(hidden_dim, hidden_dim),
nn.ReLU(),
)
self.classifier = nn.Linear(hidden_dim, output_dim)
self.lr = lr
def forward(self, x):
features = self.encoder(x)
return self.classifier(features)
def training_step(self, batch, batch_idx):
x, y = batch
logits = self(x)
loss = F.cross_entropy(logits, y)
acc = (logits.argmax(dim=-1) == y).float().mean()
self.log("train_loss", loss, prog_bar=True)
self.log("train_acc", acc, prog_bar=True)
return loss
def validation_step(self, batch, batch_idx):
x, y = batch
logits = self(x)
loss = F.cross_entropy(logits, y)
acc = (logits.argmax(dim=-1) == y).float().mean()
self.log("val_loss", loss, prog_bar=True)
self.log("val_acc", acc, prog_bar=True)
def configure_optimizers(self):
optimizer = torch.optim.AdamW(self.parameters(), lr=self.lr)
scheduler = torch.optim.lr_scheduler.CosineAnnealingLR(
optimizer, T_max=self.trainer.max_epochs
)
return [optimizer], [scheduler]
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 245 lines · 16 tokens per session scan A c90714c310e2
pytorch-lightning-guide is a skill published in the GitHub repository wentorai/research-plugins (323 stars, last pushed 5mo ago), licensed MIT. It adds 16 tokens to every session and 1,782 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
pytorch-lightning-guide compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| pytorch-lightning-guidewentorai/research-plugins | Skill | 323 | 5mo ago | MIT | A | 16 | Claude Code, Codex |
| pytorch-patternsaffaan-m/ECC | Skill | 313k | 7d ago | MIT | A | 32 | Claude Code, Kiro |
| accelerateNousResearch/hermes-agent | Skill | 267k | today | MIT | A | 13 | Claude Code, Codex |
| optimize-for-gpuK-Dense-AI/scientific-agent-skills | Skill | 59k | 7d ago | MIT | A | 151 | Claude Code, Codex |
| developing-genkit-pythongoogle/skills | Skill | 25k | today | Apache-2.0 | A | 96 | Claude Code, Codex |
| marimo-pairmarimo-team/marimo | Skill | 24k | yesterday | Apache-2.0 | A | 57 | Claude Code, Codex |
| cudnn-installNVIDIA/skills | Skill | 4.2k | 2d ago | Apache-2.0 | A | 49 | Claude Code, Codex |