Token导航 LogoToken导航TokenDH.com
开发权限需确认github未标认证来源可访问许可证需确认审计通过

boy-scout童子军

Agent Skill

boy-scout 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

599

周安装

24

GitHub Stars

39

下载量

194
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:boy-scout(童子军)
来源仓库:https://github.com/ertugrul-dmr/clean-code-skills
仓库路径:skills/boy-scout
安装命令:
npx skills add https://github.com/ertugrul-dmr/clean-code-skills --skill boy-scout
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/ertugrul-dmr/clean-code-skills --skill boy-scout

简介

Boy Scout Rule 倡导每次修改代码时都应留下比原来更整洁的状态。

  • 适用于持续改进代码质量和团队协作维护系统的场景。
  • 每次触碰代码时至少寻找一处小改进:清理注释、修复命名或简化逻辑。
  • 不要求完美重构,只需渐进优化避免软件退化。boy-scout 属于开发类 Skill,可作为该场景下的辅助能力补充。
  • 该原则有助于培养团队责任感并提升整体代码健康度。

SKILL.md

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

# 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:

  • ✅ Descriptive function name (N1)
  • ✅ Clear parameter names (N1)
  • ✅ Type hints (P3)
  • ✅ Named constant for magic number (G25)
  • ✅ No output argument mutation (F2)
  • ✅ Useful docstring (C4)

Skill Orchestration

This skill coordinates with specialized skills based on what you're doing:

TaskTrigger Skill
Writing/reviewing any Pythonpython-clean-code (master)
Naming variables, functions, classesclean-names
Writing or editing commentsclean-comments
Creating or refactoring functionsclean-functions
Reviewing code qualityclean-general
Writing or reviewing testsclean-tests

The Mindset

Don't:

  • Leave code worse than you found it
  • Say "that's not my code"
  • Wait for a dedicated refactoring sprint
  • Make massive changes unrelated to your task

Do:

  • Make one small improvement with every commit
  • Fix what you see, even if you didn't break it
  • Keep changes proportional to your task
  • Leave a trail of quality improvements

AI Behavior

When working on code:

  1. Complete the requested task first
  2. Identify at least one small cleanup opportunity
  3. Apply the appropriate specialized skill
  4. Note the improvement made (e.g., "Also cleaned up: renamed x to results for clarity")

When reviewing code:

  1. Load python-clean-code for comprehensive rule checking
  2. Flag violations by rule number
  3. Suggest incremental improvements, not complete rewrites

The Boy Scout Promise

Every piece of code you touch gets a little better. Not perfect—just better.

Over time, better compounds into excellent.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

39.2%
按下载量换算76

Claude

26.88%
按下载量换算52

Cursor

18.73%
按下载量换算36

Gemini CLI

8.41%
按下载量换算16

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills