据 AlphaMoat 统计,截至 2026-10,Clean Code 累计下载 12,732 次、获 26 个星标,按累计下载量在本次参与排名的 10,914 个 AI 技能中排名第 2,192 位,在「开发编程」分类(1,069 个)中排名第 160 位。
列表默认按累计下载量排序,也可按星标排序;详情页排名按累计下载量计算。
| 平台 | 累计下载 | 星标 | 评论 |
|---|---|---|---|
| ClawHub ↗ | 8,355 | 24 | 1 |
| SkillHub ↗ | 1.3万 | 26 | — |
各平台的计数口径不同,统计时间不一致。
技能用单一职责、避免重复、保持简单与不做无用功能等原则约束写法,并规定命名要能自我解释、函数要短小。它还要求改文件时同步改完所有依赖,不允许留下坏掉的引用或遗漏的更新。
资料发布于 2026-10-27
以下是根据技能文档生成的示例,不代表实际运行结果。
2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。
| 月份 | 累计下载 | 环比 | 星标 |
|---|---|---|---|
| 2026-10 | 1.3万 | — | 26 |
| 2026-09 | 9,109 | — | 26 |
| 2026-08 | 8,523 | +9.2% | 26 |
| 2026-07 | 7,806 | — | 23 |
| 2026-05 | 7,914 | — | 23 |
| 2026-03 | 7,247 | — | 23 |
以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。
--- name: clean-code description: Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments allowed-tools: Read, Write, Edit version: 2.0 priority: CRITICAL --- # Clean Code - Pragmatic AI Coding Standards
> **CRITICAL SKILL** - Be **concise, direct, and solution-focused**. --- ## Core Principles | Principle | Rule | |-----------|------| | **SRP** | Single Responsibility - each function/class does ONE thing | | **DRY** | Don't Repeat Yourself - extract duplicates, reuse | | **KISS** | Keep It Simple - simplest solution that works | | **YAGNI** | You Aren't Gonna Need It - don't build unused features | | **Boy Scout** | Leave code cleaner than you found it | --- ## Naming Rules | Element | Convention | |---------|------------| | **Variables** | Reveal intent: `userCount` not `n` | | **Functions** | Verb + noun: `getUserById()` not `user()` | | **Booleans** | Question form: `isActive`, `hasPermission`, `canEdit` | | **Constants** | SCREAMING_SNAKE: `MAX_RETRY_COUNT` | > **Rule:** If you need a comment to explain a name, rename it. --- ## Function Rules | Rule | Description | |------|-------------| | **Small** | Max 20 lines, ideally 5-10 | | **One Thing** | Does one thing, does it well | | **One Level** | One level of abstraction per function | | **Few Args** | Max 3 arguments, prefer 0-2 | | **No Side Effects** | Don't mutate inputs unexpectedly | --- ## Code Structure | Pattern | Apply | |---------|-------| | **Guard Clauses** | Early returns for edge cases | | **Flat > Nested** | Avoid deep nesting (max 2 levels) | | **Composition** | Small functions composed together | | **Colocation** | Keep related code close | --- ## AI Coding Style | Situation | Action | |-----------|--------| | User asks for feature | Write it directly | | User reports bug | Fix it, don't explain | | No clear requirement | Ask, don't assume | --- ## Anti-Patterns (DON'T) | ❌ Pattern | ✅ Fix | |-----------|-------| | Comment every line | Delete obvious comments | | Helper for one-liner | Inline the code | | Factory for 2 objects | Direct instantiation | | utils.ts with 1 function | Put code where used | | "First we import..." | Just write code | | Deep nesting | Guard clauses | | Magic numbers | Named constants | | God functions | Split by responsibility | --- ## 🔴 Before Editing ANY File (THINK FIRST!) **Before changing a file, ask yourself:** | Question | Why | |----------|-----| | **What imports this file?** | They might break | | **What does this file import?** | Interface changes | | **What tests cover this?** | Tests might fail | | **Is this a shared component?** | Multiple places affected | **Quick Check:** ``` File to edit: UserService.ts └── Who imports this? → UserController.ts, AuthController.ts └── Do they need changes too? → Check function signatures ``` > 🔴 **Rule:** Edit the file + all dependent files in the SAME task. > 🔴 **Never leave broken imports or missing updates.** --- ## Summary | Do | Don't | |----|-------| | Write code directly | Write tutorials | | Let code self-document | Add obvious comments | | Fix bugs immediately | Explain the fix first | | Inline small things | Create unnecessary files | | Name things clearly | Use abbreviations | | Keep functions small | Write 100+ line functions | > **Remember: The user wants working code, not a programming lesson.** --- ## 🔴 Self-Check Before Completing (MANDATORY) **Before saying "task complete", verify:** | Check | Question | |-------|----------| | ✅ **Goal met?** | Did I do exactly what user asked? | | ✅ **Files edited?** | Did I modify all necessary files? | | ✅ **Code works?** | Did I test/verify the change? | | ✅ **No errors?** | Lint and TypeScript pass? | | ✅ **Nothing forgotten?** | Any edge cases missed? | > 🔴 **Rule:** If ANY check fails, fix it before completing. --- ## Verification Scripts (MANDATORY) > 🔴 **CRITICAL:** Each agent runs ONLY their own skill's scripts after completing work. ### Agent → Script Mapping | Agent | Script | Command | |-------|--------|---------| | **frontend-specialist** | UX Audit | `python .agent/skills/frontend-design/scripts/ux_audit.py .` | | **frontend-specialist** | A11y Check | `python .agent/skills/frontend-design/scripts/accessibility_checker.py .` | | **backend-specialist** | API Validator | `python .agent/skills/api-patterns/scripts/api_validator.py .` | | **mobile-developer** | Mobile Audit | `python .agent/skills/mobile-design/scripts/mobile_audit.py .` | | **database-architect** | Schema Validate | `python .agent/skills/database-design/scripts/schema_validator.py .` | | **security-auditor** | Security Scan | `python .agent/skills/vulnerability-scanner/scripts/security_scan.py .` | | **seo-specialist** | SEO Check | `python .agent/skills/seo-fundamentals/scripts/seo_checker.py .` | | **seo-specialist** | GEO Check | `python .agent/skills/geo-fundamentals/scripts/geo_checker.py .` | | **performance-optimizer** | Lighthouse | `python .agent/skills/performance-profiling/scripts/lighthouse_audit.py <url>` | | **test-engineer** | Test Runner | `python .agent/skills/testing-patterns/scripts/test_runner.py .` | | **test-engineer** | Playwright | `python .agent/skills/webapp-testing/scripts/playwright_runner.py <url>` | | **Any agent** | Lint Check | `python .agent/skills/lint-and-validate/scripts/lint_runner.py .` | | **Any agent** | Type Coverage | `python .agent/skills/lint-and-validate/scripts/type_coverage.py .` | | **Any agent** | i18n Check | `python .agent/skills/i18n-localization/scripts/i18n_checker.py .` | > ❌ **WRONG:** `test-engineer` running `ux_audit.py` > ✅ **CORRECT:** `frontend-specialist` running `ux_audit.py` --- ### 🔴 Script Output Handling (READ → SUMMARIZE → ASK) **When running a validation script, you MUST:** 1. **Run the script** and capture ALL output 2. **Parse the output** - identify errors, warnings, and passes 3. **Summarize to user** in this format: ```markdown ## Script Results: [script_name.py] ### ❌ Errors Found (X items) - [File:Line] Error description 1 - [File:Line] Error description 2 ### ⚠️ Warnings (Y items) - [File:Line] Warning description ### ✅ Passed (Z items) - Check 1 passed - Check 2 passed **Should I fix the X errors?** ``` 4. **Wait for user confirmation** before fixing 5. **After fixing** → Re-run script to confirm > 🔴 **VIOLATION:** Running script and ignoring output = FAILED task. > 🔴 **VIOLATION:** Auto-fixing without asking = Not allowed. > 🔴 **Rule:** Always READ output → SUMMARIZE → ASK → then fix.
【全栈能力】编程大神.Skill:面向复杂真实项目的高阶全栈编程助手。不止生成代码,而是从一句目标接手陌生代码库,拆解需求、补齐实现、追到根因、完成重构、联调前后端,并把结果推进到能运行、能验证、能交付。覆盖 Web、后端、脚本、iOS、安卓、鸿蒙 ArkUI、微信小程序及其他技术栈,支持中英文工程、疑难 Bug、跨模块任务和长任务续做;用构建、日志、真实入口、设备或接口证据说明结果。仅问概念时直接回答,要求落地时持续推进到验收或明确阻塞。
编程专家 Pro:融合编程专家 2.0.3 工程专题与编程大神的鸿蒙 ArkTS/ArkUI、微信小程序和小游戏开发资料。用于项目实现、根因调试、审查、重构、测试、架构性能分析及多端开发验证。支持自然语言和 @专题标识,按任务读取包内知识;只问概念时直接回答。
编程专家.Skill P8级编程助手,25年实战经验技能Skill,全栈:Java/Php网站/软件项目、API设计、Bug诊断、代码生成、代码审查、重构、测试用例、性能基准、技术选型、文档生成、任务拆解、Spec驱动、Karpathy规范、CMS二次开发、前端设计、MySQL/Mariadb、项目知识图谱,以及工程纪律层(根因调试硬闭环、阶段导航、事故复盘/SLO、威胁建模/供应链安全、生产就绪/渐进式发布、AI编码治理、面向Agent代码可读性、LLM应用安全)。支持 @标识 显式调用跳过路由。
编程专家.Skill P8级编程助手,25年实战经验技能Skill,全栈:Java/Php网站/软件项目、API设计、Bug诊断、代码生成、代码审查、重构、测试用例、性能基准、技术选型、文档生成、任务拆解、Spec驱动、Karpathy规范、CMS二次开发、前端设计、MySQL/Mariadb、项目知识图谱,以及工程纪律层(根因调试硬闭环、阶段导航、事故复盘/SLO、威胁建模/供应链安全、生产就绪/渐进式发布、AI编码治理、面向Agent代码可读性、LLM应用安全)。支持 @标识 显式调用跳过路由。
编程专家 Pro:融合编程专家 2.0.3 工程专题与编程大神的鸿蒙 ArkTS/ArkUI、微信小程序和小游戏开发资料。用于项目实现、根因调试、审查、重构、测试、架构性能分析及多端开发验证。支持自然语言和 @专题标识,按任务读取包内知识;只问概念时直接回答。
编程专家 Pro:融合编程专家 2.0.3 工程专题与编程大神的鸿蒙 ArkTS/ArkUI、微信小程序和小游戏开发资料。用于项目实现、根因调试、审查、重构、测试、架构性能分析及多端开发验证。支持自然语言和 @专题标识,按任务读取包内知识;只问概念时直接回答。
编程专家.Skill P8级编程助手,25年实战经验技能Skill,全栈:Java/Php网站/软件项目、API设计、Bug诊断、代码生成、代码审查、重构、测试用例、性能基准、技术选型、文档生成、任务拆解、Spec驱动、Karpathy规范、CMS二次开发、前端设计、MySQL/Mariadb、项目知识图谱,以及工程纪律层(根因调试硬闭环、阶段导航、事故复盘/SLO、威胁建模/供应链安全、生产就绪/渐进式发布、AI编码治理、面向Agent代码可读性、LLM应用安全)。支持 @标识 显式调用跳过路由。
用 gh 命令行工具查看 GitHub 上的 PR 检查、工作流运行与 API 查询的技能。
数据月份:2026-10 · 下载/星标数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。