scottnarmstrong/leanautoformalizationskills/lean-learnings

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.

Reusable Lean 4 and Mathlib lessons for analysis formalizations. Use when choosing an ambient carrier or repository layout, debugging elaboration and typeclass costs, preserving constant dependencies, or looking for recurring proof and API patterns.

Install

npx vskill@latest install scottnarmstrong/leanautoformalizationskills/lean-learnings

SKILL.md

Lean Learnings

Use these empirical lessons as hypotheses to test, not as universal policy. Check the repository's own instructions, inspect the definitions and imports in the current version of Mathlib, profile before changing architecture, and A/B any performance intervention.

Reference map

SituationReference
Organizing modules, imports, and namespacesreferences/repo_structure_policy.md
Diagnosing expensive carriers, instances, or large proofsreferences/Lean4_EuclideanSpace_Elaboration_Guide.md
Planning an analysis, PDE, or probability developmentreferences/dos_and_donts.md
Constant dependencies, quantifiers, Mathlib idioms, and proof shapesreferences/lean_learnings.md
Variational PDE, multiscale, Besov, locality, concentration, and compiler-gate recipesreferences/advanced_analysis_patterns.md

Working principles

  • Treat the dependency set and quantifier order of every public constant as part

of the theorem. Audit types and instance arguments as well as named binders.

  • Keep source statements, source dependency topology, Lean declarations, and

Lean proof status distinct. A source dependency graph records source topology; it does not certify a Lean proof.

  • Do not add axioms, placeholders, or proof-step hypotheses to make a theorem

elaborate. Preserve the mathematical statement and change the proof or API.

  • Profile the dominant phase before restructuring. Narrow imports, helper

extraction, explicit arguments, local instance caches, and carrier changes address different causes.

  • Treat EuclideanSpace, direct Pi types, bundled Lp, and bare functions as

design choices with different APIs and elaboration costs. Change carriers only after checking the mathematics, downstream API, and measured cost.

  • Keep nonlinear and transcendental expressions opaque while proving small

algebraic side lemmas. Prefer controlled rewriting and minimal automation.

  • Preserve dependency build artifacts according to the current repository's

build policy. Never turn a project-specific cache rule into a general Lake command.

  • Record a reproducible lesson: Lean/Mathlib version, minimal trigger, measured

symptom, intervention, and an A/B check.

Related skills

  • lean-workflow — router for choosing the appropriate Lean workflow
  • lean-project-architecture — declarations, module boundaries, and reusable APIs
  • lean-proof-patterns — stable translations from mathematics to Lean proofs
  • lean-search-discovery — finding existing Mathlib declarations
  • lean-elaboration — profiling and improving elaboration performance
  • lean-statement-audit — source, binder, semantics, consumption, and axiom checks
  • build-proof-dependency-graph — source-level dependency topology

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

Repository stars
50
Repository forks
7
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. 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-learnings/badge)](https://verified-skill.com/skills/scottnarmstrong/leanautoformalizationskills/lean-learnings)

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