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 kotaroyamame/formal-agent-contracts --skill generate-codegit clone --depth 1 https://github.com/kotaroyamame/formal-agent-contractsWrote 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/kotaroyamame/formal-agent-contracts/generate-code)<a href="https://agentmods.dev/skills/kotaroyamame/formal-agent-contracts/generate-code"><img src="https://agentmods.dev/badge/skills/kotaroyamame/formal-agent-contracts/generate-code.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.00102 | $0.01756 |
| Opus 5 | $0.00051 | $0.00878 |
| Sonnet 5 | $0.00020 | $0.00351 |
| Haiku 4.5 | $0.00010 | $0.00176 |
Grade A, and why
generate-code 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 7d 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.
Code Generation from VDM-SL Specifications
Read VDM-SL specifications (types, functions, operations, invariants) and generate TypeScript or Python implementation scaffolds. Includes runtime verification (pre/post/inv checks).
VDM-SL仕様を読み取り、TypeScript/Pythonの実装スキャフォールドを生成する。 ランタイム検証(pre/post/inv チェック)も含める。
Generation Flow
Step 1: Read the Specification File
Read the .vdmsl file specified by the user.
If no file is specified, search for .vdmsl files in the workspace.
ユーザーが指定した .vdmsl ファイルを読み取る。指定がなければワークスペース内を探索。
Step 2: Confirm Target Language
If the user hasn't specified, ask with AskUserQuestion:
- TypeScript
- Python
- Both
ユーザーが明示しない場合、AskUserQuestionで確認する。
Step 2.5: Check for Model Routing (optional, token saving)
If a model-routing.json (produced by the route-models skill) exists next to the spec file:
- Process each module as a separate subagent with the module's assigned model
(Claude Code: the Task tool's
modelparameter). Read the tier → model mapping from the routing file — never hard-code model names. - Modules not listed in the file use
defaults.tier. - Verification is unchanged: generated code must pass the same gates as without
routing. If a module's output fails its gate twice, escalate one tier,
regenerate, append to
escalation.history, and add the same row to the "Escalations" section ofMODEL-ROUTING.md(see theroute-modelsskill,references/routing-rules.md). - If the runtime does not support per-subagent model selection, present the routing table as a recommendation and continue normally. Never fail the phase because routing is unavailable.
仕様ファイルの隣に model-routing.json(route-models スキルの成果物)があれば、
モジュールごとに割り当てモデルのサブエージェントで生成する(層→モデル対応は必ず
ファイルから読む)。検証はルーティング無しのときと同一で、同一モジュールが2回
失敗したら1層上げて再生成し、escalation.history と MODEL-ROUTING.md の両方に追記する。モデル指定が使えない環境では
推奨表の提示に留め、通常どおり進める。
Step 3: VDM-SL → Code Conversion
Follow the conversion rules in references/typescript-rules.md or references/python-rules.md.
What ships with it
4 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.
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.
- 7d ago First seen · 174 lines · 102 tokens per session scan A 3a4a6f0de2ce
generate-code is a skill published in the GitHub repository kotaroyamame/formal-agent-contracts (1 stars, last pushed 2mo ago), licensed MIT. It adds 102 tokens to every session and 1,756 once invoked, about $0.0005 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-31.
Other skills, from other repositories
language-patterns
Provides language-specific patterns for TypeScript, Python, and React including idioms, best practices, and common patterns. Use when implementing features in these languages.
claude-api
Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.
plankton-code-quality
Write-time code quality enforcement using Plankton — auto-formatting, linting, and Claude-powered fixes on every file edit via hooks.
writing-typescript
Idiomatic TypeScript development. Use when writing TypeScript code, Node.js services, React apps, or TypeScript design advice. Emphasizes strict typing, boundary validation, composition, fast feedback, behavior tests, and project-configured tooling. NOT for Go, Python, Rust, plain HTML/CSS/JS, or server-rendered…
writing-python
Idiomatic Python 3.12+ development. Use when writing Python code, CLI tools, scripts, or services. Emphasizes stdlib, type hints, fast pytest feedback, uv/ruff/pyright toolchain, and minimal dependencies. NOT for Go, Rust, TypeScript, or shell-only tasks.
inline-lambda-functions
How to eliminate verbose multi-line helper boilerplate by using concise inline lambda expressions and arrow functions, cutting callback token generation by 55%.