{
  "name": "Canon skills",
  "count": 34,
  "howToUse": "This payload is level 1 (name + description). If a skill matches, GET /api/canon/skills/{id}?format=md for the body.",
  "families": [
    {
      "id": "meta",
      "title": "Meta",
      "blurb": "How to write skills, constitutions, and lessons from traces."
    },
    {
      "id": "doctrine",
      "title": "Doctrine",
      "blurb": "12-factor, workflows vs agents, the loop, framework choice."
    },
    {
      "id": "context",
      "title": "Context",
      "blurb": "The window as a product. Compaction as policy."
    },
    {
      "id": "aci",
      "title": "ACI & protocols",
      "blurb": "Tools, permissions, MCP, A2A, humans, sandbox."
    },
    {
      "id": "pattern",
      "title": "Patterns",
      "blurb": "Chains, routers, crews, harnesses, plan/act."
    },
    {
      "id": "job",
      "title": "Jobs",
      "blurb": "Coding, research, browser, documents, support."
    },
    {
      "id": "production",
      "title": "Production",
      "blurb": "Evals, durable execution, traces."
    }
  ],
  "skills": [
    {
      "id": "skill-creator",
      "name": "skill-creator",
      "title": "Write a skill",
      "description": "Create, edit, and evaluate Agent Skills (SKILL.md with progressive disclosure). Use whenever packaging how an agent should do a job, writing or improving a skill, optimizing a description for triggering, distilling a trace into a skill, or the user says skill, SKILL.md, skill-creator, progressive disclosure, or 'teach the agent this'.",
      "family": "meta",
      "minutes": 10,
      "href": "/api/canon/skills/skill-creator?format=md",
      "ui": "/skills/skill-creator"
    },
    {
      "id": "agents-md",
      "name": "agents-md",
      "title": "Write AGENTS.md",
      "description": "Write or audit AGENTS.md — the repo constitution for coding agents. Use when setting up a coding agent, adding project instructions, defining done, pointing at skills, or the user mentions AGENTS.md, CLAUDE.md, copilot-instructions, .cursorrules, or 'how should the agent work in this repo'.",
      "family": "meta",
      "minutes": 8,
      "href": "/api/canon/skills/agents-md?format=md",
      "ui": "/skills/agents-md"
    },
    {
      "id": "distill-traces",
      "name": "distill-traces",
      "title": "Distill a trace",
      "description": "Compile a paid-for agent run into a skill, a rubric, or a golden eval. Use when the same miss happened twice, a run was surprisingly good, the user says distill, 'learn from this', 'turn this into a skill', or when memory is being implemented as unfiltered logs.",
      "family": "meta",
      "minutes": 8,
      "href": "/api/canon/skills/distill-traces?format=md",
      "ui": "/skills/distill-traces"
    },
    {
      "id": "twelve-factor-agents",
      "name": "twelve-factor-agents",
      "title": "Twelve-factor agents",
      "description": "Apply HumanLayer's 12-factor production doctrine to an agent or agentic product. Use when shipping to production, reviewing a design, owning prompts/context/control flow, hitting the 70–80% framework trap, or the user mentions 12-factor, last 20%, stateless reducer, or 'the demo works but customers will wait'.",
      "family": "doctrine",
      "minutes": 12,
      "href": "/api/canon/skills/twelve-factor-agents?format=md",
      "ui": "/skills/twelve-factor-agents"
    },
    {
      "id": "workflows-vs-agents",
      "name": "workflows-vs-agents",
      "title": "Workflows versus agents",
      "description": "Decide whether the work is a workflow (named path) or an agent (model directs process). Use at the start of any agentic design, when choosing chain vs ReAct vs crew vs harness, or the user says 'should this be an agent', 'make it autonomous', or reaches for a multi-agent crew because the demo looked collaborative.",
      "family": "doctrine",
      "minutes": 6,
      "href": "/api/canon/skills/workflows-vs-agents?format=md",
      "ui": "/skills/workflows-vs-agents"
    },
    {
      "id": "agent-loop",
      "name": "agent-loop",
      "title": "The agent loop",
      "description": "Implement the agent loop in raw SDK calls: context → structured next step → execute → compact-append. Use when building an agent from scratch, hiding the loop inside a framework, adding termination/budgets/pause, or the user asks how an agent actually works.",
      "family": "doctrine",
      "minutes": 8,
      "href": "/api/canon/skills/agent-loop?format=md",
      "ui": "/skills/agent-loop"
    },
    {
      "id": "framework-choice",
      "name": "framework-choice",
      "title": "Pick a framework",
      "description": "Pick the thinnest library that supplies a missing primitive (checkpoints, types, harness, MCP, documents, handoffs). Use when choosing LangGraph, CrewAI, OpenAI Agents SDK, Mastra, Pydantic AI, LlamaIndex, OpenHands, AutoGen, or the user is shopping by stars / asking LangGraph vs CrewAI.",
      "family": "doctrine",
      "minutes": 6,
      "href": "/api/canon/skills/framework-choice?format=md",
      "ui": "/skills/framework-choice"
    },
    {
      "id": "context-engineering",
      "name": "context-engineering",
      "title": "Own the context window",
      "description": "Treat the context window as a product you build every turn: pinned, working, recalled, compacted. Use when the agent forgets the goal, the window overflows, you need retrieval or a skill index, cache-stable prefixes, or the user says context engineering, 'stuff the PDF in', or context hoarding.",
      "family": "context",
      "minutes": 8,
      "href": "/api/canon/skills/context-engineering?format=md",
      "ui": "/skills/context-engineering"
    },
    {
      "id": "compaction",
      "name": "compaction",
      "title": "Compact observations",
      "description": "Compact tool results and errors into the smallest string that still enables the next correct action (12-factor #9). Use when tool results are huge, CI logs dump into context, stack traces eat the window, or the goal is being silently truncated.",
      "family": "context",
      "minutes": 6,
      "href": "/api/canon/skills/compaction?format=md",
      "ui": "/skills/compaction"
    },
    {
      "id": "tool-design",
      "name": "tool-design",
      "title": "Design the ACI",
      "description": "Design the agent-computer interface: one job per tool, verb names, JSON schemas, compact errors, size caps, idempotency. Use when adding tools, function calling, MCP tools, reviewing a mega-tool, or the user says ACI, tool schema, or 'just give it a shell'.",
      "family": "aci",
      "minutes": 10,
      "href": "/api/canon/skills/tool-design?format=md",
      "ui": "/skills/tool-design"
    },
    {
      "id": "permissions",
      "name": "permissions",
      "title": "Allow / ask / deny",
      "description": "Put every side-effecting tool behind allow / ask / deny in code. Use when the agent can write, deploy, refund, browse, exec, or the user mentions permission model, approvals, 'the model should be careful', or wants to enforce policy in the system prompt.",
      "family": "aci",
      "minutes": 8,
      "href": "/api/canon/skills/permissions?format=md",
      "ui": "/skills/permissions"
    },
    {
      "id": "mcp-server",
      "name": "mcp-server",
      "title": "MCP server",
      "description": "Build, pin, hash, and review Model Context Protocol servers. Use when exposing tools/resources/prompts via MCP, installing marketplace servers, wiring Claude/Codex/Cursor to local tools, or when tool descriptions might be an attack surface.",
      "family": "aci",
      "minutes": 8,
      "href": "/api/canon/skills/mcp-server?format=md",
      "ui": "/skills/mcp-server"
    },
    {
      "id": "a2a-protocol",
      "name": "a2a-protocol",
      "title": "Agent-to-agent (A2A)",
      "description": "Use the A2A protocol for cross-vendor agent collaboration (agent cards, task passing). Use when two products or two vendors must talk, not two prompts in one process, or the user mentions A2A, agent cards, Google A2A, or inter-agent protocol.",
      "family": "aci",
      "minutes": 6,
      "href": "/api/canon/skills/a2a-protocol?format=md",
      "ui": "/skills/a2a-protocol"
    },
    {
      "id": "human-in-the-loop",
      "name": "human-in-the-loop",
      "title": "Humans as tools",
      "description": "Make approval and missing information first-class tools (ask_human) with checkpoint and resume. Use for refunds, deploys, ambiguous tickets, HITL, or when the current design emails an operator and loses the run.",
      "family": "aci",
      "minutes": 8,
      "href": "/api/canon/skills/human-in-the-loop?format=md",
      "ui": "/skills/human-in-the-loop"
    },
    {
      "id": "sandbox-security",
      "name": "sandbox-security",
      "title": "Sandbox and injection",
      "description": "Enforce security at the executor: sandbox, allowlist, prompt-injection defense, pinned MCP, secrets out of the prompt, reduced subagent principals. Use whenever the agent runs code, reads the web or PDFs, installs MCP, or someone wants to 'just tell the model not to delete files'.",
      "family": "aci",
      "minutes": 8,
      "href": "/api/canon/skills/sandbox-security?format=md",
      "ui": "/skills/sandbox-security"
    },
    {
      "id": "prompt-chaining",
      "name": "prompt-chaining",
      "title": "Prompt chain",
      "description": "Implement a prompt chain: named stages in series with code gates between LLM hops. Use when the path is known (extract → transform → write), invoice/document pipelines, or someone is about to turn a five-step process into a free-running ReAct loop.",
      "family": "pattern",
      "minutes": 5,
      "href": "/api/canon/skills/prompt-chaining?format=md",
      "ui": "/skills/prompt-chaining"
    },
    {
      "id": "routing",
      "name": "routing",
      "title": "Router / handoff",
      "description": "Classify inbound language then dispatch to a specialist prompt, model, or agent. Use for support triage, intent classification, model routing, or handoff into specialists — not a group chat.",
      "family": "pattern",
      "minutes": 5,
      "href": "/api/canon/skills/routing?format=md",
      "ui": "/skills/routing"
    },
    {
      "id": "parallelization",
      "name": "parallelization",
      "title": "Fan-out / reduce",
      "description": "Run independent subtasks in parallel and reduce in code (sectioning or voting). Use when subtasks do not share mutable state: multi-file review, scatter-gather research, or LLM-as-judge voting.",
      "family": "pattern",
      "minutes": 5,
      "href": "/api/canon/skills/parallelization?format=md",
      "ui": "/skills/parallelization"
    },
    {
      "id": "evaluator-optimizer",
      "name": "evaluator-optimizer",
      "title": "Evaluator–optimizer",
      "description": "Generate, critique against a written rubric, rewrite, cap the loop. Use for writing, translation, code review, or any task with measurable quality where a single pass is not enough.",
      "family": "pattern",
      "minutes": 6,
      "href": "/api/canon/skills/evaluator-optimizer?format=md",
      "ui": "/skills/evaluator-optimizer"
    },
    {
      "id": "code-act",
      "name": "code-act",
      "title": "Code-act",
      "description": "Let the model write a program that composes tools in a sandbox (smolagents + E2B), instead of one JSON tool call per hop. Use when composition (loops, filters, pandas) beats hop-by-hop function calling — never unsandboxed.",
      "family": "pattern",
      "minutes": 6,
      "href": "/api/canon/skills/code-act?format=md",
      "ui": "/skills/code-act"
    },
    {
      "id": "orchestrator-workers",
      "name": "orchestrator-workers",
      "title": "Orchestrator–workers",
      "description": "A parent decomposes work at runtime, spawns isolated workers, and synthesizes. Use for long-horizon research, DeerFlow/Deep Agents shape, or when subtasks are discovered during the run rather than at design time.",
      "family": "pattern",
      "minutes": 8,
      "href": "/api/canon/skills/orchestrator-workers?format=md",
      "ui": "/skills/orchestrator-workers"
    },
    {
      "id": "multi-agent",
      "name": "multi-agent",
      "title": "Multi-agent topologies",
      "description": "Choose supervisor, crew+flows, or handoff swarm. Use when adding a second agent, CrewAI, AutoGen group chat, 'team of agents', society of mind, or role-play. A role is real only if tools or schema change. Never unsupervised group chat on production tools.",
      "family": "pattern",
      "minutes": 10,
      "href": "/api/canon/skills/multi-agent?format=md",
      "ui": "/skills/multi-agent"
    },
    {
      "id": "subagents",
      "name": "subagents",
      "title": "Spawn subagents",
      "description": "Spawn a nested loop as a context boundary: written brief, fresh window, reduced tools, no parent secrets, structured return. Use when the parent would drown in search hits, specialists need isolation, or spawning researchers / reviewers.",
      "family": "pattern",
      "minutes": 8,
      "href": "/api/canon/skills/subagents?format=md",
      "ui": "/skills/subagents"
    },
    {
      "id": "plan-and-act",
      "name": "plan-and-act",
      "title": "Plan / act",
      "description": "A deny-writes planning session that produces a revisable document; act is a permission change against that plan. Use for long-horizon coding or research that a human must agree to before side effects, or when a 40-step plan is generated once and never rewritten.",
      "family": "pattern",
      "minutes": 6,
      "href": "/api/canon/skills/plan-and-act?format=md",
      "ui": "/skills/plan-and-act"
    },
    {
      "id": "spec-driven",
      "name": "spec-driven",
      "title": "Spec-driven work",
      "description": "Write the contract, failing test, or rubric first; the agent fills a shape you can verify. Use when the agent wanders, you can score the work, TDD with coding agents, or the user says spec-driven, failing test first, or 'don't let it improvise'.",
      "family": "pattern",
      "minutes": 6,
      "href": "/api/canon/skills/spec-driven?format=md",
      "ui": "/skills/spec-driven"
    },
    {
      "id": "harness-design",
      "name": "harness-design",
      "title": "Design a harness",
      "description": "Build or adopt a harness — the opinionated runtime around the loop: filesystem workspace, progressive-disclosure skills, planner, subagents, sandbox, verifier, permissions. Use for coding or long-horizon research products. Do not start from a blank ReAct loop.",
      "family": "pattern",
      "minutes": 10,
      "href": "/api/canon/skills/harness-design?format=md",
      "ui": "/skills/harness-design"
    },
    {
      "id": "coding-agent",
      "name": "coding-agent",
      "title": "Coding agent",
      "description": "Ship a coding agent: AGENTS.md, apply_patch, repo map, tests in the loop, allow/ask/deny, human gate. Use for PR agents, SWE-bench-like work, repo edits, or when comparing Codex, OpenHands, Cline, Aider, Goose, Deep Agents. Start from a harness, not a blank graph.",
      "family": "job",
      "minutes": 12,
      "href": "/api/canon/skills/coding-agent?format=md",
      "ui": "/skills/coding-agent"
    },
    {
      "id": "research-agent",
      "name": "research-agent",
      "title": "Research agent",
      "description": "Long-horizon research with notes on disk, isolated researcher subagents, and a parent that synthesizes 30-line returns. Use for competitive research, literature review, investigations, DeerFlow/Deep Agents — not for side effects or production mutations.",
      "family": "job",
      "minutes": 10,
      "href": "/api/canon/skills/research-agent?format=md",
      "ui": "/skills/research-agent"
    },
    {
      "id": "browser-agent",
      "name": "browser-agent",
      "title": "Browser agent",
      "description": "Use a browser agent only when there is no API: sandboxed DOM as ACI, small action space, eval the clicks. Use for browser-use, Stagehand, computer-use, Playwright agents. API first, workflow second, browser last.",
      "family": "job",
      "minutes": 8,
      "href": "/api/canon/skills/browser-agent?format=md",
      "ui": "/skills/browser-agent"
    },
    {
      "id": "document-agent",
      "name": "document-agent",
      "title": "Document / RAG agent",
      "description": "Question-answering over a private corpus with citations in the schema. Use for RAG, LlamaIndex, 'chat with PDFs', knowledge bases. The hard problem is the corpus; orchestration is secondary. Retrieved text is untrusted.",
      "family": "job",
      "minutes": 8,
      "href": "/api/canon/skills/document-agent?format=md",
      "ui": "/skills/document-agent"
    },
    {
      "id": "support-agent",
      "name": "support-agent",
      "title": "Support / ops agent",
      "description": "Turn inbound language into a structured action on a customer object: router or handoff, ticket as the blob, ask_human on refunds. Use for support, ops, tickets — not a multi-agent group chat on production tools.",
      "family": "job",
      "minutes": 10,
      "href": "/api/canon/skills/support-agent?format=md",
      "ui": "/skills/support-agent"
    },
    {
      "id": "eval-harness",
      "name": "eval-harness",
      "title": "Eval harness",
      "description": "Write golden sets, rubrics, and CI for agents (promptfoo, Inspect, DSPy). Use before choosing a framework, when a prompt/tool/skill changes, when success is a recorded GIF, or the user says evals, golden set, red-team, or 'it looks good in the demo'.",
      "family": "production",
      "minutes": 10,
      "href": "/api/canon/skills/eval-harness?format=md",
      "ui": "/skills/eval-harness"
    },
    {
      "id": "durable-execution",
      "name": "durable-execution",
      "title": "Durable execution",
      "description": "Run the agent as a reducer over one serializable blob with launch/pause/resume, idempotent tools, and crash replay. Use when a customer will wait, HITL must survive, Inngest/LangGraph checkpoints, or the demo works on a laptop.",
      "family": "production",
      "minutes": 10,
      "href": "/api/canon/skills/durable-execution?format=md",
      "ui": "/skills/durable-execution"
    },
    {
      "id": "observability",
      "name": "observability",
      "title": "Trace the loop",
      "description": "Trace every LLM and tool hop (Langfuse, OpenTelemetry). Use when debugging agents, shipping production, distilling traces into skills/evals, or the user cannot see why the agent spent $4 and did the wrong thing.",
      "family": "production",
      "minutes": 6,
      "href": "/api/canon/skills/observability?format=md",
      "ui": "/skills/observability"
    }
  ]
}