skills/python/boy-scout/SKILL.md
Use when fixing, editing, changing, debugging, or working with any Python code. Applies the Boy Scout Rule—always leave code cleaner than you found it. Orchestrates other clean code skills as needed.
npx skillsauth add ertugrul-dmr/clean-code-skills boy-scoutInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
"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
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:
Every time you touch code, look for at least one small improvement:
clean-namesclean-commentsclean-functionsclean-generalclean-tests# 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 and leave.
# Leave it cleaner:
TAX_RATE = 0.0825
def process_positive_values(
values: list[float],
apply_tax: bool = False
) -> list[float]:
"""Filter positive values, optionally applying tax."""
rate = 1 + TAX_RATE if apply_tax else 1
return [v * rate for v in values if v > 0]
What changed:
This skill coordinates with specialized skills based on what you're doing:
| Task | Trigger Skill |
|------|---------------|
| Writing/reviewing any Python | python-clean-code (master) |
| Naming variables, functions, classes | clean-names |
| Writing or editing comments | clean-comments |
| Creating or refactoring functions | clean-functions |
| Reviewing code quality | clean-general |
| Writing or reviewing tests | clean-tests |
Don't:
Do:
When working on code:
x to results for clarity")When reviewing code:
python-clean-code for comprehensive rule checkingEvery piece of code you touch gets a little better. Not perfect—just better.
Over time, better compounds into excellent.
development
Use when fixing, editing, changing, debugging, or working with any Python code. Applies the Boy Scout Rule—always leave code cleaner than you found it. Orchestrates other clean code skills as needed.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.