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.
npx claudepluginhub thebushidocollective/han --plugin coreThis skill is limited to using the following tools:
> "Leave the campground cleaner than you found it."
Improves working code: simpler structures, clearer names, idiomatic alternatives, dead code removal, abstraction adjustments. Includes before/after diffs, why better, trade-offs, confidence levels.
Refactors code to improve structure, readability, and maintainability while preserving behavior. Guides test-driven cycle, checklists, and patterns like extract function.
Safely refactors code using tests to improve readability, cohesion, and maintainability without changing behavior. Triggers on 'refactor', 'clean up code', 'simplify', 'reduce complexity', 'technical debt'.
Share bugs, ideas, or general feedback.
"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