Skip to Content
MeowKit

Agent-Skill Architecture

How MeowKit agents load skills across the workflow phases: project context, phase ownership, step-file skills and the cross-cutting skills.

Agents are specialists, and skills are tools an agent loads when its task needs them. Every task is routed to the agent for its phase, and that agent activates only the skills for its domain. Loading skills on demand keeps context windows small and costs predictable. A full list is in the reference.

For the agents and skills overview, see How MeowKit works.

Project context first

docs/project-context.md is the agent constitution: tech stack, conventions, anti-patterns and testing approach. Every agent loads it at session start, before task-specific context. Without it, agents infer conventions separately and make conflicting assumptions.

/mk:docs-init            # generate docs from codebase analysis (new projects)
/mk:document-release     # diff-aware update after feature work

Phases and the agents that own them

The phases are 0 Orient, 1 Plan, 2 Test, 3 Build, 3.5 Simplify, 3.6 Verify, 4 Review, 5 Ship and 6 Reflect. The phase column below is from .claude/agents/AGENTS_INDEX.md.

AgentPhase
orchestrator0 Orient
explore0 and any
planner, architect, brainstormer1 Plan
tester2 Test (red phase with --tdd)
security2 and 4
developer3 Build
ui-ux-designer3 Build, when frontend is detected
evaluator3 (active verification) and 4 (contract review)
reviewer4 Review
shipper, git-manager5 Ship
documenter, analyst, journal-writer6 Reflect (the analyst also at 0)

The evaluator is the behavioral counterpart of the structural reviewer. It grades a running build against weighted rubrics, and in mk:autobuild the generator and evaluator are separate subagents. See Autonomous build and the evaluator reference.

Below the agent and skill layer, a hook dispatcher (dispatch.cjs and handlers.json) handles model detection, budget tracking, build verification, loop detection and checkpoints. Agents do not invoke it. See Hooks.

Plan first

Most skills follow a plan-first practice: before significant work they check that an agreed plan exists. Nothing blocks the work when it does not.

SkillPlan behaviorSkipped when
mk:cookWrites a plan if there is noneA plan path is passed, or the quick profile runs on a change of two files or fewer and about 30 minutes or less
mk:fixPlan when the fix touches more than 2 files--quick
mk:shipLooks for a plan, suggests one for non-trivial changesYou choose to ship anyway
mk:reviewReads the plan for contextA PR or pending diff is the context
mk:investigate, mk:office-hours, mk:retroProduce input for plans, or have no plan to scopeAlways

Orchestrator entry point

Two orchestrators exist: mk:cook (explicit invocation, single-task pipeline) and mk:workflow-orchestrator (auto-invoked on complex-feature intent). .claude/skills/cook/references/orchestration-rules.md decides which runs:

  • An explicit /mk:cook makes mk:cook own the pipeline, and the workflow orchestrator stays out for the session.
  • At session start with complex-feature intent and no explicit invocation, mk:workflow-orchestrator runs the phase flow. It defers to mk:cook for single-task requests.
  • They never both run in the same session.

Skill frontmatter

SKILL.md frontmatter carries advisory fields that no hook reads (.claude/skills/skill-creator/references/skill-authoring-rules.md):

FieldValuesMeaning
preamble-tier1, 2 or 3Context-injection priority. 3 is injected before other context
user-invocabletrue (default) or falsefalse marks an internal skill that other skills invoke
phase0 to 6, or on-demandThe workflow phase the skill belongs to
trust_levelkit-authored or third-partyProvenance. Third-party skills treat external input as data
injection_risklow, medium or highPrompt-injection exposure

Step-file skills

Complex skills split into step files loaded one at a time, instead of one large SKILL.md. Only the active step is in context, each step writes a discrete artifact, and state is saved to .meowkit/state/{skill-name}-progress.json so an interrupted run resumes at the last completed step. Load one step at a time, and do not skip steps.

skills/review/
├── SKILL.md
├── workflow.md
├── step-01-gather-context.md
├── step-02-parallel-review.md
├── step-02b-persona-passes.md
├── step-03-triage.md
├── step-03b-whole-plan-sweep.md
└── step-04-verdict.md

mk:plan-creator uses step files 00 to 09, with one mode matrix in workflow.md. Its --fast path runs scope, draft, checks, the plan presentation and task hydration, and skips research, codebase scouting, red team and the validation interview. mk:autobuild has steps 0 to 6.

Cross-cutting skills

These activate in any phase when the task calls for them. They are not loaded in advance.

SkillActivates when
carefulA phase runs destructive commands
freezeYou want a debug session limited to one path
scoutPhase 0 and any exploration task
docs-finderA phase needs current library docs
multimodalA phase involves images or visual content
session-continuationA handoff across sessions is needed
context-engineeringA runtime context decision, such as what to read, when to compact or delegate
henshinExisting code should become a CLI, MCP server and companion skill

Which skill do I need

I want toSkillPhase
Plan a featuremk:plan-creator1
Validate a plan before buildingmk:validate-plan1
Compare approachesmk:brainstorming, mk:office-hours1
Research a technologymk:research0, 1
Write tests firstmk:testing2
Check test-to-requirement coveragemk:nyquist2, 4
Implement a featuremk:cook0 to 6
Fix a bugmk:fix3
Debug without fixingmk:investigate3
Review codemk:review4
Push review findings furthermk:elicit4
Audit securitymk:cso2, 4
Shipmk:ship5
Update docs after shippingmk:document-release6
Run a retrospectivemk:retro6
Explore the codebasemk:scout0
Look up library docsmk:docs-finderany

Subagent status

Every subagent ends with a status block (DONE, DONE_WITH_CONCERNS, BLOCKED or NEEDS_CONTEXT), a summary and any concerns. The controller decides its next step from it. See .claude/rules/agent-conduct.md, section A1.

On this page