用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/dkolba/bruff --skill verify-layers命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | verify-layers |
| description | Audit import dependencies in packages/game to verify they comply with the layered architecture rules |
Use when you want to audit or enforce the layered architecture dependency rules before committing.
core/ — zero imports (fully dependency-free)
state/ — imports core/ only
input/ — imports core/ + state/ only
render/ — imports core/ + state/ only
effects/ — shell wiring over core/state/input/render plus allowed workspace utilities
No circular dependencies. No upward dependencies (e.g. core/ must never import from state/).
@bruff/utils imports are allowed from any layer for shared pure helpers and types. log() from @bruff/utils is shell-only: it may be imported by effects/ or the entry point, but not by core/, state/, input/, or render/. @bruff/utils/dom imports are browser-shell utilities and are allowed only from effects/ or tests for effects-layer code. Production code should not call console.* directly; console forwarding is handled by the logging event bus sink.
Search packages/game/lib/ (and sub-directories) for import violations:
# Check that core files import nothing from the project
grep -rn "from \"\.\." packages/game/lib/core/
# Check inner layers for upward imports
rg 'from "\\.\\.' packages/game/lib/state packages/game/lib/render packages/game/lib/input
# Check for circular dependencies using madge (if available)
npx madge --circular packages/game/lib/
For each violation found, report:
core/ imports from any project pathstate/ imports from input/, render/, or effects/core/, state/, input/, or render/ imports log from @bruff/utilscore/, state/, input/, or render/ imports from @bruff/utils/domrender/project-render-commands.ts projects GameState to RenderCommand values without DOM or Canvas accesseffects/execute-render-command.tseffects/clock.ts is the only production file that reads performance.now()window.__bruffTestApi is attached only behind the __BRUFF_TEST_MODE__ / isTestMode() gateconsole.* outside the event-bus console sink@bruff/utils root imports are universal helpers or shell-approved log() importseffects/, entry point)