clean-code

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Clean Code: Collection Router

Clean Code: 代码集合路由

Use this as the top-level entry point for the clean-code skill collection. It should activate the relevant track skills for the files and concerns in front of you, then report findings with the specialized rule IDs.
将此作为clean-code技能集合的顶级入口。它会针对当前文件和相关问题激活对应的专项技能,然后附带特定规则ID报告检查结果。

Route By Work

按工作类型路由

WorkUse
Broad TypeScript quality, names, functions, modules, async flows, comments, boundaries, data modeling, errors, tests
clean-typescript
React components, JSX, hooks, effects, state, React tests, file ownership
clean-react
plus
clean-typescript
CSS, CSS Modules, CSS-in-JS, Tailwind classes, inline styles, tokens, layout, visual accessibility
clean-css
Small cleanup near existing TypeScript edits
clean-as-you-go
plus the relevant focused TypeScript skill
工作内容使用技能
全面的TypeScript质量检查(命名、函数、模块、异步流程、注释、边界、数据建模、错误处理、测试)
clean-typescript
React组件、JSX、hooks、副作用、状态、React测试、文件归属
clean-react
搭配
clean-typescript
CSS、CSS Modules、CSS-in-JS、Tailwind类、内联样式、设计令牌、布局、视觉可访问性
clean-css
在已有的TypeScript编辑附近进行小范围清理
clean-as-you-go
搭配相关的聚焦型TypeScript技能

Editing Process

编辑流程

When editing code with clean-code expectations:
  1. Apply the requested change first.
  2. Use the relevant track skill before making quality improvements.
  3. Keep cleanup proportional to the touched code.
  4. Report the concrete rule-backed improvements made.
当按照clean-code规范编辑代码时:
  1. 先执行要求的变更。
  2. 在进行质量改进前,使用对应的专项技能。
  3. 清理范围与修改的代码量保持匹配。
  4. 报告基于具体规则所做的改进。

AI Behavior

AI行为规范

Do not treat
clean-code
as a replacement for the specialized skills. It is a router.
For broad edits, include every relevant track instead of choosing only one. For example, a
.tsx
component with CSS Modules should use
clean-typescript
,
clean-react
, and
clean-css
.
请勿将
clean-code
视为专项技能的替代品。它只是一个路由工具。 对于大范围编辑,请包含所有相关的专项技能,而非仅选择其一。例如,包含CSS Modules的
.tsx
组件应使用
clean-typescript
clean-react
clean-css