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 15 Sept 2026
  • Snyk pass 15 Sept 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 7d 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 7d 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. 7d ago Changed · +3 lines 9598bfc586f7
  2. 1mo 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 (276 stars, last pushed 7d 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

Other skills, from other repositories

ai-ml-development

AI and machine learning development with PyTorch, TensorFlow, and LLM integration. Use when building ML models, training pipelines, fine-tuning LLMs, or implementing AI features.

travisjneuman/.claude · 43 tokens

accelerate

Run PyTorch training across GPUs with minimal changes.

NousResearch/hermes-agent · 13 tokens

pytorch-patterns

PyTorch deep learning patterns and best practices for building robust, efficient, and reproducible training pipelines, model architectures, and data loading.

affaan-m/ECC · 32 tokens

dask

Scales pandas, NumPy, and custom Python research workflows beyond memory or across clusters with Dask. Covers DataFrames, Arrays, Bags, Futures, chunking, schedulers, and distributed diagnostics. Use for partitioned file processing, scientific array computation, or parallel tasks whose memory and dependency structure…

K-Dense-AI/scientific-agent-skills · 67 tokens

optimize-for-gpu

GPU-accelerates scientific Python on NVIDIA hardware and verifies that the result is correct and faster. Use for CUDA/GPU optimization; CPU-bound NumPy, SciPy, pandas, scikit-learn, NetworkX, scikit-image, vector-search, image-processing, graph, simulation, or file-I/O workloads; CuPy, cuDF, cuML, cuGraph, cuVS…

K-Dense-AI/scientific-agent-skills · 151 tokens

claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

hashgraph-online/awesome-codex-plugins · 53 tokens