Getting it into your agent
There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.
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.
[](https://agentmods.dev/skills/katopz/katgpt-rs/substrate-first)<a href="https://agentmods.dev/skills/katopz/katgpt-rs/substrate-first"><img src="https://agentmods.dev/badge/skills/katopz/katgpt-rs/substrate-first.svg" alt="Measured on agentmods" 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.00159 | $0.11595 |
| Opus 5 | $0.00079 | $0.05797 |
| Sonnet 5 | $0.00032 | $0.02319 |
| Haiku 4.5 | $0.00016 | $0.01159 |
Grade A, and why
substrate-first 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 yesterday.
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 — 366 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Substrate-First — DRY gate + drift audit
The workspace — 18 repos carrying a root BOUNDARY.md as of 2026-09-01,
derived by the snippet in Step 2 rather than typed here — has a recurring
failure mode: an agent receives a task
("add threat perception"), jumps to implementation without checking existing
substrate, and builds a parallel system that duplicates functionality
already shipped under a different name. The user then has to catch it manually.
This skill prevents that. It runs in two modes:
- Pre-implementation gate — run BEFORE writing code
- Existing-code audit — scan for already-shipped DRY violations
Canonical failures (the pattern this skill prevents)
Failure 1 — ThreatField (Issue 047, riir-mmorpg-examples, 2026-08-01)
Built: ThreatField — a spatial hash grid (HashMap<(i32,i32), u32>)
for threat perception. Deposited monster positions into cells; NPCs sampled
the 3×3 neighborhood.
Already existed: GenericSpatialBelief<T> + target_within_visible_radius()
decay_confidence()— the full fog-of-war → belief → decay pipeline inriir-games-shared/src/game_traits/spatial.rs.
Why the grep missed it: The agent searched for "threat field" /
"spatial hash". The substrate ships as GenericSpatialBelief /
SpatialBelief / confidence_decay. A single-vocabulary grep returns
ZERO hits even when the substrate fully exists.
Resolution: Reverted. The plain scan (tick_swarm_emotions) is a simpler
POC-scale simplification. The belief-based system is deferred until fog-of-war
becomes a gameplay feature.
Failure 2 — Orchard + Motivation in SDK src/ (Issue 490 + Issue 493)
Built: NpcReasonSystem, AppleGrowSystem, OrchardGoal, EmotionField,
EmotionAxis, tick_feeling_brain directly in the SDK facade's src/.
Already existed: The boundary rule (riir-game-sdk/AGENTS.md) says "no game
logic in src/" + Proposal 019 excludes emotion from the SDK. The substrate
belongs in riir-games (in riir-ai).
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.
- yesterday Changed · +1 lines 6ad0ea024c1e
- 2d ago Changed · +45 lines 5b0a203233dd
- 6d ago First seen · 320 lines · 159 tokens per session scan A 317d412bba4d
substrate-first is a skill published in the GitHub repository katopz/katgpt-rs (98 stars, last pushed yesterday), licensed MIT. It adds 159 tokens to every session and 11,595 once invoked, about $0.0008 per session on Opus 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
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
chronicle
Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…