/engineering-discipline:rob-pikefrom engineering-discipline
Applies Rob Pike's 5 Rules to prevent premature optimization and enforce measurement-driven development. Activates on performance-related requests.
Ships in engineering-discipline. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Before asking "have you measured?", determine whether measurement is even possible right now.
Scan the codebase for signs of existing instrumentation:
Then ask the user:
The goal is NOT to prescribe a specific tool — Claude already knows the right profiling approach for the language. The goal is to make sure measurement exists before any optimization conversation continues. If there is nothing to measure with, the first action is adding instrumentation, not changing code.
Stop and ask these questions in order:
When you catch yourself or the user doing any of these, STOP and redirect:
| Impulse | Rule violated | Response |
|---|---|---|
| "This loop looks slow, let me optimize it" | Rule 1 | Have you profiled? The bottleneck may be elsewhere entirely. |
| "Let me add a cache here" | Rule 2 | Measure first. Does this path actually dominate runtime? |
| "Let me use a B-tree / trie / skip list" | Rule 3 | What's n? If small, a sorted slice + binary search wins. |
| "Let me implement a custom allocator" | Rule 4 | Start simple. Measure. Only get fancy if data forces you. |
| "The algorithm is O(n²), needs fixing" | Rule 3 | What's n? O(n²) with n=100 is 10μs. Measure first. |
| "Let me parallelize this" | Rule 2 | Is this actually CPU-bound? Measure. Often it's I/O. |
Proceed with optimization only when ALL of these are true:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub tmdgusya/engineering-discipline --plugin engineering-discipline11 skills in this plugin
/clarificationUse when a user's request is vague, ambiguous, or underspecified. Explores the codebase first, then runs an iterative Q&A loop grounded in the findings until ambiguity is gone. Outputs a clear, well-scoped context brief so the user can plan sharply. Triggers on "I want to...", "I need...", "let's build...", "can you help me...", "we should...", or any request where the full scope isn't immediately clear./clean-ai-slopCorrective cleanup of AI-generated code — removes LLM-specific patterns while preserving behavior. Use when the user says "deslop", "slop", "clean AI code", "remove AI patterns", or when you spot LLM-generated code smells after any generation session. For general post-change review and fixes ("clean up", "simplify"), use the simplify skill instead./Other plugins' skills for the same job