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 agentmods add commands/komluk/scaffolding/init-rulesgit clone --depth 1 https://github.com/komluk/scaffoldingWhat 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 | $0.00033 | $0.00951 |
| Opus 5 | $0.00016 | $0.00476 |
| Sonnet 5 | $0.00007 | $0.00190 |
| Haiku 4.5 | $0.00003 | $0.00095 |
Grade A, and why
init-rules 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 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.
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 — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/init-rules Command
Scaffold path-scoped nested CLAUDE.md files into the current project so that
per-area code conventions load only when Claude works on files under that
directory — trimming always-loaded context without weakening routing.
This is a generator: it writes nested CLAUDE.md files into the USER project
(e.g. frontend/CLAUDE.md), not into the plugin. It is opt-in and reversible
— conventions are relocated, never deleted.
Usage
/init-rules [subdir ...]
If no subdirs are given, propose candidate areas (e.g. frontend/, backend/,
app/, src/) detected in the repo and ask which to scaffold.
Mechanism (native — no custom engine)
Claude Code natively auto-loads a CLAUDE.md placed in a subdirectory only
when working on files under that tree. /init-rules uses exactly this primitive;
it does not build a paths: glob matcher or a hook injector.
HARD INVARIANT — routing never moves
The routing Protocol + Decision Tree + Agents table stay in the project-root
CLAUDE.md, always-loaded. Routing must fire on the first message before any
file is edited; a nested file only loads on Edit/Write under its tree — too late
to route. This command:
- MUST NOT copy, move, or delete the routing sections from the root CLAUDE.md.
- MUST NOT overwrite an existing nested
CLAUDE.md(idempotent — skip if present). - Only path-specific code conventions (types location, stack notes, per-area style) are candidates to relocate into nested files.
Steps
Follow these steps exactly.
1. Locate the plugin root
Reuse the same discovery as /init-scaffolding (search the marketplace cache
paths) to find PLUGIN_ROOT. If not found, stop and tell the user to run
/plugin install scaffolding@komluk-scaffolding first.
2. Resolve target subdirs
Use the args if given. Otherwise detect candidate area directories and confirm with the user before writing anything.
3. Scaffold a nested CLAUDE.md per target (idempotent)
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 First seen · 98 lines · 33 tokens per session scan A 02417a49782d
init-rules is a command published in the GitHub repository komluk/scaffolding (15 stars, last pushed 27d ago), licensed MIT. It adds 33 tokens to every session and 951 once invoked, about $0.0002 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 commands, from other repositories
auto
Intent-classified router, the front door to OrchestKit and the DEFAULT entry point for any goal-shaped request. Classifies a plain-English goal and routes it to the right specialist skill. Routing is never overhead, so use it even when the target skill seems obvious; skip only when already executing inside another…
design-to-code
Mockup-to-component pipeline using Google Stitch, 21st.dev, and Storybook MCP. Accepts a screenshot, a description, or a URL and produces production-ready React components, checking existing Storybook components before generating anything new. Use when implementing UI from a mockup or screenshot. To call the MCP tool…
brand-setup
Configure a new brand profile with colors, fonts, logo, visual style, platforms, and compliance rules.
save
Save this conversation as a new or existing reusable context.
graphify
Turn your vault into a clustered knowledge graph with HTML and JSON outputs.
screens
Structures product UX screen design — inventory, flow, states, and reusable briefs for external design tools — without generating pixels or UI code.