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 thebushidocollective/han --plugin coreFocuses on improving approach, clarity, and quality of working code. Surfaces simpler structures, clearer names, idiomatic alternatives, dead weight, and abstractions. Provides concrete before/after.
Refactors code to improve structure, readability, and maintainability while preserving behavior. Guides test-driven cycle, checklists, and patterns like extract function.
Refines existing code for clarity, readability, and maintainability without changing behavior, interfaces, or outputs. Use for simplify, clean up, refactor for readability requests.