agent-core-dev
Use when developing in packages/agent-core-v2 (the DI × Scope agent engine) — adding or modifying a domain Service, choosing a LifecycleScope, wiring DI…
от P-A-N-52★ 47 звёзд на GitHub
Установить agent-core-dev в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
agent-core-dev
Develop
packages/agent-core-v2by lifecycle stage. This skill is self-contained: every rule, recipe, and red line lives in the stage files below — it does not delegate topackages/agent-core-v2/docs/.
agent-core-v2 is the new agent engine built on the DI × Scope architecture (a port of packages/agent-core). Everything resolves through the container: a service declares an identity, its dependencies, and a lifetime; the container decides construction, singleton-per-scope, ordering, and disposal. The stage files restate the rules in imperative form so you can work without reading the source docs.
Lifecycle at a glance
Orient → Design → Implement → Test → Verify
│ │ │ │ │
│ │ │ │ └─ lint:imports · typecheck · test · dep graph · red lines
│ │ │ └─ test.md
│ │ └─ implement.md (+ errors.md · flags.md · permission.md)
│ └─ design.md
└─ orient.md
Stages are ordered but not strictly linear: a test failure (stage 4) that reveals a wrong scope sends you back to design (stage 2); a CyclicDependencyError sends you to design.md §dependency-direction and implement.md §cycles.
Workflows
End-to-end procedures that span the stages. Reach for these before reading the stage files individually.
- Align (port
agent-core→agent-core-v2): split a v1 class into semantic units, fix each unit's domain / scope / Service / dependencies, then migrate the logic and tests. Use when the task is "move feature X from v1 to v2" or "portIXxxServiceto v2". - Commit align (triage a
maincommit against v2): given onemaincommit hash + a short note, find the v1 logic it changed, check whether v2 already has the corresponding implementation, bucket it (aligned / partial / missing / not-applicable), and recommend a minimal fix. Use in thekimi-code-v2-catching-up-to-mainphase, for one commit at a time; escalate to align.md if the gap is a whole domain. - Server align (expose
agent-core-v2overserver-v2): wire a v2 domain intopackages/kap-serverover/api/v2(native) and/api/v1(v1-compatible mirror), keep the wire schema byte-compatible with the established v1 contract by sharing the@moonshot-ai/protocolschema, and isolate v1-only behavior in a<domain>Legacyedge adapter instead of distorting the native v2 Service. Use when the task is "expose the new v2 Service on the server", "add a route to the/api/v1surface", or "keep server-v2 wire-compatible with released v1 clients".
Stages
- Stage 1 — Orient: the DI black box (identity / dependencies / lifetime), the four
LifecycleScopetiers and visibility, and the file-header comment convention. Read before touching business code. - Stage 2 — Design a service: pick a scope, split a domain across scopes, choose a calling style (direct call vs event vs hook), and direct dependencies. Decide where things live and who knows whom before coding.
- Topic: Domain boundaries vs Scope — keep
session/agent/turnfrom becoming god objects; data-ownership test and their split conclusions. - Topic: Persistence layering — the three-layer
Store → Storage → backendmodel, naming Stores by access pattern, and which layer business code should depend on. - Topic: Edge exposure —
resource:action+ WS events — which Services are exposed over/api/v2(per-scope action map) and which events stream over WS; what to wrap in a facade.
- Topic: Domain boundaries vs Scope — keep
- Stage 3 — Implement: the standard Service recipe and the DI building blocks — interface + identity, constructor injection, scoped registration,
Disposable, eager vs delayed,invokeFunction,createInstance, child scopes, and the cycle-refactor playbook.- Topic: Service authoring — file layout, naming, contract vs impl contents, interface style, constructor/field conventions, events, multi-Service domains, comment rules.
- Topic: Config — the section-registry model, App vs Session split, owning a config section, the TOML format, and the env overlay.
- Topic: Errors — co-located
XxxError, the central code registry, wire serialization, boundary translation. - Topic: Flags —
registerFlagDefinition,IFlagService.enabled(id), the[experimental]config section, resolution precedence. - Topic: Permission — risk-only chain-of-responsibility kernel, harness constraints and product reviews as domain
onBeforeExecuteToolveto listeners (veto/allow/pass/ coldwaitUntilfactories), sharedtoolApprovalround-trip, policy registry + composer,modes/agentTypesmetadata,resolveExecution/accesses. - Topic: Telemetry — emitting events via `ITel
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- align.md
- close-vs-dispose.md
- commit-align.md
- config.md
- design.md
- domain-boundaries.md
- edge-exposure.md
- errors.md
- flags.md
- implement.md
- orient.md
- permission.md
- persistence.md
- server-align.md
- service-authoring.md
- telemetry.md
- test.md
- verify.md
FAQ
Что делает скилл agent-core-dev?
Use when developing in packages/agent-core-v2 (the DI × Scope agent engine) — adding or modifying a domain Service, choosing a LifecycleScope, wiring DI dependencies, splitting a domain across scopes, owning or migrating a config section, gating behavior behind an experimental flag, raising coded errors, working on the permission system, writing DI/Scope tests, porting business logic from agent-core (v1) to v2, triaging a main-branch commit against v2, or exposing a v2 domain over server-v2 while keeping the /api/v1 wire contract compatible with released clients. Self-contained guide organized by development stage (orient → design → implement → test → verify) plus align workflows for v1→v2 migration, main-branch commit triage, and server-v2 wire exposure; each file carries the rules, examples, and red lines for its step.
Как установить скилл agent-core-dev?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл agent-core-dev запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…