ai-scaling-laws

ai-scaling-laws is a skill for Claude Code, Codex from vasilyu1983/AI-Agents-public. It costs 42 tokens per session (4,057 once invoked), scanned A, original, MIT.

A guide to choosing the size of an AI model and the amount of training data it should use. It explains research-based rules connecting model parameters, training tokens, and computing capacity.

In plain words
What is it for?
Estimating model size, training-token budgets, compute allocation, and the tradeoff between training more data and keeping a larger model.
Why use it?
It helps avoid spending too much computing capacity on an oversized model or too little training data, or making the opposite tradeoff.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present. Also seen: mentions Claude Code; mentions Codex.

Part of the ai-agents plugin — 144 skills shipped together

Good fit Estimating model size, training-token budgets, compute allocation, and the tradeoff between training more data and keeping a larger model.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vasilyu1983/ai-agents-public/ai-scaling-laws
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 vasilyu1983/AI-Agents-public --skill ai-scaling-laws
Clone the repo
git clone --depth 1 https://github.com/vasilyu1983/AI-Agents-public

Made for: Claude Code, Codex.

Or install ai-agents, the plugin that ships this one along with the rest of its 144 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 ai-scaling-laws

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/vasilyu1983/ai-agents-public/ai-scaling-laws"><img src="https://agentmods.dev/badge/skills/vasilyu1983/ai-agents-public/ai-scaling-laws.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,057 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
  • 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.00042 $0.04057
Opus 5.5 $0.00017 $0.01623
Sonnet 5.5 $0.00008 $0.00811
Haiku 4.5 $0.00004 $0.00406

Measured 22d ago against content hash 2c2977ea76b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ai-scaling-laws 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 22d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/test_training_math.py, scripts/training_math.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/universal/ai-scaling-laws/SKILL.md · 157 lines

How it starts

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

AI Scaling Laws — Compute-Optimal Sizing Skill

Use this skill to allocate training compute between model parameters and tokens, then adjust for data and inference constraints.

Quick Reference

Concept Formula / Heuristic Notes
Compute budget C ≈ 6 N D D = training tokens. Say which N you use: Kaplan counts non-embedding params; Chinchilla counts total params (embeddings included). ≈6 = forward + backward matmuls only; the attention term is extra (see compute-budget reference)
Chinchilla-optimal ratio D ≈ 20 × N From Hoffmann et al. 2022; holds compute constant
Kaplan (2020) allocation N ∝ C^0.73, D ∝ C^0.27 No fixed D/N ratio: the compute-efficient path grows D ∝ N^0.37, so D/N falls as C grows. Difference from Chinchilla is methodological (FLOP counting, warmup, optimizer tuning), not simply "wrong" — see post-Chinchilla ref
Optimal N given C N* ≈ (C / 120)^0.5 Derived, not a paper table: it is C = 6ND with D = 20N
Optimal D given C D* ≈ (C / 0.3)^0.5 Same algebra (D* = 20 N*)
Over-training (Llama-style) D ≫ 20 × N Trades higher training loss for cheaper inference. Meta reports over 15T pretraining tokens for Llama 3 8B, far above 20:1. For MoE models apply the ratio to activated, not total, params
GPT-3 (175B) training tokens ~300B tokens ≈1.7 tok/param (Kaplan-era; undercooked by Chinchilla standard)
Chinchilla (70B) training tokens ~1.4T tokens 70B × 20; compute-matched to Gopher (280B, 300B tokens), about 1.9× GPT-3's compute
GPT-2 (124M) at 20:1 ≈2.5B tokens See worked example below; param counts live in ai-pretraining's reference card
Fit constants Hoffmann eq.: α≈0.34, β≈0.28 Besiroglu et al. 2024 refit: α≈0.35, β≈0.37; the published fit implies far more than 20 tok/param, the refit restores ≈20

Key distinction: Chinchilla-optimal minimizes validation loss for a given compute budget. It is not inference-optimal. Over-training a smaller model to more tokens gives a model that is cheaper per inference call, even though it spent more of the compute budget on data than the loss-optimal split would dictate.

Read the full file on GitHub · 157 lines

Files

What ships with it

8 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. 22d ago Changed · -43 lines 2c2977ea76b8
  2. 1mo ago Changed · +4 lines 30c78fc07dfa
  3. 1mo ago First seen · 196 lines · 42 tokens per session scan A c7c58f8f4c7b

Subscribe to this mod's changes

ai-scaling-laws is a skill published in the GitHub repository vasilyu1983/AI-Agents-public (101 stars, last pushed 11d ago), licensed MIT. It adds 42 tokens to every session and 4,057 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.

Related

Other skills, from other repositories

scvi-tools

Deep learning for single-cell analysis using scvi-tools. This skill should be used when users need (1) data integration and batch correction with scVI/scANVI, (2) ATAC-seq analysis with PeakVI, (3) CITE-seq multi-modal analysis with totalVI, (4) multiome RNA+ATAC analysis with MultiVI, (5) spatial transcriptomics…

Shoko-official/Claude-Science-System-Prompts · 193 tokens

experiment-bridge

A workflow tool that turns a research experiment plan into implemented code, deployed runs on GPUs, and initial results. It connects planning, code review, execution, and result collection.

raja21068/AutoResearch · 74 tokens

saelens

Train sparse autoencoders to interpret model features.

NousResearch/hermes-agent · 14 tokens

spark-environment-setup

Set up a working ML training/inference environment on NVIDIA DGX Spark (GB10, aarch64, CUDA 13). Use when installing PyTorch/Unsloth/TRL/vLLM on DGX Spark, hitting libcudart or wheel-ABI errors on aarch64, or choosing between NGC containers and bare pip installs.

wshobson/agents · 76 tokens

spark-training-gotchas

Preflight and diagnose the ten known failure modes for ML training on NVIDIA DGX Spark. Use when a training run on DGX Spark fails to start, OOMs below the 128GB limit, slows down mid-run, or before any multi-hour training job on GB10.

wshobson/agents · 63 tokens

data-quality-frameworks

Implement data quality validation with Great Expectations, dbt tests, and data contracts. Use when building data quality pipelines, implementing validation rules, or establishing data contracts.

wshobson/agents · 37 tokens