scottnarmstrong/leanautoformalizationskills/lean-search-discovery
Claude Code and agent skill by scottnarmstrong/leanautoformalizationskills
- community
Checking that the SKILL.md file is still in the repository.
Use when searching Mathlib for existing declarations, likely theorem names, relevant files, or proof ingredients before attempting a new Lean proof.
Install
npx vskill@latest install scottnarmstrong/leanautoformalizationskills/lean-search-discoverySKILL.md
Lean Search Discovery
Use this skill when the next bottleneck is not proving a statement from scratch, but finding the right declaration, namespace, import, or existing theorem. The default posture is: search before you prove.
Search Workflow
- Decide what you are searching for.
- a theorem name
- a namespace or file
- a rewrite lemma
- a theorem with a recognizable type signature
- Predict likely names from Mathlib conventions.
- use conclusion-driven names such as
foo_of_bar - translate symbols into name fragments like
mem,inter,union,nonneg,inj
- Search locally first.
- inside Lean:
exact?,apply?,rw?,simp?,#check,#print - in the terminal:
rg,find,ls, targeted file inspection
- Verify every hit before using it.
- confirm the statement shape
- confirm the namespace and import path
- confirm the lemma is at the right level of generality
- Only after two or more search strategies fail should you assume the theorem is missing and start proving it yourself.
Local Search Rules
- Prefer
rgin.lake/packages/mathlib/Mathlibfor terminal search. - Search both likely names and nearby concepts.
- Limit output aggressively so inspection stays local and readable.
- After a hit, read the surrounding file rather than trusting the name alone.
In-Proof Search Rules
exact?is for “this goal should be one lemma.”apply?is for “this looks like the head of a useful theorem.”rw?is for normal-form mismatches.simp?is for turning exploratory simplification into explicitsimp only [...].- None of these should remain in finished code.
Online Search
If online access is available, use Loogle or LeanSearch when local name search is not enough. Treat them as discovery tools, not proof authorities: always verify the result locally with #check, #print, or direct file inspection.
References
- Read references/search-and-discovery.md for the full search workflow, theorem-name heuristics, and search-service guidance.
- Read references/tools.md when choosing between search tactics, terminal search, API docs, and broader workflow tools.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/lean-search-discovery/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/scottnarmstrong/leanautoformalizationskills/lean-search-discovery)