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 jrjsmrtn/tlx --skill formal-specgit clone --depth 1 https://github.com/jrjsmrtn/tlxWrote 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/jrjsmrtn/tlx/formal-spec)<a href="https://agentmods.dev/skills/jrjsmrtn/tlx/formal-spec"><img src="https://agentmods.dev/badge/skills/jrjsmrtn/tlx/formal-spec/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.
<a href="https://agentmods.dev/skills/jrjsmrtn/tlx/formal-spec"><img src="https://agentmods.dev/badge/skills/jrjsmrtn/tlx/formal-spec.svg" alt="Reviewed on agentmods" width="80" 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.00086 | $0.03039 |
| Opus 5.5 | $0.00034 | $0.01216 |
| Sonnet 5.5 | $0.00017 | $0.00608 |
| Haiku 4.5 | $0.00009 | $0.00304 |
Grade A, and why
formal-spec 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 3mo 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 — 401 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Formal Specification Workflow with TLX
TLX enables formal verification of state machines by writing declarative specs in Elixir and model-checking them with TLC. This skill covers the full lifecycle: design-time abstract specs, implementation-time concrete specs, and CI-time refinement checking.
When to Use This Workflow
Apply formal specification to state machines with:
- Multiple states and guarded transitions
- Concurrent access or distributed coordination
- Safety properties ("this must never happen")
- Liveness properties ("this must eventually happen")
- Approval gates, quorum requirements, or sequencing constraints
Not every GenServer needs a spec. Target modules with complex state
logic — :gen_statem, GenServers with explicit state machines, or
any module where an ADR describes valid/invalid state transitions.
Phase 1: Abstract Spec from ADR
Read the ADR and extract
- States — all named states the system can be in
- Transitions — which events move between states, with guards
- Forbidden transitions — state pairs that must never be directly reachable
- Invariants — properties that must hold in every reachable state
- Liveness — properties about eventual behavior (optional)
Write the abstract TLX spec
Every spec file starts with a cross-reference header:
# ADR: 0029, 0013
# Source: apps/forge_infra/lib/forge/firmware/orchestrator.ex
ADR:— comma-separated ADR numbers this spec derives fromSource:— relative path to the implementation (omit for abstract-only specs)
import TLX
defspec AbstractFirmware do
variable :state, :idle
action :begin do
guard(e(state == :idle))
next :state, :updating
end
action :complete do
guard(e(state == :updating))
next :state, :committed
end
action :fail do
guard(e(state == :updating))
next :state, :failed
end
invariant :committed_is_terminal,
e(ite(state == :committed, true, true))
end
What ships with it
6 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.
- 3mo ago First seen · 401 lines · 86 tokens per session scan A 6688e36b109f
formal-spec is a skill published in the GitHub repository jrjsmrtn/tlx (15 stars, last pushed 1mo ago), licensed MIT. It adds 86 tokens to every session and 3,039 once invoked, about $0.0003 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-08-31.
formal-spec compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| formal-specjrjsmrtn/tlx | Skill | 15 | 1mo ago | MIT | A | 86 | Claude Code, Codex |
| imagegenopenai/codex | Skill | 137k | today | Apache-2.0 | A | 113 | Codex |
| playwright-climicrosoft/playwright | Skill | 101k | today | Apache-2.0 | A | 19 | Claude Code |
| browser-automationopenclaw/openclaw | Skill | 395k | today | MIT | A | 36 | Claude Code |
| systematic-debuggingobra/superpowers | Skill | 331k | 3d ago | MIT | A | 21 | Claude Code |
| free-llm-apismnfst/awesome-free-llm-apis | Skill | 15k | yesterday | CC0-1.0 | A | 113 | Claude Code, Codex |
| next-cache-components-adoptionvercel/next.js | Skill | 144k | today | MIT | A | 95 | Claude Code |