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 commands/cameronfreer/lean4-skills/checkpointgit clone --depth 1 https://github.com/cameronfreer/lean4-skillsWrote 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/commands/cameronfreer/lean4-skills/checkpoint)<a href="https://agentmods.dev/commands/cameronfreer/lean4-skills/checkpoint"><img src="https://agentmods.dev/badge/commands/cameronfreer/lean4-skills/checkpoint.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.00009 | $0.02230 |
| Opus 5 | $0.00005 | $0.01115 |
| Sonnet 5 | $0.00002 | $0.00446 |
| Haiku 4.5 | $0.00001 | $0.00223 |
Grade A, and why
checkpoint 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 — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Lean4 Checkpoint
Creates a checkpoint with per-file and project-wide build verification, axiom check, and commit.
Usage
/lean4:checkpoint
/lean4:checkpoint "optional custom message"
/lean4:checkpoint --mathlib-mk-all # force the mk_all root-file gate
/lean4:checkpoint --no-mathlib-mk-all # skip the mk_all root-file gate
Invocation Contract
Interpret this command's inputs per the Command Invocation Contract.
Primary path (hook-validated): If a validated-invocation block for this
command appears in context, treat it as the authoritative interpretation of
parser-decidable inputs and do not re-parse the raw invocation text for
those inputs. Start by reading all parser-decided fields from the block. Emit
the final Resolved Inputs summary from the block values.
See Validated Invocation Block.
Fallback path (other hosts): If no validated-invocation block is present,
parse the raw invocation text against this command's input table before acting.
Startup requirements:
- Emit a Resolved Inputs block with explicit values, defaults, ignored
flags, and startup validation errors — including the effective mk_all-gate
decision and its source (
flag, the helper'sintent.source, orhelper-failure). - Refuse to start on startup validation errors (e.g. both
--mathlib-mk-alland--no-mathlib-mk-all).
Inputs
| Arg | Required | Description |
|---|---|---|
| message | No | Custom commit message suffix |
| --mathlib-mk-all | No | Force the Generated Root Files gate on, overriding project-context detection. Mutually exclusive with --no-mathlib-mk-all. |
| --no-mathlib-mk-all | No | Force the Generated Root Files gate off, overriding project-context detection. Mutually exclusive with --mathlib-mk-all. |
Actions
- Verify Touched Files - For each existing added/modified
.leanfile in the candidate set for this checkpoint — the files touched during this session that the Stage and Commit step will stage, determined independently of the current git index (staging happens later) — compile individually:
If any file fails, stop and report the error before proceeding.lake env lean <path/to/File.lean> # from project root - Generated Root Files gate (mathlib) - See Generated Root Files below. Runs before the project build; skips entirely unless the gate fires.
- Verify Build - Run
lake buildfor the project-wide gate (catches cross-file issues not visible in per-file compilation) - Best-effort Axiom Scan - Scan for non-standard axioms in top-level declarations:
Note: checks top-level unindented declarations across all namespaces in each file (nested, sibling, and dotted namespaces are tracked correctly; sections are handled without leaking into the qualified name). Recognizeslean4-skills-check-axioms-inline .theorem|lemma|def|instance|abbrev|example|structure|class|inductive|axiom|constant, optionally prefixed bynoncomputable,unsafe,partial, ornonrec. Indented declarations and unicode-identifier decls are not matched — files whose decls all fall in those classes are surfaced as UNVERIFIED (exit 1, not a silent pass). The script temporarily edits files in place while running — only use on version-controlled files, and avoid concurrent editors or watchers. - Count Sorries - Report current sorry count:
lean4-skills-sorry-analyzer . --format=summary - Stage and Commit - Stage only files touched during this session, then commit:
Never usegit add <files touched during this session> git diff --cached --name-only # print exact staged set git commit -m "checkpoint(lean4): [summary]"git add -Aor broad glob patterns. - Report Status - Show what was saved
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 · 146 lines · 9 tokens per session scan A 8744d6ae672c
checkpoint is a command published in the GitHub repository cameronfreer/lean4-skills (418 stars, last pushed 7d ago), licensed MIT. It adds 9 tokens to every session and 2,230 once invoked, about $0.0000 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-08-30.
Other commands, from other repositories
commit-all
Group all changes semantically and commit each group separately.
commit
Create a local git commit for source skills without pushing.
commit
Create a Conventional Commit with signoff.
session-report
Capture what changed this session and why, scoped to the current branch. Read by ship verbs when synthesizing the commit message; deleted after a successful commit.
commit
智能创建 git 提交,分析代码变更并生成符合项目规范的提交信息.
push
Validate and push commits with lint, type, and build checks.