Agent Skills
› NeverSight/learn-skills.dev
› shared-kernel
shared-kernel
GitHub定义src/app/shared目录的共享规则,明确允许使用的纯工具、无业务逻辑的UI原子组件及跨领域技术辅助函数,禁止包含业务逻辑、领域规则或平台SDK依赖,旨在提供低耦合的安全基础原语。
Trigger Scenarios
添加共享辅助函数
创建共享UI组件
修改shared目录代码
Install
npx skills add NeverSight/learn-skills.dev --skill shared-kernel -g -y
SKILL.md
Frontmatter
{
"name": "shared-kernel",
"description": "Shared kernel rules for src\/app\/shared, defining what can be shared safely (primitives, utilities, UI atoms) and what must not (business logic, cross-context policies); use when adding shared helpers or components."
}
Shared Kernel
Intent
Provide safe, low-coupling primitives reused across bounded contexts.
Allowed Content
- Pure utilities (formatting, small helpers) with no side effects.
- Shared UI atoms/molecules that do not contain business rules.
- Cross-cutting technical helpers (logging adapters, error wrappers) when they do not introduce new dependencies.
Forbidden Content
- Business logic, policies, or workflow orchestration.
- Cross-capability state stores.
- Domain rules that belong to a specific bounded context.
- Direct platform SDK usage (Firebase/HTTP) unless the shared item is explicitly an infrastructure primitive and the dependency direction is preserved.
Dependency Discipline
- Keep dependencies stable and minimal.
- Avoid importing capability modules into shared.
API Design
- Prefer small, intention-revealing APIs.
- Avoid "god" utility modules; create focused files.
Version History
- e0220ca Current 2026-07-05 21:27


