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.
npx agentmods add commands/cameronfreer/lean4-skills/diagnosegit clone --depth 1 https://github.com/cameronfreer/lean4-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/cameronfreer/lean4-skills/diagnose)<a href="https://agentmods.dev/commands/cameronfreer/lean4-skills/diagnose"><img src="https://agentmods.dev/badge/commands/cameronfreer/lean4-skills/diagnose.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00010 | $0.03123 |
| Opus 5 | $0.00005 | $0.01562 |
| Sonnet 5 | $0.00002 | $0.00625 |
| Haiku 4.5 | $0.00001 | $0.00312 |
Grade C, and why
diagnose scanned grade C with 1 finding 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 6d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
- Default: Report findings, show `rm -rf` commands, do NOT execute How it starts
The opening of the file, as written. The whole thing — 289 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Lean4 Diagnostics
Diagnostics, troubleshooting, and migration assistance for the Lean4 plugin.
Usage
/lean4:diagnose # Full diagnostic (plugin + workspace)
/lean4:diagnose env # Environment only
/lean4:diagnose migrate # Detect legacy installs (read-only)
/lean4:diagnose migrate --global # Include user-level ~/.claude scan
/lean4:diagnose cleanup # Show stale files + removal commands
/lean4:diagnose cleanup --apply # Actually remove stale files
/lean4:diagnose <pasted error> # Error triage: match against known patterns
Inputs
| Arg | Required | Description |
|---|---|---|
| mode | No | env, migrate, cleanup, or full (default) |
| --global | No | Include user-level paths (~/); migrate only |
| --apply | No | Execute removals; cleanup only |
| error text | No | Positional text whose first token is not a recognized mode is treated as pasted diagnostic text for error triage |
Dispatch is decided by the first positional token only:
- a recognized mode (
env,migrate,cleanup) or no positional token → existing mode behavior (default full diagnostic when absent); - otherwise → treat the positional text as pasted diagnostic input for error triage.
Mode-specific flags (--global, --apply) remain flags in every case — they are never treated as error text.
Error triage precedence: pasted text is matched against the specific patterns in compilation-errors.md (Quick Reference Table first), including the module-system patterns below, before falling back to the generic Build fails → lake update && lake clean && lake build row. A specific match wins over the generic remediation.
Actions
1. Environment Check
| Tool | Check | Required |
|---|---|---|
lean |
lean --version |
Yes |
lake |
lake --version |
Yes |
python3 |
python3 --version |
For scripts |
git |
git --version |
For commits |
rg |
rg --version |
Optional (faster search) |
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.
- 6d ago First seen · 289 lines · 10 tokens per session scan C 363b5aa15877
diagnose is a command published in the GitHub repository cameronfreer/lean4-skills (430 stars, last pushed yesterday), licensed MIT. It adds 10 tokens to every session and 3,123 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
step-research
Always research before proposing a fix. The Untether bug you're chasing is often a known upstream engine quirk, a previously-fixed regression, or a documented config gotcha.
iterate-feature
Iterate on the feature "$ARGUMENTS" to fix issues and address feedback.
qa-changes
This skill should be used when the user asks to "QA a pull request", "test PR changes", "verify a PR works", "functionally test changes", or when an automated workflow triggers QA validation of code changes. Provides a structured methodology for setting up the environment, exercising changed behavior, and reporting…
doctor
Diagnosticar y reparar problemas del framework Don Cheli, git y entorno. Usa cuando el usuario dice "doctor", "problemas del framework", "don cheli no funciona", "repair Don Cheli", "debug setup", "setup broken", "framework broken", "reparar entorno". Detecta y repara issues de configuración, git y dependencias…
fix
Universal debugging and fix application with semantic code analysis.
doctor.es
Diagnostica problemas de inferencia LLM en Mac: asiai doctor verifica el estado de los motores, conflictos de puertos, carga de modelos y estado de la GPU.