clean-code
仓库创建 2026年7月27日最近提交 1 天前SkillHot 收录 1 天前
▸ 精选理由
适合在写码或自审时避免常见代码异味并改进可维护性。
这个 Skill 做什么
检查并给出符合 Clean Code 原则的重构与规范建议。
根据 Clean Code 原则检查并给出重构与规范建议,关注命名、函数大小、参数数目、SOLID 原则、注释策略和死代码清理。适合写新代码、重构或遇到代码异味(长函数、深嵌套、重复逻辑)时调用。输出会引用编号规则(比如“违反规则 #3”),并给出可执行的修复步骤,方便在代码审查和落地时跟踪。
▸ 展开 SKILL.md 英文原文
Enforces clean code and refactoring discipline: naming, function size, arguments, SOLID, comment policy, dead code. Use when writing new code, refactoring, or when code smells appear - long functions, flag parameters, deep nesting, duplicated logic, vague names.
0
Stars
0
Forks
21
仓库内 Skill
积累中
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/Ludenox-GIT/portable-agent-skills/main/skills/clean-code/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/Ludenox-GIT/portable-agent-skills/main/skills/clean-code/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# Clean Code
Numbered rules use RFC-2119 keywords. Cite findings by number ("violates rule #3").
For the full smell catalog (21 named smells with detection signals, recipes, severity),
read references/SMELLS.md — load it when auditing an existing codebase or reviewing a PR,
not when writing a small greenfield change.
## When to use
- Writing new functions, classes, or modules in any language.
- Refactoring, code review, or "clean this up" requests.
- You notice a smell mid-task: a 60-line function, a `doThing(x, true, false)` call, 4 levels of nesting.
When NOT to use: mechanical formatting (that is the linter's job), performance tuning
(profile first, clean second), or one-off throwawayvia SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有