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 Axect/pytorch_template --skill pytorch-migrategit clone --depth 1 https://github.com/Axect/pytorch_templateWrote 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/axect/pytorch_template/pytorch-migrate)<a href="https://agentmods.dev/skills/axect/pytorch_template/pytorch-migrate"><img src="https://agentmods.dev/badge/skills/axect/pytorch_template/pytorch-migrate/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/axect/pytorch_template/pytorch-migrate"><img src="https://agentmods.dev/badge/skills/axect/pytorch_template/pytorch-migrate.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.00088 | $0.04384 |
| Opus 5.5 | $0.00035 | $0.01754 |
| Sonnet 5.5 | $0.00018 | $0.00877 |
| Haiku 4.5 | $0.00009 | $0.00438 |
Grade C, and why
pytorch-migrate scanned grade C with 1 finding 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf "$TEMPLATE_DIR" How it starts
The opening of the file, as written. The whole thing — 239 lines — stays where its author put it; the contents beside it link to each section on GitHub.
pytorch-migrate
Detect the current version of a pytorch_template-based project and apply all necessary migrations to bring it up to date.
Usage
/pytorch-migrate [project_path]
If project_path is omitted, uses the current working directory.
Step 0: Clone the Template
Clone the latest template into a temporary directory. All code references during migration come from this clone — never from embedded snippets.
TEMPLATE_DIR=$(mktemp -d)
git clone --depth 1 https://github.com/Axect/pytorch_template.git "$TEMPLATE_DIR"
Use $TEMPLATE_DIR as the source of truth for all file contents throughout the migration. After migration is complete, clean up:
rm -rf "$TEMPLATE_DIR"
Step 1: Detect Current Version
Read the project's files and determine which version it's based on by checking for feature markers.
Run these checks in order — the first missing feature determines the starting migration point:
| Check | How to detect | Version if MISSING |
|---|---|---|
config.py has RunConfig dataclass |
class RunConfig exists |
Pre-template (not migratable) |
callbacks.py exists |
File exists | v0 (monolithic, pre-callback refactor) |
pruner.py has PFLPruner |
class PFLPruner in pruner.py |
v1 (pre-PFL pruner, before 2024-12) |
callbacks.py has OptimizerModeCallback |
Class exists | v1 (pre-M1, missing optimizer mode toggle) |
callbacks.py has LossPredictionCallback |
Class exists | v1 (pre-M1, missing loss prediction) |
callbacks.py has NaNDetectionCallback |
Class exists | v2 (pre-NaN detection, before 2024-09) |
callbacks.py has CheckpointCallback |
Class exists | v3 (pre-checkpoint, before 2025-04) |
config.py has data field in RunConfig |
data: str in RunConfig |
v4 (pre-data-decoupling) |
callbacks.py has GradientMonitorCallback |
Class exists | v5 (pre-diagnostics) |
cli.py has preflight command |
def preflight exists |
v5 (pre-preflight) |
cli.py has hpo_report command |
def hpo_report exists |
v5 (pre-hpo-report) |
callbacks.py has CSVLoggingCallback |
Class exists | v6 (pre-dual-logging) |
config.py has logging or wandb field in RunConfig |
logging: str or wandb: bool in RunConfig |
v6 (pre-dual-logging) |
provenance.py exists |
File exists | v6 (pre-provenance) |
cli.py has update_skills command |
def update_skills exists |
v7 (pre-TUI-tabs) |
tools/monitor/src/hpo/mod.rs exists |
File exists | v7 (pre-HPO-monitor) |
config.py has wandb: bool field in RunConfig |
wandb: bool in RunConfig |
v8 (pre-wandb-toggle) |
checkpoint.py has find_resume_checkpoint |
def find_resume_checkpoint exists |
v9 (pre-resume) |
util.py has start_epoch parameter on Trainer.train |
start_epoch literal in util.py |
v9 (pre-resume) |
pruner.py has discard_trial |
def discard_trial exists |
v11 (pre-correctness-fixes) |
checkpoint.py has atomic_torch_save |
def atomic_torch_save exists |
v11 (pre-correctness-fixes) |
config.py has SUPPORTED_MONITORS or monitor_mode |
either literal (M15 replaced SUPPORTED_MONITORS by def monitor_mode) |
v11 (pre-correctness-fixes) |
pruner.py has sync_with_study |
def sync_with_study exists |
v12 (pre-pruner-persistence) |
callbacks.py has step_offset |
step_offset literal in PrunerCallback |
v12 (pre-pruner-persistence) |
config.py has TrainingConfig |
class TrainingConfig exists |
v13 (pre-training-options) |
util.py has FastTensorLoader |
class FastTensorLoader exists |
v13 (pre-training-options) |
config.py has load_splits |
def load_splits exists |
v14 (pre-evaluation-methodology) |
util.py has finalize_study |
def finalize_study exists |
v14 (pre-evaluation-methodology) |
callbacks.py has BestWeightsCallback |
class BestWeightsCallback exists |
v14 (pre-evaluation-methodology) |
pruner.py has rank_reliability |
def rank_reliability exists |
v14 (pre-evaluation-methodology) |
metrics.py has greater_is_better |
greater_is_better literal |
v15 (pre-metric-objectives) |
util.py has aggregate_seeds |
def aggregate_seeds exists |
v15 (pre-metric-objectives) |
config.py has TrialSeededSampler |
class TrialSeededSampler exists |
v15 (pre-per-trial sampler seeds) |
| All checks pass | — | Current (up to date) |
What ships with it
1 file 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.
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.
- 2d ago Changed · +53 lines · +10 tokens per session dfdab6b2f850
- 3mo ago First seen · 186 lines · 78 tokens per session scan C c69ad437eed4
pytorch-migrate is a skill published in the GitHub repository Axect/pytorch_template (10 stars, last pushed 2d ago), licensed MIT. It adds 88 tokens to every session and 4,384 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
pytorch-migrate compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| pytorch-migrateAxect/pytorch_template | Skill | 10 | 2d ago | MIT | C | 88 | Claude Code |
| perforatedaiPerforatedAI/PerforatedAI | Skill | 241 | 9d ago | Apache-2.0 | A | 133 | Claude Code, Codex |
| flow-nexus-neuralruvnet/ruflo | Skill | 83k | today | MIT | A | 21 | Claude Code |
| marimo-pairmarimo-team/marimo | Skill | 24k | today | Apache-2.0 | A | 57 | Claude Code, Codex |
| fill-model-descriptionsmarimo-team/marimo | Skill | 24k | today | Apache-2.0 | A | 65 | Claude Code |
| physicsnemo-shard-tensorNVIDIA/physicsnemo | Skill | 3.5k | today | Apache-2.0 | A | 152 | Claude Code, Codex |
| physicsnemo-discoverNVIDIA/physicsnemo | Skill | 3.5k | today | Apache-2.0 | A | 124 | Claude Code, Codex |