install

A setup procedure for installing and preparing the lean-interact proof workspace on a new machine or fresh repository copy. It checks required tools and runs the setup steps in order.

In plain words
What is it for?
Use it for a first installation, a fresh clone, checking prerequisites, or getting the workspace ready to compile Lean proofs.
Why use it?
It prevents incomplete installation problems from appearing later as confusing mathematics or proof errors. It also defines checks for stopping when setup results are unexpected.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/nasqret/lean-interact/install
Any agent
npx skills add nasqret/lean-interact --skill install
Clone the repo
git clone --depth 1 https://github.com/nasqret/lean-interact

Made for: Claude Code, Codex.

Per session 221 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,658 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00221 $0.06658
Opus 5 $0.00111 $0.03329
Sonnet 5 $0.00044 $0.01332
Haiku 4.5 $0.00022 $0.00666

Measured 2d ago against content hash 85f81c7856c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

install scanned grade C with 2 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 2d 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl https://elan.lean-lang.org/elan-init.sh -sSf | sh

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl https://elan.lean-lang.org/elan-init.sh -sSf | sh
.claude/skills/install/SKILL.md · 510 lines

How it starts

The opening of the file, as written. The whole thing — 510 lines — stays where its author put it; the contents beside it link to each section on GitHub.

install

Bring a fresh clone of lean-interact to the point where the user can type a sentence of ordinary mathematics and watch it compile. Repository root: /path/to/lean-interact — the directory this clone lives in. Use absolute paths when reading and editing files, but run every command below from the repository root with the repo-relative paths as written: that is the form .claude/settings.json allows without a permission prompt.

Run the steps in order. Each step has a command and a stated correct result. Do not advance past a step whose result does not match. A half-installed harness fails later in ways that look like mathematics problems rather than install problems, which is expensive.

Standing rules for this procedure

  1. Report before you change. Do the whole of step 1 and tell the user what is missing before installing anything.
  2. Never start a Mathlib build from source. The pins exist precisely to prevent it. If lake starts compiling Mathlib, that is a stop-and-diagnose condition, not a wait.
  3. One lake at a time. lake takes a lock on .lake/. While lake update or lake exe cache get is in flight, run no other lake command and read or write nothing under .lake/.
  4. Do not run the elan installer for the user. See step 2 for why.
  5. No pip installs. All runtime tooling in tools/ is Python 3 standard library only. The only optional pip package anywhere near this project is jupyter-book, which builds book/ and is not part of the harness.

Rough budget on a good link: minutes for steps 1-2, tens of minutes for step 3 (a few GB of download), a few minutes for steps 4-6 (most of it lake build NtLean). Say this up front so the user knows what they are committing to.


1. PRE-FLIGHT

Detect the platform and inventory the tools. Change nothing in this step.

uname -s                                    # Darwin or Linux
uname -m                                    # arm64, x86_64
command -v elan lean lake git python3       # the required set
python3 -c 'import sys; print(sys.version.split()[0], sys.version_info >= (3,10))'
command -v tmux jq ssh jupyter-book         # the optional set
ls "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code" 2>/dev/null

Read the full file on GitHub · 510 lines

Changes

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.

  1. 2d ago First seen · 510 lines · 221 tokens per session scan C 85f81c7856c8

Subscribe to this mod's changes

install is a skill published in the GitHub repository nasqret/lean-interact (10 stars, last pushed 24d ago), licensed MIT. It adds 221 tokens to every session and 6,658 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

screen

Screen informal↔Lean 4 statement pairs for faithfulness defects. Use whenever writing, editing, translating, or reviewing Lean 4 theorem or definition statements that are meant to formalize informal mathematics: after drafting a statement, before committing formalizations, when auditing a benchmark file, or when the…

ibrahimmian36/leanscreen · 0 tokens

mathlib-api

Evidence-driven workflow for designing a Mathlib definition and the API around it. Use when adding a new structure/def intended for mathlib; when choosing between design alternatives (index type as field vs parameter, Set vs indexed family, coarse set vs finer indexed structure and when the fine one should exist at…

homeowmorphism/mathlib-api · 234 tokens

lean-probe

Fast Lean 4 proof verification for coding agents via the LeanProbe MCP server's warm REPL. Use when you need to know whether Lean 4 code compiles (no errors, no sorry), iterate on a declaration inside a Lake/Mathlib project, test a replacement proof candidate, or explore a goal tactic by tactic — far faster than lake…

epfl-lara/LeanProbe · 139 tokens

audit-public-operation-contracts

Audit new or existing Jacobian mathematical operations for public-domain mismatches, hidden work expansion, evidence-backed scale or backend improvements, lossy exact results, source-unbound conclusions, and producer-consumer incompatibility. Use for operation-contract reviews, mathematical performance investigations…

morluto/jacobian · 80 tokens

learn-from-math-agent-trajectories

Review completed or paused mathematical agent transcripts, visible reasoning, code, searches, tool calls, corrections, and final claims to extract evidence-backed lessons for Jacobian operations, discovery, contracts, skills, evaluations, and documentation. Use for mathematical workflow retrospectives and "what should…

morluto/jacobian · 87 tokens

decompose-mathematical-solution-corpora

Decompose a bounded corpus of mathematical proofs, formalizations, scripts, and certificates into recurring solution techniques and the smallest reusable Jacobian postconditions. Use for repository- or corpus-level “what can Jacobian learn?” audits; do not use for one operation contract or one agent trajectory.

morluto/jacobian · 69 tokens