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 skills/docxology/template/template-formalnpx skills add docxology/template --skill template-formalgit clone --depth 1 https://github.com/docxology/templateWrote 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/docxology/template/template-formal)<a href="https://agentmods.dev/skills/docxology/template/template-formal"><img src="https://agentmods.dev/badge/skills/docxology/template/template-formal.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 | $0.00053 | $0.00895 |
| Opus 5 | $0.00026 | $0.00447 |
| Sonnet 5 | $0.00011 | $0.00179 |
| Haiku 4.5 | $0.00005 | $0.00089 |
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 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 — 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_formalexemplar — running scripts, editingsrc/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 inscripts/. - No mocks. All tests use real on-disk SQLite files (
tmp_path), a real in-process fault-injectable bus, and realmypy --strictsubprocess invocations — neverMagicMock/unittest.mock/mocker.patch. - No shared global state. Each
Agentowns exactly one on-disk database and one protocol endpoint; the colony coordinator only ever holds the publicAgent/PheromoneFieldinterfaces. - Formal side-specs are optional and must stay wired. If
formal/lean/orformal/tla/ship, they must be reachable fromscripts/check_formal_specs.sh— never a vestigial, unwired file.
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.
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 First seen · 78 lines · 53 tokens per session scan A 2236f69d1e4d
template-formal is a skill published in the GitHub repository docxology/template (19 stars, last pushed today), licensed Apache-2.0. It adds 53 tokens to every session and 895 once invoked, about $0.0003 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-09-03.
Other skills, from other repositories
aerospace-engineering-technician
Use when a task needs the judgment of an Aerospace Engineering and Operations Technologist/Technician — verifying an installed fastener's preload against a drawing's torque callout via the T=K·D·F relationship, reducing strain-gauge data from a structural proof-load test into stress and checking it against an…
agricultural-engineer
Use when a task needs the judgment of an agricultural engineer — sizing a center-pivot or drip irrigation system's peak capacity against crop water demand, computing lateral grain-bin wall pressure with Janssen's equation, sizing a waterway or tile-drainage system with Manning's equation and an NRCS design-storm…
agricultural-sciences-professor
Use when a task needs the judgment of a tenure-track or tenured Agricultural Sciences faculty member at a land-grant university — deciding whether to submit a grant this cycle versus wait, allocating time across the teaching/research/extension appointment split, diagnosing a stalled graduate student or field trial, or…
anthropologist-archeologist
Use when a task needs the judgment of an Anthropologist/Archeologist working in cultural resource management (CRM) — scoping a Section 106 Phase I identification survey, designing a shovel-test-pit sampling strategy, evaluating National Register of Historic Places eligibility under Criteria A-D, interpreting…
automotive-engineering-technician
Use when a task needs the judgment of an Automotive Engineering Technician — setting up and instrumenting test equipment (strain-gauge bridges, thermocouples, load/torque sensors) to an engineer's written test plan, selecting DAQ sample rate and an SAE J211 CFC filter class for a vehicle test channel, verifying…
calibration-technician
Use when a task needs the judgment of a Calibration Technologist/Technician — computing a Test Uncertainty Ratio (TUR) and deciding whether it meets the 4:1 target, building a measurement uncertainty budget (Type A/Type B, GUM-style) for a calibration, tracing a reference standard's chain of custody to NIST/SI…