scottnarmstrong/leanautoformalizationskills/lean-search-discovery

Claude Code and agent skill by scottnarmstrong/leanautoformalizationskills

Trust tier 3
  • community
Source check pending

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-discovery

SKILL.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

  1. Decide what you are searching for.
  • a theorem name
  • a namespace or file
  • a rewrite lemma
  • a theorem with a recognizable type signature
  1. 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
  1. Search locally first.
  • inside Lean: exact?, apply?, rw?, simp?, #check, #print
  • in the terminal: rg, find, ls, targeted file inspection
  1. 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
  1. Only after two or more search strategies fail should you assume the theorem is missing and start proving it yourself.

Local Search Rules

  • Prefer rg in .lake/packages/mathlib/Mathlib for 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 explicit simp 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

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/scottnarmstrong/leanautoformalizationskills/lean-search-discovery/badge)](https://verified-skill.com/skills/scottnarmstrong/leanautoformalizationskills/lean-search-discovery)

Something wrong with this skill or its page? Tell us.