From core
Applies Boy Scout Rule to incrementally improve code quality—remove dead code, fix linting, enhance naming/types/constants—when modifying files, refactoring, or touching legacy code.
How this skill is triggered — by the user, by Claude, or both
Slash command
/core:boy-scout-ruleThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
> "Leave the campground cleaner than you found it."
"Leave the campground cleaner than you found it."
Always leave code better than you found it. Make incremental improvements when you touch a file.
Code Quality:
x, temp, data → descriptive)mix lint && mix test or
yarn test:lint && yarn ts:check && yarn testAdd worker search filter
- Implement location-based filtering
- Add tests for search radius
Boy Scout improvements:
- Extract SEARCH_RADIUS constant
- Add type annotations to helper functions
- Remove unused import statements
- Improve variable naming in search logic
Before:
function calculateTotal(items) { // No types
let t = 0; // Poor naming
for (let i = 0; i < items.length; i++) { // Old-style
t += items[i].price * 1.08; // Magic number
}
return t;
}
After:
const TAX_RATE = 1.08;
function calculateTotal(items: Item[]): number {
return items.reduce((total, item) => {
return total + (item.price * TAX_RATE);
}, 0);
}
Improvements: types, constant, naming, modern syntax, simplified.
During implementation: Make changes, apply boy scout, verify, commit together
During code review: Look for boy scout opportunities, recognize good boy scouting
During bug fixes: Fix bug, improve surrounding code, add tests, clean up
npx claudepluginhub thedotmack/han --plugin coreApplies Boy Scout Rule to incrementally improve code quality—remove dead code, fix linting, enhance naming/types/constants—when modifying files, refactoring, or touching legacy code.
Improves code approach, clarity, and quality with concrete before/after suggestions and tradeoffs. Use when code works but needs a focused second pass.
Identifies and fixes code quality issues—dead code, import organization, type improvements, consistent patterns—without changing functionality.