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 ualberta-rcg/drac-agent-skills --skill pytorch-lightninggit clone --depth 1 https://github.com/ualberta-rcg/drac-agent-skillsWrote 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/ualberta-rcg/drac-agent-skills/pytorch-lightning)<a href="https://agentmods.dev/skills/ualberta-rcg/drac-agent-skills/pytorch-lightning"><img src="https://agentmods.dev/badge/skills/ualberta-rcg/drac-agent-skills/pytorch-lightning/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/ualberta-rcg/drac-agent-skills/pytorch-lightning"><img src="https://agentmods.dev/badge/skills/ualberta-rcg/drac-agent-skills/pytorch-lightning.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00072 | $0.01627 |
| Opus 5.5 | $0.00029 | $0.00651 |
| Sonnet 5.5 | $0.00014 | $0.00325 |
| Haiku 4.5 | $0.00007 | $0.00163 |
Grade A, and why
pytorch-lightning 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 6d 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 — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PyTorch Lightning
Organize PyTorch training, evaluation, and multi-GPU/multi-node scaling without boilerplate while preserving full PyTorch control. Use import lightning as L from the lightning package (do not mix lightning and pytorch_lightning class namespaces in the same project).
Installation
# Alliance / CVMFS wheelhouse (inside a Slurm job or salloc venv on $SCRATCH)
pip install --no-index lightning torchmetrics
# Standard Python venv
pip install "lightning==2.6.6" torchmetrics
Core Architecture
1. LightningModule — Model & Optimization Contract
import lightning as L
import torch
import torch.nn as nn
import torch.nn.functional as F
from torchmetrics.classification import BinaryAUROC
class ClassifierModule(L.LightningModule):
def __init__(self, in_features: int, hidden_dim: int = 128, lr: float = 1e-3):
super().__init__()
self.save_hyperparameters()
self.net = nn.Sequential(
nn.Linear(in_features, hidden_dim),
nn.GELU(),
nn.Linear(hidden_dim, 1),
)
self.val_auroc = BinaryAUROC()
def forward(self, x: torch.Tensor) -> torch.Tensor:
return self.net(x).squeeze(-1)
def training_step(self, batch, batch_idx):
x, y = batch
logits = self(x)
loss = F.binary_cross_entropy_with_logits(logits, y.float())
self.log("train/loss", loss, prog_bar=True, on_step=True, on_epoch=True)
return loss
def validation_step(self, batch, batch_idx):
x, y = batch
logits = self(x)
loss = F.binary_cross_entropy_with_logits(logits, y.float())
self.val_auroc.update(torch.sigmoid(logits), y.int())
# sync_dist=True reduces scalar losses across DDP ranks; TorchMetrics syncs its own state.
self.log("val/loss", loss, prog_bar=True, sync_dist=True)
self.log("val/auroc", self.val_auroc, prog_bar=True, on_epoch=True)
def configure_optimizers(self):
optimizer = torch.optim.AdamW(self.parameters(), lr=self.hparams.lr, weight_decay=1e-2)
scheduler = torch.optim.lr_scheduler.CosineAnnealingLR(optimizer, T_max=self.trainer.estimated_stepping_batches)
return {"optimizer": optimizer, "lr_scheduler": {"scheduler": scheduler, "interval": "step"}}
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.
- 6d ago First seen · 132 lines · 72 tokens per session scan A 9ccb80152e51
pytorch-lightning is a skill published in the GitHub repository ualberta-rcg/drac-agent-skills (2 stars, last pushed 7d ago), licensed MIT. It adds 72 tokens to every session and 1,627 once invoked, about $0.0003 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-11-25.
pytorch-lightning compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| pytorch-lightningualberta-rcg/drac-agent-skills | Skill | 2 | 7d ago | MIT | A | 72 | Claude Code |
| pytorch-patternsaffaan-m/ECC | Skill | 314k | yesterday | MIT | A | 32 | Claude Code, Kiro |
| optimize-for-gpuK-Dense-AI/scientific-agent-skills | Skill | 59k | yesterday | MIT | A | 151 | Claude Code, Codex |
| accelerateNousResearch/hermes-agent | Skill | 267k | today | MIT | A | 13 | Claude Code, Codex |
| developing-genkit-pythongoogle/skills | Skill | 25k | today | Apache-2.0 | A | 96 | Claude Code, Codex |
| marimo-pairmarimo-team/marimo | Skill | 24k | today | Apache-2.0 | A | 57 | Claude Code, Codex |
| cudnn-installNVIDIA/skills | Skill | 4.2k | today | Apache-2.0 | A | 49 | Claude Code, Codex |