deep-learning

deep-learning is a skill for Claude Code, Codex from ericrisco/rsc-harness. It costs 102 tokens per session (3,566 once invoked), scanned A, original, MIT.

A PyTorch-based process for training and understanding neural networks, including their calculation loop, optimisation, precision, multi-GPU work, and saved checkpoints.

In plain words
What is it for?
It helps train or debug neural networks from scratch, including vision models and custom architectures, with mixed precision, distributed training, checkpoints, and random seeds.
Why use it?
It helps catch silent training mistakes and produce results that can be repeated instead of relying on luck.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/ericrisco/rsc-harness/deep-learning
Any agent
npx skills add ericrisco/rsc-harness --skill deep-learning
Clone the repo
git clone --depth 1 https://github.com/ericrisco/rsc-harness

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for deep-learning

README.md
[![agentmods](https://agentmods.dev/badge/skills/ericrisco/rsc-harness/deep-learning.svg)](https://agentmods.dev/skills/ericrisco/rsc-harness/deep-learning)
Your own site
<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/deep-learning"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/deep-learning.svg" alt="Measured on agentmods" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,566 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00102 $0.03566
Opus 5 $0.00051 $0.01783
Sonnet 5 $0.00020 $0.00713
Haiku 4.5 $0.00010 $0.00357

Measured 2d ago against content hash 6af7f8804793, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

deep-learning 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 2d 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.

skills/deep-learning/SKILL.md · 227 lines

How it starts

The opening of the file, as written. The whole thing — 227 lines — stays where its author put it; the contents beside it link to each section on GitHub.

deep-learning — train a neural net in PyTorch without the silent bugs

You own training and understanding neural networks in PyTorch: the loop, autograd, mixed precision, optimizers/schedulers, multi-GPU, and the reproducibility/checkpoint hygiene that separates a real result from a lucky one. Nets from scratch, vision, custom architectures — all here. This is PyTorch-first by design: JAX and TensorFlow are real and fine, but the patterns, APIs, and gotchas below are Torch's.

Version reality (verify at author time). Current stable is PyTorch 2.x — ~2.13 as of mid-2026 (pytorch.org/get-started, releases move fast; don't hard-pin a minor). Everything below is stable 2.x API. The one namespace shift to know: AMP now lives under torch.amp (torch.amp.GradScaler("cuda")), not the old torch.cuda.amp.*.

Am I in the right skill?

You are doing… Skill
Training/debugging a net in PyTorch (from scratch, vision, custom loop, AMP, multi-GPU) deep-learning (here)
Adapting a pretrained LLM — LoRA/QLoRA, SFT, trl/peft finetuning
Classic/tabular — sklearn, XGBoost/LightGBM, feature engineering machine-learning
Tokenization, NLP task modeling, task metrics (F1/BLEU/ROUGE) nlp
Envs, packaging, tests and hygiene around the model code python

1. PyTorch essentials

Three objects carry everything.

  • Tensor — an n-d array on a device (cpu/cuda/mps) with a dtype. requires_grad=True makes autograd track ops on it. .to(device) / .detach() / .item() are the moves you use constantly; .item() pulls a Python scalar and drops the graph (see the loop bugs below).
  • autograd — a tape. Every op on a requires_grad tensor records a node; loss.backward() walks it and accumulates into each leaf's .grad. "Accumulates" is the word that bites people (§2). Wrap read-only regions in torch.no_grad() to skip taping.
  • nn.Module — the model container. __init__ registers submodules/params; forward defines compute. model.parameters() feeds the optimizer; model.train() / model.eval() flip train-vs-eval behavior for Dropout and BatchNorm.

Read the full file on GitHub · 227 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 2d ago First seen · 227 lines · 102 tokens per session scan A 6af7f8804793

Subscribe to this mod's changes

deep-learning is a skill published in the GitHub repository ericrisco/rsc-harness (64 stars, last pushed 2d ago), licensed MIT. It adds 102 tokens to every session and 3,566 once invoked, about $0.0005 per session on Opus 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.

Related

Other skills, from other repositories

huggingface-accelerate

Simplest distributed training API. 4 lines to add distributed support to any PyTorch script. Unified API for DeepSpeed/FSDP/Megatron/DDP. Automatic device placement, mixed precision (FP16/BF16/FP8). Interactive config, single launch command. HuggingFace ecosystem standard.

davila7/claude-code-templates · 69 tokens

huggingface-accelerate

Simplest distributed training API. 4 lines to add distributed support to any PyTorch script. Unified API for DeepSpeed/FSDP/Megatron/DDP. Automatic device placement, mixed precision (FP16/BF16/FP8). Interactive config, single launch command. HuggingFace ecosystem standard.

OpenLAIR/dr-claw · 69 tokens

huggingface-accelerate

Simplest distributed training API. 4 lines to add distributed support to any PyTorch script. Unified API for DeepSpeed/FSDP/Megatron/DDP. Automatic device placement, mixed precision (FP16/BF16/FP8). Interactive config, single launch command. HuggingFace ecosystem standard.

synthetic-sciences/openscience · 69 tokens

huggingface-accelerate

Simplest distributed training API. 4 lines to add distributed support to any PyTorch script. Unified API for DeepSpeed/FSDP/Megatron/DDP. Automatic device placement, mixed precision (FP16/BF16/FP8). Interactive config, single launch command. HuggingFace ecosystem standard.

OpenRaiser/NanoResearch · 69 tokens

huggingface-accelerate

Simplest distributed training API. 4 lines to add distributed support to any PyTorch script. Unified API for DeepSpeed/FSDP/Megatron/DDP. Automatic device placement, mixed precision (FP16/BF16/FP8). Interactive config, single launch command. HuggingFace ecosystem standard.

Orchestra-Research/AI-Research-SKILLs · 69 tokens

huggingface-accelerate

Simplest distributed training API. 4 lines to add distributed support to any PyTorch script. Unified API for DeepSpeed/FSDP/Megatron/DDP. Automatic device placement, mixed precision (FP16/BF16/FP8). Interactive config, single launch command. HuggingFace ecosystem standard.

liortesta/ClawdAgent · 69 tokens