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 cboone/agent-harness-plugins --skill write-lean-codegit clone --depth 1 https://github.com/cboone/agent-harness-pluginsWrote 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/cboone/agent-harness-plugins/write-lean-code)<a href="https://agentmods.dev/skills/cboone/agent-harness-plugins/write-lean-code"><img src="https://agentmods.dev/badge/skills/cboone/agent-harness-plugins/write-lean-code/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/cboone/agent-harness-plugins/write-lean-code"><img src="https://agentmods.dev/badge/skills/cboone/agent-harness-plugins/write-lean-code.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.00051 | $0.01310 |
| Opus 5.5 | $0.00020 | $0.00524 |
| Sonnet 5.5 | $0.00010 | $0.00262 |
| Haiku 4.5 | $0.00005 | $0.00131 |
Grade A, and why
write-lean-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 3d 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 — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Write Lean Code
Core Principles
- Type-driven development: let the type system guide implementation; express invariants in types
- Leverage Mathlib: use existing theorems, definitions, and tactics before building from scratch
- Tactic proofs for incremental feedback: prefer tactic mode for complex proofs; use the VS Code infoview for step-by-step development
- Clarity and composability: write small, focused lemmas; name them to be discoverable via
exact?andapply?
Workflow
- In a fresh clone or worktree, run the project's documented bootstrap script before any direct
lake build. Mathlib must come fromlake exe cache get(prebuilt artifacts), not a local source compilation. - After bootstrap has succeeded in the current worktree, run
lake build <Module.Name>to check compilation; run project linters if available. - Update the tests in the same change as the proof code if the project has a test suite that mirrors the proof code. Whenever a module's public surface changes, update the matching test file. Read
./references/tests/workflow.mdfor compile-time,example-based regression conventions, including import discipline, mirrored paths and composition per milestone.references/comprehensive/build-infrastructure.mdcoverstestDriver/defaultTargetswiring. - Before declaring a proof change finished, run the project's full local check (build + tests + any proof-boundary or lint checks the project defines).
- Review against essential checklist:
references/essential/checklist.md - For specific questions, consult:
references/comprehensive/{topic}.md
Project-Local Caveats
Each project using this skill should document its own bootstrap script, test-mirroring convention, namespace rules, and any vendored Lean dependencies that must be excluded from style searches. Read the invoking project's CLAUDE.md (or equivalent agent-config file) for those specifics before applying the generic guidance below.
Vendored Lean dependencies are not style references. When a project pulls in a third-party Lean library through lake (under .lake/packages/<name>/ or the equivalent), that code is a build artifact, not a reference for Lean naming, proof style, tactic preferences, comment or docstring format, file structure, or math prose. Exclude such paths from grep-for-conventions searches. The invoking project's CLAUDE.md should name the specific packages to exclude.
What ships with it
12 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.
- references/comprehensive/build-infrastructure.md 14 KB
- references/comprehensive/general-programming.md 7.8 KB
- references/comprehensive/mathlib-api-discovery.md 20 KB
- references/comprehensive/mathlib.md 12 KB
- references/comprehensive/metaprogramming.md 7.9 KB
- references/comprehensive/naming.md 16 KB
- references/comprehensive/pfr-downstream.md 8.5 KB
- references/comprehensive/proof-style.md 10 KB
- references/comprehensive/style-and-formatting.md 14 KB
- references/essential/checklist.md 9.2 KB
- references/review-checklist.md 4.7 KB
- references/tests/workflow.md 13 KB
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.
- 3d ago Changed · -5 lines · +2 tokens per session 51c9167ee4cb
- 8d ago Changed · +1 lines · +10 tokens per session bf8be8131d70
- 25d ago Changed · +4 lines 4f9dd550f2b2
- 26d ago Changed · -5 lines · -150 tokens per session b37fcbb5bb2f
- 1mo ago First seen · 75 lines · 189 tokens per session scan A 188e312955ed
write-lean-code is a skill published in the GitHub repository cboone/agent-harness-plugins (2 stars, last pushed yesterday), licensed MIT. It adds 51 tokens to every session and 1,310 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.
Other skills, from other repositories
cirq
Google quantum computing framework. Use when targeting Google Quantum AI hardware, designing noise-aware circuits, or running quantum characterization experiments. Best for Google hardware, noise modeling, and low-level circuit design. For IBM hardware use qiskit; for quantum ML with autodiff use pennylane; for…
biopython
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use…
scikit-bio
Biological data toolkit. Sequence analysis, alignments, phylogenetic trees, diversity metrics (alpha/beta, UniFrac), ordination (PCoA), PERMANOVA, FASTA/Newick I/O, for microbiome analysis.
scvelo
RNA velocity analysis with scVelo. Estimate cell state transitions from unspliced/spliced mRNA dynamics, infer trajectory directions, compute latent time, and identify driver genes in single-cell RNA-seq data. Complements Scanpy/scVI-tools for trajectory inference.
simpy
Build, inspect, test, and analyze bounded process-based discrete-event simulations with SimPy, including events, resources, interrupts, monitoring, replications, warm-up, and reproducible output analysis.
julia
Julia development guidelines covering multiple dispatch, type system, performance optimization, and scientific computing best practices.