pytorch

pytorch is a skill for Claude Code from Mindrally/skills. It costs 18 tokens per session (419 once invoked), scanned A, original, Apache-2.0.

A set of guidelines for developing PyTorch deep-learning systems, including neural networks, transformers, diffusion models, and GPU training.

In plain words
What is it for?
Use it when defining PyTorch models, training or fine-tuning transformer and diffusion systems, and optimizing GPU workloads.
Why use it?
It helps structure model code and handle training, gradients, memory, and hardware acceleration correctly.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the mindrally-skills plugin — 217 skills shipped together

Good fit Use it when defining PyTorch models, training or fine-tuning transformer and diffusion systems, and optimizing GPU workloads.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mindrally/skills/pytorch
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.

Any agent
npx skills add Mindrally/skills --skill pytorch
Clone the repo
git clone --depth 1 https://github.com/Mindrally/skills

Made for: Claude Code.

Or install mindrally-skills, the plugin that ships this one along with the rest of its 217 skills.

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 pytorch

README.md
[![agentmods](https://agentmods.dev/badge/skills/mindrally/skills/pytorch/github.svg)](https://agentmods.dev/skills/mindrally/skills/pytorch)
Your own site
<a href="https://agentmods.dev/skills/mindrally/skills/pytorch"><img src="https://agentmods.dev/badge/skills/mindrally/skills/pytorch/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.

agentmods 80×15 button for pytorch

Your own site · 80×15
<a href="https://agentmods.dev/skills/mindrally/skills/pytorch"><img src="https://agentmods.dev/badge/skills/mindrally/skills/pytorch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 419 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 9 Oct 2026
  • Snyk pass 10 Oct 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00018 $0.00419
Opus 5.5 $0.00007 $0.00168
Sonnet 5.5 $0.00004 $0.00084
Haiku 4.5 $0.00002 $0.00042

Measured 1mo ago against content hash 9598bfc586f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pytorch 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 1mo 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.

pytorch/SKILL.md · 74 lines

What it actually says

PyTorch Development

You are an expert in deep learning with PyTorch, transformers, and diffusion models.

Core Principles

  • Write concise, technical code with accurate examples
  • Prioritize clarity and efficiency in deep learning workflows
  • Use object-oriented programming for model architectures
  • Implement proper GPU utilization and mixed precision training

Model Development

Custom Modules

  • Implement custom nn.Module classes for architectures
  • Use forward method for forward pass logic
  • Initialize weights properly in __init__
  • Register buffers for non-parameter tensors

Autograd

  • Leverage automatic differentiation
  • Use torch.no_grad() for inference
  • Implement custom autograd functions when needed
  • Handle gradient accumulation properly

Transformers Integration

  • Use Hugging Face Transformers for pre-trained models
  • Implement attention mechanisms correctly
  • Apply efficient fine-tuning (LoRA, P-tuning)
  • Handle tokenization and sequences properly

Diffusion Models

  • Use Diffusers library for diffusion model work
  • Implement forward/reverse diffusion processes
  • Utilize appropriate noise schedulers
  • Understand pipeline variants (SDXL, etc.)

Training Best Practices

Data Loading

  • Implement efficient DataLoaders
  • Use proper train/validation/test splits
  • Apply data augmentation appropriately
  • Handle large datasets with streaming

Optimization

  • Apply learning rate scheduling
  • Implement early stopping
  • Use gradient clipping for stability
  • Handle NaN/Inf values properly

Performance Optimization

  • Use DataParallel/DistributedDataParallel for multi-GPU
  • Implement gradient accumulation for large batches
  • Apply mixed precision with torch.cuda.amp
  • Profile code to identify bottlenecks

Gradio Integration

  • Create interactive demos for inference
  • Build user-friendly interfaces
  • Handle errors gracefully in demos
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. 1mo ago Changed · +3 lines 9598bfc586f7
  2. 2mo ago First seen · 71 lines · 18 tokens per session scan A 8b0b86eabee3

Subscribe to this mod's changes

pytorch is a skill published in the GitHub repository Mindrally/skills (322 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 18 tokens to every session and 419 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.

Related

pytorch compared with skills from other repositories

pytorch next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pytorchMindrally/skillsSkill3221mo agoApache-2.0A18Claude Code
ai-ml-developmenttravisjneuman/.claudeSkill115yesterdayMITA43Claude Code
pytorch-patternsaffaan-m/ECCSkill313k7d agoMITA32Claude Code, Kiro
accelerateNousResearch/hermes-agentSkill267ktodayMITA13Claude Code, Codex
optimize-for-gpuK-Dense-AI/scientific-agent-skillsSkill59k7d agoMITA151Claude Code, Codex
daskK-Dense-AI/scientific-agent-skillsSkill59k7d agoMITA67Claude Code
claude-apihashgraph-online/awesome-codex-pluginsSkill1.6kyesterdayApache-2.0A53Claude Code, Codex