template-formal

template-formal is a skill for Claude Code, Codex from docxology/template. It costs 53 tokens per session (895 once invoked), scanned A, original, Apache-2.0.

A project template showing how strict types and runtime checks can enforce rules in a multi-agent ant-colony simulation. It models communication protocols and resource handling so invalid states are rejected.

In plain words
What is it for?
Use it to study strongly typed Python designs, validate multi-agent protocols, check resource rules, and pair type-checker tests with runtime tests.
Why use it?
It helps test whether design rules are actually enforced, rather than relying only on comments or successful-looking tests.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is uv run python scripts/pipeline/stage_03_render.py --project templates/template_formal.

Good fit Use it to study strongly typed Python designs, validate multi-agent protocols, check resource rules, and pair type-checker tests with runtime tests.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/docxology/template
agentmods
npx agentmods add skills/docxology/template/template-formal

Made for: Claude Code, Codex.

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 template-formal

README.md
[![agentmods](https://agentmods.dev/badge/skills/docxology/template/template-formal/github.svg)](https://agentmods.dev/skills/docxology/template/template-formal)
Your own site
<a href="https://agentmods.dev/skills/docxology/template/template-formal"><img src="https://agentmods.dev/badge/skills/docxology/template/template-formal/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 template-formal

Your own site · 80×15
<a href="https://agentmods.dev/skills/docxology/template/template-formal"><img src="https://agentmods.dev/badge/skills/docxology/template/template-formal.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 895 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.00053 $0.00895
Opus 5.5 $0.00021 $0.00358
Sonnet 5.5 $0.00011 $0.00179
Haiku 4.5 $0.00005 $0.00089

Measured 1mo ago against content hash 2236f69d1e4d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

template-formal 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 1mo 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.

projects/templates/template_formal/.agents/skills/template-formal/SKILL.md · 78 lines

How it starts

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

template-formal

Project-scoped skill for the in-repo exemplar at projects/templates/template_formal/. Load this when working inside the project.

When to Use

  • Working inside the template_formal exemplar — running scripts, editing src/template_formal/, or adding a new typed invariant.
  • Forking this exemplar as the starting scaffold for a project whose research subject is illegal-state-unrepresentable design or a decentralized multiagent simulation.
  • Adding a new strong-typing claim and needing the paired-proof pattern: every ADT/session-type/affine-handle claim needs both a tests/mypy_fixtures/ negative-control fixture (mypy rejects the bad program) and a runtime unit test (the discipline actually raises).
  • Validating that the exemplar's contracts (thin-orchestrator, zero-mock testing, no compile-time linear/dependent-type claims) still hold after changes.

Quick Reference

# From the repository root
uv run pytest projects/templates/template_formal/tests --cov=projects/templates/template_formal/src --cov-fail-under=90
MYPYPATH=projects/templates/template_formal/src \
  uv run mypy --strict --explicit-package-bases --namespace-packages \
  projects/templates/template_formal/src
uv run python projects/templates/template_formal/scripts/02_run_analysis.py
uv run python scripts/pipeline/stage_03_render.py --project templates/template_formal
uv run python scripts/pipeline/stage_04_validate.py --project templates/template_formal
uv run python scripts/pipeline/stage_05_copy.py --project templates/template_formal

# Optional formal side-specs (non-default; require lake/elan + a Java runtime)
projects/templates/template_formal/scripts/check_formal_specs.sh

Pitfalls

  • Never claim compile-time linear or dependent type guarantees. Python has neither. Affine handles (TransactionHandle, protocol-phase objects) are a runtime-guarded discipline — they raise on reuse, they are not type-checked against reuse. Grep for "dependent type" and "linear type" outside the manuscript's explicit limitations/scoping section must return zero matches.
  • Every strong typing claim needs a paired proof. A mypy-oracle negative-control fixture under tests/mypy_fixtures/ proves what mypy --strict rejects; a runtime unit test proves what actually raises. One without the other is an unfalsifiable claim.
  • Keep scripts thin. Business logic belongs in src/template_formal/, not in scripts/.
  • No mocks. All tests use real on-disk SQLite files (tmp_path), a real in-process fault-injectable bus, and real mypy --strict subprocess invocations — never MagicMock/unittest.mock/mocker.patch.
  • No shared global state. Each Agent owns exactly one on-disk database and one protocol endpoint; the colony coordinator only ever holds the public Agent/PheromoneField interfaces.
  • Formal side-specs are optional and must stay wired. If formal/lean/ or formal/tla/ ship, they must be reachable from scripts/check_formal_specs.sh — never a vestigial, unwired file.

Read the full file on GitHub · 78 lines

Files

What ships with it

2 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. 1mo ago First seen · 78 lines · 53 tokens per session scan A 2236f69d1e4d

Subscribe to this mod's changes

template-formal is a skill published in the GitHub repository docxology/template (20 stars, last pushed 2d ago), licensed Apache-2.0. It adds 53 tokens to every session and 895 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-09-03.

Related

Other skills, from other repositories

pin-guardrail

Pin a shell guardrail (a hook, a git hook, a checker script) with a behavioral test suite, prove the suite is real by mutating the code, and wire it into CI with its mutation ledger. Use when asked to "add tests for this hook", "pin that guard", "mutation-test this script", "this hook has no test", "wire the suite…

craigcossairt/trellis · 94 tokens

migrate-to-shoehorn

Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.

mxyhi/ok-skills · 48 tokens

web3-testing

Test smart contracts comprehensively using Hardhat and Foundry with unit tests, integration tests, and mainnet forking. Use when testing Solidity contracts, setting up blockchain test suites, or validating DeFi protocols.

wshobson/agents · 46 tokens

temporal-python-testing

Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.

wshobson/agents · 45 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

i4h-catheter-navigation-e2e

End-to-end smoke for catheter navigation covering setup, digital twin, DRR, and unit tests. Use when asked to run the full catheter workflow smoke or demo the v0.7 pipeline.

NVIDIA/skills · 49 tokens