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 G1Joshi/Agent-Skills --skill pytorchgit clone --depth 1 https://github.com/G1Joshi/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/g1joshi/agent-skills/pytorch)<a href="https://agentmods.dev/skills/g1joshi/agent-skills/pytorch"><img src="https://agentmods.dev/badge/skills/g1joshi/agent-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.
<a href="https://agentmods.dev/skills/g1joshi/agent-skills/pytorch"><img src="https://agentmods.dev/badge/skills/g1joshi/agent-skills/pytorch.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.00039 | $0.01445 |
| Opus 5.5 | $0.00016 | $0.00578 |
| Sonnet 5.5 | $0.00008 | $0.00289 |
| Haiku 4.5 | $0.00004 | $0.00145 |
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 23d 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 — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PyTorch
PyTorch is the foundational deep learning framework for research and production, featuring dynamic computational graphs, torch.compile graph optimization, and distributed GPU training.
When to Use
- State-of-the-Art Deep Learning Research & Production: Training vision, NLP, audio, and generative AI models.
- Model Compilation with torch.compile(): Accelerating model inference and training via TorchDynamo and Triton kernels.
- Distributed Training (DDP / FSDP): Scaling models across multi-GPU and multi-node clusters.
- Hardware Acceleration: Training and executing on NVIDIA CUDA, Apple Silicon MPS, and AMD ROCm.
Quick Start
import torch
import torch.nn as nn
# Define simple neural network
class MLP(nn.Module):
def __init__(self):
super().__init__()
self.net = nn.Sequential(
nn.Linear(20, 64),
nn.ReLU(),
nn.Linear(64, 2)
)
def forward(self, x):
return self.net(x)
device = "cuda" if torch.cuda.is_available() else "cpu"
model = MLP().to(device)
criterion = nn.CrossEntropyLoss()
optimizer = torch.optim.AdamW(model.parameters(), lr=1e-3)
Core Concepts
Modern Neural Network Module with torch.compile
Defining architectures and compiling with TorchDynamo:
import torch
import torch.nn as nn
import torch.nn.functional as F
class TransformerClassifier(nn.Module):
def __init__(self, vocab_size: int, embed_dim: int, num_classes: int):
super().__init__()
self.embedding = nn.Embedding(vocab_size, embed_dim)
self.encoder_layer = nn.TransformerEncoderLayer(
d_model=embed_dim, nhead=4, dim_feedforward=256, batch_first=True
)
self.transformer = nn.TransformerEncoder(self.encoder_layer, num_layers=2)
self.fc = nn.Linear(embed_dim, num_classes)
def forward(self, x: torch.Tensor) -> torch.Tensor:
embedded = self.embedding(x)
encoded = self.transformer(embedded)
pooled = encoded.mean(dim=1) # Global average pooling
return self.fc(pooled)
device = torch.device("cuda" if torch.cuda.is_available() else ("mps" if torch.backends.mps.is_available() else "cpu"))
model = TransformerClassifier(vocab_size=10000, embed_dim=128, num_classes=5).to(device)
# PyTorch 2.x JIT compilation for Triton / GPU optimization
if torch.cuda.is_available():
compiled_model = torch.compile(model)
else:
compiled_model = model
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.
- 23d ago Changed · +5 lines 69c9265fb26d
- 27d ago Changed · +123 lines · +22 tokens per session 6257bc7589a3
- 1mo ago First seen · 46 lines · 17 tokens per session scan A 995cc5717c41
pytorch is a skill published in the GitHub repository G1Joshi/Agent-Skills (15 stars, last pushed 24d ago), licensed MIT. It adds 39 tokens to every session and 1,445 once invoked, about $0.0002 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-08-30.
Other skills, from other repositories
synthetic-data-finetuning-expert
Expert guide for synthetic dataset generation, LLM-as-a-judge filtering, QLoRA fine-tuning (Unsloth), DPO alignment, and GGUF/Ollama export for local SLMs / Panduan ahli generasi data sintetis, fine-tuning QLoRA, DPO, dan ekspor GGUF/Ollama.
accelerate
Run PyTorch training across GPUs with minimal changes.
developing-genkit-python
Develop AI-powered applications using Genkit in Python. Use when the user asks about Genkit, AI agents, flows, or tools in Python, or when encountering Genkit errors, import issues, or API problems.
python-programming-expert
Expert-level skill for Python programming (Python 3.13/3.14+). Covers type safety, generic syntax (PEP 695), async/await TaskGroups, FastAPI 0.115+, Pydantic v2, uv package manager, Ruff, and pytest in English and Indonesian.
hallucination-prevention
Detects and mitigates LLM hallucinations in production pipelines. Validates AI-generated facts, code, and decisions before they reach end users or downstream systems.
rag-and-memory
Patterns for Retrieval-Augmented Generation (RAG) and agent memory systems. Retrieves only relevant context, prevents context bloat, and maintains coherent state across sessions.