Lean zettelkasten
APM-installable agent skills for Lean 4 and Mathlib4 — proof tactics, math domains, review and research workflows, generic tooling.
npx -y skills add r-irbe/proof-skills --skill lean-zettelkastenAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
USE FOR: creating fleeting/literature/permanent ZK notes during Lean proof reviews, linking notes bidirectionally, running synthesis after a council session, detecting orphan and island notes, maintaining `_index.md` and `_tags.md`. DO NOT USE FOR: running the review council itself (use @lean-review-council), reviewing a single proof (use @lean-proof-review), updating external papers from results (use @lean-doc-improvement), authoring the review methodology retro (use @lean-retro-methodology), generating a project blueprint (use @lean-blueprint). TRIGGERS: zettel, ZK-, fleeting note, permanent note, synthesis.
SKILL.md
6.0 KB, as published. Nobody here has run it
lean-zettelkasten
Cold-tier skill — invoked explicitly by name (
@lean-zettelkasten) from review and synthesis flows. No MANDATORY preamble: the gates in §Behavioural rules are advisory and reviewed at synthesis time rather than per-note. Persist is still required (FSIA-R-11-09) but is local to thedocs/project/lean/docs/zettelkasten/tree.
Routing
- USE FOR: creating a fleeting note from a council observation; creating a literature note when citing lean-pitfalls / Mathlib docs / a paper; promoting a cluster of ≥3 notes to a permanent note via the Synthesizer; bidirectional linking (
Related,Contradicts,Supports,Supersedes); running orphan / island / contradiction / staleness / coverage scans; updating_index.mdand_tags.md. - DO NOT USE FOR: running the review council itself (use
@lean-review-council); reviewing a specific proof (use@lean-proof-review); updating external papers from Lean results (use@lean-doc-improvement); authoring the council retro / methodology (use@lean-retro-methodology); generating a project blueprint (use@lean-blueprint). - TRIGGERS: zettel, ZK-, fleeting note, permanent note, synthesis.
Behavioural rules (G-*)
- G-1 (MUST): Every note MUST use the
ZK-YYYYMMDD-NNNID grammar, withNNNsequential within that date. [Trace: AC-01] - G-2 (MUST): Every note MUST declare
Type,Created,Author,Source, and at least one tag. [Trace: AC-02] - G-3 (SHOULD): Fleeting notes SHOULD remain minimal — capture the observation; do not perfect prose. [Trace: AC-03]
- G-4 (MUST): A permanent note MUST link to all source fleeting/literature notes it synthesises, and the sources MUST be marked
superseded. [Trace: AC-04] - G-5 (MUST NOT): The skill MUST NOT promote a cluster to a permanent note unless ≥3 source notes converge on the pattern. [Trace: AC-05]
- G-6 (SHOULD): The skill SHOULD propose a downstream
@lean-proof-reviewor@lean-quality-engineskill update when a permanent note implies a methodology change. [Trace: AC-06]
Workflow
- Discover [discover] — read the triggering event (council session, new literature citation, scheduled scan). Locate
_index.md, current note counts, recent tag activity. - Plan [discover] — pick note type (fleeting / literature / permanent) or scan type (orphan / island / contradiction / staleness / coverage). For permanent promotion, verify ≥3 source notes (G-5). STOP if cluster size < 3 and downgrade to literature note.
- Execute [execute] — write the note(s) under the correct directory (
fleeting/,literature/, orpermanent/<category>/); establish bidirectional links; flag contradictions for SDR. - Verify [validate] — re-check ID uniqueness, link reciprocity, tag presence (G-1, G-2). Max 3 re-checks then escalate.
- Persist [persist] — commit the new/updated notes, update
_index.mdand_tags.md, and (if applicable) open a skill-update proposal for@lean-proof-reviewor@lean-quality-engine(G-6). Persist is local todocs/project/lean/docs/zettelkasten/.
Recovery & STOP
- Permanent-note promotion attempted with < 3 source notes → STOP, downgrade to literature note (G-5).
- Contradiction detected during synthesis → STOP this synthesis pass; emit a fleeting note flagging both sides for SDR.
- Orphan scan returns > 10 % of notes orphaned → STOP, hand off to
@lean-retro-methodologyfor a knowledge-coverage retro. - Confidence < 80 % on which category a permanent note belongs in (
tactics/,pitfalls/,conventions/,cross-module/,proofs/) → STOP, ask.
Handoffs
- Predecessors / successors: see FM
handoffs. Inbound:@lean-proof-review,@lean-review-council,@lean-retro-methodology, and@lean-proof(post-proof pattern capture) seed fleeting notes. Outbound:@lean-doc-improvementconsumes permanent notes that imply paper updates;@lean-quality-engineconsumes permanent notes that imply skill or methodology changes. - Source spec:
specs/lean/zettelkasten/requirements.md— every G-rule traces to an AC there. - Related ADRs: ADR-0076 (skill-as-contract), ADR-0080 (handoff DAG), ADR-0079 (cold-tier loading rationale).
Common failure modes
AI agents commonly: over-polish fleeting notes (defeats the speed of capture); promote 1–2-note clusters to permanent notes; create permanent notes without back-linking the sources or marking them
superseded; silently resolve a contradiction instead of flagging it for SDR; skip_index.mdand_tags.mdupdates so the graph view rots. Full registry:GUARDRAILS.md §Agent failure taxonomy.
See also
- This
SKILL.mdis the canonical v2 zettelkasten contract for this package. ../../zettelkasten/_index.md— live ZK index this skill maintains.../lean-doc-feedback/SKILL.md— v2 sibling on the documentation side of the DAG.
Gives 0 of the 12 instructions most note taking skills give
Counted across 686 of the 876 authors here whose files we hold, read 2026-08-06
- include a visual element on every slidein 44 of 686, across 13 files
- use wikilinks for internal vault linksin 35 of 686, across 11 files
- commit to a single visual motif across every slidein 34 of 686, across 9 files
- read pptxgenjs guide before creating presentations from scratchin 30 of 686, across 6 files
- keep 0.5 inch minimum marginsin 30 of 686, across 7 files
- use subagents to visually inspect rendered slidesin 30 of 686, across 6 files
- re-verify affected slides after every fixin 27 of 686, across 5 files
- run content QA checks before declaring successin 26 of 686, across 3 files
- Use Markdown links for external URLs onlyin 26 of 686, across 10 files
- pick a bold topic specific color palettein 24 of 686, across 2 files
- read editing guide before editing existing presentationsin 23 of 686, across 1 file
- use one dominant color across all slidesin 23 of 686, across 1 file
Said here and by no other author read
- use sequential ID grammar on every note
- declare required metadata fields on every note
- keep fleeting notes minimal
- link permanent notes to all synthesised source notes
- mark synthesised source notes as superseded
- require at least three source notes for permanent promotion
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once.