一键导入
clean-code
Simplifies noisy implementations and improves maintainability during code changes. Use when refactoring, trimming duplication, or tightening readability.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Simplifies noisy implementations and improves maintainability during code changes. Use when refactoring, trimming duplication, or tightening readability.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Automatic quality control, linting, and static analysis procedures. Use when validating code changes for syntax correctness and project standards. Triggers on keywords: lint, format, check, validate, types, static analysis.
Refactoring and cleanup - improving code structure, removing dead code, eliminating duplication, or pre-merge cleanup. Use when code is hard to maintain, has dead code or debug artifacts, or needs pre-merge polishing.
Fix a GitHub issue end-to-end - from reading the issue, understanding requirements, implementing the fix, writing tests, and creating a commit. Use when given a GitHub issue number or URL to resolve.
Optimize code for readability, performance, maintainability, and security across Bash, Python, and Rust. Use when asked to improve code quality, optimize performance, add type safety, or refactor for idioms.
Create, debug, and optimize GitHub Actions workflows with security best practices. Use when asked to "create workflow", "fix workflow", "add CI", or needs help with GitHub Actions.
Review code changes (diffs, PRs, patches) and provide structured, actionable feedback on correctness, maintainability, and test coverage. Use when the user asks for a code review, requests feedback on a patch/PR, or wants an assessment of changes.
| name | clean-code |
| description | Simplifies noisy implementations and improves maintainability during code changes. Use when refactoring, trimming duplication, or tightening readability. |
Use this skill to remove unnecessary complexity around the task in front of you. Favor small, behavior-preserving cleanups over broad style rewrites.
Reach for this skill when the work is already in scope and the code can be made clearer without redesigning the subsystem.
| Situation | Apply this skill |
|---|---|
| Refactoring noisy code | Remove dead abstractions, duplication, and indirection |
| Reviewing maintainability | Tighten names, control flow, and file boundaries |
| Finishing a feature or bug fix | Trim opportunistic complexity in touched code only |
| Keep | Remove |
|---|---|
| Names that explain intent | Placeholder names and abbreviations |
| Guard clauses and straight-line flow | Deep nesting and branching noise |
| Shared abstractions with multiple callers | Helpers used once with no reuse value |
| Comments that explain non-obvious intent | Comments that restate the code |
| Small focused edits | Cleanup that changes unrelated behavior |
if trees with early returns.data/item/temp variables to domain-specific names.