Zheat Logo

    Why Rocky splits agents and skills

    Agents are the short front door. Skills are deep reference loaded only when needed. That split keeps a disciplined Rocky session around 4-6k handbook tokens instead of dumping the whole corpus.

    Follow on LinkedIn

    This is about how the Rocky handbook is built, not whether MCP saves tokens on your app repo. For that, see the value report.

    The idea in one sentence

    Agents are the short front door. Skills are the deep reference you load only when the task needs templates or long checklists.

    How agents are built

    Handbook agents come from two sources:

    1. Devkit-native playbooks: discovery (codebase-discovery), quality gate (pr-quality-gate), graphify onboarding, stack-specific implementers (nextjs-developer, node-api-developer, ...).
    2. ai-driven playbooks: hexagonal implementers and test writers (react-hexagonal, nestjs-hexagonal, fastapi-hexagonal, vitest-writer, ...), aligned with the ai-driven agent set.

    Every agent shares the same skeleton:

    SectionPurpose
    Frontmattername, description, optional skills: ...
    Local project graphgraphify plus optional Understand Anything (same policy everywhere)
    Do / Don'tWhat to enforce on this task
    Deep referencePointer to skill(s) or sibling agents
    When invokedShort checklist

    Agents are registered as MCP resources (devkit://handbook/agents/...) and listed via devkit then list_handbook.

    Why we split agents and skills

    If everything lived in the agent fileWhat happens
    Long templates (Vitest, Jest, Playwright, hexagonal checklists)Every invoke loads thousands of tokens before the model reads your code
    Duplicate agents (vitest-writer + test-writer-react)Two front doors, drift, wasted context
    Prompt dumps all handbook URIsModel treats the index as a reading list
    With agent + skill splitWhat happens
    Agent about 40-60 linesRole, discovery, routing. Fits in one glance.
    Skill SKILL.mdExamples and checklists load only when needed
    One React test agent (vitest-writer) + vitest-react skillSingle entry point for Vitest/RTL

    Rule of thumb: about 1,244 lines across 24 agents on disk. A disciplined session reads about 4k-6k tokens of handbook, not the whole corpus.

    Skill layer (depth)

    Skills hold implementation depth that does not belong in every turn: react-hexagonal, vitest-react, jest-nestjs, pytest-hexagonal, playwright-e2e, nextjs-app-router, node-api-layered, and more.

    Frontmatter skills: foo tells the host the skill exists. It is not automatically pasted into context unless the workflow attaches it.

    Prompts and routing

    devkit-start-task uses a router table (task area to agent + rules) and a cap: read at most 2-3 handbook resources. It does not embed all 37 rule/agent URIs.

    devkit-review-code points to exactly three resources: code-reviewer, human-readable-code, tests.

    Where things live

    PathRole
    src/mcp/agents/Short MCP handbook agents
    src/mcp/skills/Deep skills (Cursor + devkit)
    src/mcp/rules/Team rules (.mdc)

    Related