AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Write Lean Code

skill-cboone-agent-harness-plugins-write-lean-code · by cboone

>-

No reviews yet
0 installs
32 views
0.0% view→install

Install

$ agentstack add skill-cboone-agent-harness-plugins-write-lean-code

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-cboone-agent-harness-plugins-write-lean-code)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Write Lean Code? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Write Lean Code

Core Principles

  1. Type-driven development: let the type system guide implementation; express invariants in types
  2. Leverage Mathlib: use existing theorems, definitions, and tactics before building from scratch
  3. Tactic proofs for incremental feedback: prefer tactic mode for complex proofs; use the VS Code infoview for step-by-step development
  4. Clarity and composability: write small, focused lemmas; name them to be discoverable via exact? and apply?

Workflow

  1. In a fresh clone or worktree, run the project's documented bootstrap script before any direct lake build. Mathlib must come from lake exe cache get (prebuilt artifacts), not a local source compilation.
  2. After bootstrap has succeeded in the current worktree, run lake build to check compilation; run project linters if available.
  3. Update the tests in the same change as the proof code if the project has a test suite that mirrors the proof code. Whenever you add, rename, restate, or delete anything on a module's public surface, update the matching test file in the same change. Treat the test suite as part of the proof code, not an optional extra. For the compile-time, example-based regression style those test modules typically use (import discipline, 1:1 naming mirror, composition per milestone, anti-patterns), invoke the companion write-lean-tests skill; references/comprehensive/build-infrastructure.md covers the testDriver / defaultTargets wiring side.
  4. Before declaring a proof change finished, run the project's full local check (build + tests + any proof-boundary or lint checks the project defines).
  5. Review against essential checklist: references/essential/checklist.md
  6. 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// 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.

Valid Lean references, in priority order: (1) the project's own code, (2) Mathlib under the project's Mathlib package path (search for both theorem and lemma declarations -- Mathlib uses both), (3) Lean core, and (4) the published documentation linked in the Sources section below.

Mathlib build policy: never use lake build as the first command in a clean worktree or clone. The supported bootstrap path runs lake update, downloads prebuilt Mathlib artifacts with lake exe cache get, verifies those artifacts exist, and only then builds the local libraries. If Mathlib artifacts are missing, rerun the project's bootstrap script rather than letting Lake compile Mathlib from source.

Reference Navigation

Quick reviews (default):

  • references/essential/checklist.md: condensed, actionable rules

Deep dives by topic:

  • references/comprehensive/naming.md: identifiers, types, lemmas, files, Mathlib naming scheme
  • references/comprehensive/style-and-formatting.md: indentation, imports, operators, sections
  • references/comprehensive/proof-style.md: tactic vs term mode, structured proofs, automation, exploration tactics
  • references/comprehensive/mathlib.md: documentation (module docstrings, tactic docs, citations, linting), variable conventions, API design, heartbeats
  • references/comprehensive/mathlib-api-discovery.md: finding lemmas, navigating the module hierarchy, search strategies, common lookup patterns
  • references/comprehensive/general-programming.md: type classes, monads, pattern matching, dependent types, IO, lake
  • references/comprehensive/build-infrastructure.md: bootstrap script, Makefile target set, lintDriver, entrypoint manifest, testDriver vs defaultTargets, and test-library discipline for Mathlib-downstream projects
  • references/comprehensive/pfr-downstream.md: finite-alphabet specialization, noncomputable def + volume_tac, measurability hygiene, and anonymous-constructor pair notation for projects built on PFR's entropy API
  • references/comprehensive/metaprogramming.md: macros, custom tactics, syntax, elaboration, monad hierarchy

Sources

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.