Agent Skills
› NeverSight/learn-skills.dev
› core-design-principles
core-design-principles
GitHub在编码前应用黑龟设计原则的预检清单。用于判断代码归属、选择最小稳定接口、验证删除路径及边界,防止过度设计和违规导入,确保架构清晰与低耦合。
Trigger Scenarios
任务容易过度构建时
不确定代码放置位置时
需要在快速修复与正确边界间抉择时
Install
npx skills add NeverSight/learn-skills.dev --skill core-design-principles -g -y
SKILL.md
Frontmatter
{
"name": "core-design-principles",
"description": "Apply Black-Tortoise design principles (Occam, cohesion\/coupling, tool-first assembly, explicit boundaries, deletion-friendly evolution) to a concrete change request; use as a pre-flight checklist before writing code."
}
Core Design Principles (Operational Checklist)
Use when
- A task feels “easy to overbuild” (new helpers, new layers, new abstractions).
- You’re not sure where code should live.
- You need to choose between “quick fix” vs “correct boundary”.
Inputs (ask/confirm)
- What capability/bounded context owns this change?
- What is the smallest stable interface needed by the next layer?
- Where are the side effects (if any)?
Workflow (tool-first → assembly)
- Identify the tool: the smallest reusable unit (pure function, port, adapter, store method).
- Place it in the owner (capability / workspace / eventing / integration) without cross-context imports.
- Add the assembly: facade/effect/component that wires it, preserving unidirectional flow.
- Verify deletion path: removing the feature should be mostly deleting code, not untangling.
Hard checks (fail fast)
- No new cross-layer imports that violate Presentation → Application → Domain.
- No domain-side framework imports or side effects.
- No “god” utilities; prefer small, intention-revealing APIs.
- State stays centralized; UI binds to signals.
References
.github/instructions/05-design-principles-copilot-instructions.mdAGENTS.mdandsrc/app/**/AGENTS.md
Version History
- e0220ca Current 2026-07-05 21:25


