一键导入
coding-standards
Auto-enforce coding standards after every code change in Code mode. Checks file size, nesting, naming, error handling, and anti-patterns.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Auto-enforce coding standards after every code change in Code mode. Checks file size, nesting, naming, error handling, and anti-patterns.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Verify WCAG 2.1 AA compliance by analyzing HTML structure, ARIA usage, contrast, keyboard patterns, and semantic markup. Runs before completion in FE Designer mode.
Guide the design of beautiful, accessible, systematic UI components. Auto-triggers when creating or restyling components in FE Designer mode.
Audit design system consistency — check tokens, spacing, colors, typography usage across the codebase. Triggers when modifying shared styles or on user request.
Self-critique visual output before completion. Evaluates visual hierarchy, CTA clarity, cognitive load, spacing consistency, and layout priority. MUST run before attempt_completion in FE Designer mode.
MANDATORY: Run validation tools after EVERY code change. Do not finish until code is error-free.
Monitor and manage context window usage to prevent overflow and optimize token efficiency.
| name | coding-standards |
| description | Auto-enforce coding standards after every code change in Code mode. Checks file size, nesting, naming, error handling, and anti-patterns. |
| risk | safe |
| source | self |
| tags | ["coding-standards","quality","enforcement"] |
Trigger after EVERY code change in Code mode — automatically verify standards compliance.
camelCase for variables/functionsPascalCase for types/interfaces/componentsUPPER_SNAKE_CASE for constantsis/has/should prefix for booleanscatch (error: unknown) { if (error instanceof Error) { ... } }catch (e) { console.log(e) } — empty/generic catchcatch (error: any) — never use anyconsole.log in production code → use proper loggerdebugger statements left behindany type usage → use unknown + narrowingvar keyword → use const (prefer) or letBefore writing any code, ask: "What is the simplest thing that could work?"
After writing code, review against these checks:
SIMPLICITY CHECK:
✗ Generic EventBus with middleware pipeline for one notification
✓ Simple function call
✗ Abstract factory pattern for two similar components
✓ Two straightforward components with shared utilities
✗ Config-driven form builder for three forms
✓ Three form components
Three similar lines of code is better than a premature abstraction. Implement the naive, obviously-correct version first. Optimize only after correctness is proven with tests.
For full TypeScript rules, pre-coding checklist, and self-review process, see .roo/rules-code/coding-standards.md.