boy-scoutlisted
Install: claude install-skill phanijapps/memex
# The Boy Scout Rule
> "Always leave the campground cleaner than you found it."
> — Robert Baden-Powell
> "Always check a module in cleaner than when you checked it out."
> — Robert C. Martin, *Clean Code*
## The Philosophy
You don't have to make every module perfect. You simply have to make it **a little bit better** than when you found it.
If we all followed this simple rule:
- Our systems would gradually get better as they evolved
- Teams would care for the system as a whole
- The relentless deterioration of software would end
## When Working on Code
Every time you touch code, look for **at least one small improvement**:
### Quick Wins (Do These Immediately)
- Rename a poorly named variable → triggers `clean-names`
- Delete a redundant comment → triggers `clean-comments`
- Remove dead code or unused imports
- Replace a magic number with a named constant
- Extract a deeply nested block into a well-named function
### Deeper Improvements (When Time Allows)
- Split a function that does multiple things → triggers `clean-functions`
- Remove duplication (DRY) → triggers `clean-general`
- Add missing boundary checks
- Improve test coverage → triggers `clean-tests`
## The Rule in Practice
```python
# You're asked to fix a bug in this function:
def proc(d, x, flag=False):
# process data
for i in d:
if i > 0:
if flag:
x.append(i * 1.0825) # tax
else:
x.append(i)
return x
# Don't just fix the bug