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/cboone/agent-harness-plugins/scaffold-lean-librarynpx skills add cboone/agent-harness-plugins --skill scaffold-lean-librarygit 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/scaffold-lean-library)<a href="https://agentmods.dev/skills/cboone/agent-harness-plugins/scaffold-lean-library"><img src="https://agentmods.dev/badge/skills/cboone/agent-harness-plugins/scaffold-lean-library.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.00128 | $0.02650 |
| Opus 5 | $0.00064 | $0.01325 |
| Sonnet 5 | $0.00026 | $0.00530 |
| Haiku 4.5 | $0.00013 | $0.00265 |
Grade A, and why
scaffold-lean-library 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 — 249 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Scaffold Lean Library
Generate a Lean 4 library repository with Lake, Mathlib or PFR dependencies, compile-time API regression tests, local Makefile targets, GitHub Actions CI, text linting, and agent instructions.
Workflow
1. Gather Project Information
If the user provided values in the request, use them and do not ask again. Derive safe defaults from context only when they are unambiguous.
Ask for any missing values:
- Project name: kebab-case repository and Lake package name, for example
entropy-inequalities. - Short description: one sentence for README, marketplace-style summaries, and agent instructions.
- Top-level Lean namespace:
UpperCamelCase, for exampleEntropyInequalities. Derive from the project name when the result is readable; ask if acronyms or domain terms make the derivation ambiguous. - Lean toolchain version: the exact
lean-toolchaincontent, for exampleleanprover/lean4:v4.25.0. - Dependency family:
MathliborPFR. - Dependency git ref: a Mathlib tag/ref or a PFR git ref.
- Paper-backed mode: whether to add
references/stubs and Pandoc-academic lint ignores for formalizations tied to papers or transcriptions. - GitHub username: for repository URLs.
- Copyright holder: for
LICENSEand source headers.
Detect the GitHub username and full name when possible:
gh api user -q .login
git config user.name
If either command fails or returns an empty value, ask the user.
2. Resolve Dependency Ref
For Mathlib projects:
-
If the user supplied a dependency ref, use it.
-
Otherwise, if the Lean toolchain is exactly
leanprover/lean4:vX.Y.ZorvX.Y.Z, derive the Mathlib refvX.Y.Z. -
Verify the derived ref exists before using it:
git ls-remote --tags https://github.com/leanprover-community/mathlib4.git refs/tags/vX.Y.Z -
If the tag does not exist, or if the Lean toolchain is nightly, a branch, or otherwise not a clean stable version, ask the user for the Mathlib ref.
What ships with it
22 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/agents-md.md 2.1 KB
- references/bootstrap-worktree.md 1.8 KB
- references/changelog.md 481 B
- references/ci-workflow.md 1.7 KB
- references/copilot-instructions.md 1020 B
- references/cspell-jsonc.md 916 B
- references/cspell-words.md 512 B
- references/dependency-blocks.md 745 B
- references/editorconfig.md 411 B
- references/gitignore.md 405 B
- references/lakefile-toml.md 953 B
- references/lean-toolchain.md 369 B
- references/license.md 10 KB
- references/makefile.md 1.6 KB
- references/markdownlint-cli2-jsonc.md 655 B
- references/paper-backed-stubs.md 1.3 KB
- references/prelude-lean.md 793 B
- references/readme.md 1.3 KB
- references/root-lean.md 499 B
- references/test-prelude-lean.md 850 B
- references/test-root-lean.md 488 B
- references/text-lint-workflow.md 1.4 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 First seen · 249 lines · 128 tokens per session scan A 2479167f831a
scaffold-lean-library is a skill published in the GitHub repository cboone/agent-harness-plugins (2 stars, last pushed 1mo ago), licensed MIT. It adds 128 tokens to every session and 2,650 once invoked, about $0.0006 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
jupyter-notebook
Iterative Python via live Jupyter kernel (hamelnb).
cuopt-numerical-optimization-api
LP, MILP, and QP (beta) with cuOpt — Python, C, and CLI. Use when the user is solving LP, MILP, or QP with any cuOpt interface.
gh-address-comments
Help address review/issue comments on the open GitHub PR for the current branch using gh CLI; verify gh auth first and prompt the user to authenticate if not logged in.
julia
Julia development guidelines covering multiple dispatch, type system, performance optimization, and scientific computing best practices.
capability
Creates or modifies a capability class in domain/capabilities/ and its corresponding Has interface in domain/tools/contracts.ts. Use when adding a new tool runtime behavior (agents, skills, commands, rules, mcp, hooks, settings, plugins), changing the constructor params of an existing capability class, or wiring a new…
imperative-to-coq-model-extractor
Extract abstract mathematical models from imperative code (C, C++, Python, Java, etc.) suitable for formal reasoning in Coq. Use when the user asks to model imperative code in Coq, create Coq specifications from imperative programs, extract mathematical models for verification, or translate imperative algorithms to…