lean-profile
Use when Lean elaboration is slow, resource limits are reached or proof performance is explicitly requested.
- License 许可
- GPL-3.0
- 最近更新
- 2026-11-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- lean-profile
- description
- Use when Lean elaboration is slow, resource limits are reached or proof performance is explicitly requested.
03 SKILL.md 正文
Measure and repair elaboration cost
Input: working targets and observed performance problem. Output: comparable before/after measurements, diagnosis and checked changes.
Read profiling recipes. Record the actual toolchain, machine and cache state. Profile the selected files; map expensive commands to declarations. Recheck borderline measurements before claiming a gain.
Diagnose the dominant cost: instance search, simplification, definitional equality, broad automation, metavariable/coercion churn, duplicated terms or kernel replay. Inspect relevant traces or available LSP profiling. Try a focused fix such as a type annotation, explicit lemma or smaller simplifier input. Check the same cause against other slow declarations before inventing new ones.
Keep full statement/definition context fixed and run lean-verify. Do not
silently raise heartbeats, recursion limits or trust assumptions to report a
speedup. A needed configuration change is a separate explicit decision. Remove
temporary profiling wrappers/options from delivered source. Helper extraction
routes through decomposition/refactoring; speculative global instances do not
belong in a local performance edit.
Report measured gains, failed attempts and remaining cost. A longer but faster proof can be the right result; there is no universal one-second requirement.
04 同仓库更多 Skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code
verification-before-completion
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
using-superpowers
Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions
using-git-worktrees
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code