用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/vamseeachanta/workspace-hub --skill clean-code-hard-limits-zero-tolerance命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | clean-code-hard-limits-zero-tolerance |
| description | Sub-skill of clean-code: Hard Limits (Zero-Tolerance). |
| version | 2.1.0 |
| category | workspace |
| type | reference |
| scripts_exempt | true |
| Metric | Hard Limit | Target | Action When Exceeded |
|---|---|---|---|
| File length | 400 lines | 200 lines | Split by responsibility |
| Function length | 50 lines | 20–30 lines | Extract helpers |
| Class public methods | 10 methods | 5–7 methods | Extract sub-classes or use composition |
| Nesting depth | 4 levels | 2 levels | Extract guard clauses or sub-functions |
| Import count per file | 20 imports | 10–12 imports | Sign of a God Object — split the file |
Exception 1 — Legacy solver: Low-churn files with full test coverage may remain until a
dedicated refactor WRK is approved. Document with # noqa: clean-code at the top of the file.
Exception 2 — Pure declarative data: Files whose content is ≥95% frozen dataclass/dict
literals with zero logic (no conditionals, no I/O, no imports from sibling modules) are exempt
from the 400L limit. The logic module that consumes them must still be ≤400L.
Example: activity_definitions.py (1,419L) — 14 return Activity(...) builder functions.
Test: if every function body is a single return SomeDataclass(...), it is a data file, not a
God Object.