Agent Skills
› NeverSight/learn-skills.dev
› simplify
simplify
GitHub审查代码变更以简化逻辑、提升质量和效率。检测重复、过度设计、死代码及命名问题,并直接修复。仅针对已变更代码进行优化,不添加新功能或注释,保持行为一致。
Trigger Scenarios
需要简化代码结构时
检查代码重复或冗余时
Install
npx skills add NeverSight/learn-skills.dev --skill simplify -g -y
SKILL.md
Frontmatter
{
"name": "simplify",
"description": "Review changed code for reuse, quality, and efficiency, then fix any issues found",
"allowed-tools": "Read Grep Glob Edit Bash(git diff*)",
"disable-model-invocation": false
}
Review recently changed code for opportunities to simplify. If $ARGUMENTS specifies files, review those. Otherwise review uncommitted changes.
What to look for
- Duplication — same logic in multiple places? Extract only if it appears 3+ times (rule of three)
- Over-engineering — abstractions that serve only one call site? Inline them
- Dead code — unused imports, unreachable branches, commented-out code? Remove
- Verbose patterns — can be replaced with Pythonic idioms (comprehensions, unpacking, walrus, truthiness)?
- Type issues — missing annotations,
Anycop-outs, wrong return types? - Naming — unclear or abbreviated names that violate PEP 20?
Rules
- Don't add features or change behavior — only simplify existing code
- Don't add comments, docstrings, or type annotations to code that wasn't changed
- Don't create helpers for one-time operations
- If something is fine as-is, say so — don't force changes
Action
Find issues, then fix them directly. Show what you changed and why.
Version History
- e0220ca Current 2026-07-05 23:34


