From all-skills
Use this skill when writing or reviewing code to ensure changes are minimal, clear, and spec-aligned. Catches scope creep in code, removes unnecessary additions, and enforces repo standards. Trigger during code review or before committing changes.
npx claudepluginhub oxhagolli/clawdskillz --plugin setup-skillsThis skill uses the workspace's default tool permissions.
Every line of code is a liability. Write the minimum needed to meet the spec. No more.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Every line of code is a liability. Write the minimum needed to meet the spec. No more.
Ask:
For every addition, ask:
Is this in the spec?
├── Yes → Keep it
└── No → Why is it here?
├── Required for spec to work → Document why, keep it
└── Nice to have → Remove it
Red flags:
Remove:
// Unnecessary wrapper
function getUser(id) {
return fetchUser(id) // Just call fetchUser directly
}
// Premature abstraction
const CONFIG = { timeout: 5000 } // If only used once, inline it
// Over-documented
/** Gets the user by ID */ // The function name says this
function getUserById(id) { ... }
// Defensive code for impossible cases
if (user && user.id && user.id !== null) { // If user always has id, trust it
Keep:
// Direct implementation
const user = await db.users.find(id)
// Inline values used once
await fetch(url, { timeout: 5000 })
// Code that explains non-obvious behavior
// Retry needed because API returns 500 on first cold start
await retry(() => api.call(), { attempts: 3 })
Before approving, verify:
How to check:
1. Find similar code in the repo
2. Compare patterns side-by-side
3. Match exactly, don't "improve" conventions
Before finalizing:
When reviewing code:
## Scope Review
**Spec requirement**: [what was asked]
**Additions beyond spec**:
- [item] - Needed? [yes/no] - Why: [reason]
**Recommended removals**:
- [line/block] - Reason: [not in spec / unused / over-abstracted]
## Standards Review
**Matches repo**: [yes/no]
**Deviations found**:
- [pattern] - Repo does [X], this code does [Y]
- Fix: [how to align]
## Final Assessment
- [ ] Minimum code for spec
- [ ] No speculative additions
- [ ] Matches repo conventions
- [ ] Every line justified
| What | Why it's wrong | Fix |
|---|---|---|
| Adding types "for safety" | Not in spec, adds maintenance | Remove or justify |
| Creating utils/helpers | Abstraction for one use | Inline the code |
| Extra error handling | Handling impossible states | Trust the system |
| Config objects | Flexibility nobody asked for | Hardcode values |
| JSDoc on clear functions | Docs that repeat the code | Remove |
| "Improvement" refactors | Wasn't asked for | Revert |
Be ruthless, not rude. Point out what to remove without judgment.
Match, don't improve. If repo has inconsistent style, match the local file, don't start a new convention.
Spec is law. If it's not in the spec and not required for the spec to work, it doesn't belong.
Stay in your lane. Don't cover: