一键导入
coder-rules-clean-code
Clean code execution rules for coding agents with verifiable quality gates.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Clean code execution rules for coding agents with verifiable quality gates.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Mandatory baseline rules for any agent. Must be loaded before any work
Frontend design system practices: tokens, typography, color, layout, and component consistency.
Frontend UI/UX practices: flows, interaction states, accessibility-first UX, forms, and perceived performance.
Debugging requirements protocol from reproducible issue to verified fix and regression protection.
Requirement quality rules for coding tasks with traceable MUST/SHOULD and verifiable acceptance criteria.
API design rules for stable, observable, backward-compatible HTTP APIs.
| name | coder-rules-clean-code |
| description | Clean code execution rules for coding agents with verifiable quality gates. |
<when_to_use> Implementing or refactoring code in any repository area Need to keep changes minimal, readable, and maintainable Need objective acceptance checks before task completion </when_to_use>
<input_requirements> Task goal and scope boundaries Target files or modules Project conventions and existing patterns Verification commands (tests/lint/typecheck/build as applicable) </input_requirements>
<execution_workflow> Explore relevant files and constraints before edits Plan minimal change that solves requested problem only Implement in small coherent edits following local conventions Verify with required commands and observable outcomes </execution_workflow>
<core_principles> Prefer smallest safe change that satisfies requirements Keep code intention explicit; avoid hidden side effects Follow repository naming, structure, and style patterns Reduce complexity instead of adding speculative abstractions Treat tests and checks as completion criteria, not optional extras Document only non-obvious tradeoffs and constraints </core_principles>
Diff is limited to in-scope files and behavior No duplicate logic introduced when existing utility fits Error and edge paths are handled where required by task Formatting/lint/type checks pass for changed scope Behavior is validated by tests or reproducible command output<quality_rules> Do not mark task done without verifiable evidence Claims about code behavior must be grounded in inspected files or executed checks Additional behavior outside requirements must be explicit and justified Refactors are allowed only when they directly reduce risk of requested change </quality_rules>
<do_not> Do not use destructive git or shell shortcuts without explicit approval Do not hardcode secrets, credentials, or environment-specific values Do not pad solution with unused abstractions or premature optimization Do not treat "looks fine" as test evidence </do_not>
<output_requirements> List changed files and why each changed List verification commands and results List remaining risks, assumptions, or follow-up items </output_requirements>