plugins/claude-code-expert/skills/agentic-patterns/SKILL.md
--- name: agentic-patterns description: Select and wire an agentic design pattern (reflection, prompt chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer, ReAct, blackboard) into the 5-layer Claude Code stack. Use this skill whenever deciding how to structure a multi-step task, whether to spawn subagents, how to run parallel review, or when to use which pattern. Triggers on: "which pattern", "orchestrate", "parallel review", "self-review", "chain of thought", "eval-opti
npx skillsauth add markus41/claude plugins/claude-code-expert/skills/agentic-patternsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
13 patterns from Anthropic's workflow/agent taxonomy + Andrew Ng's four foundational patterns. This skill is the router; templates live in MCP cc_kb_pattern_template(name) and the pattern-router agent picks for you.
How many distinct phases?
│
├─ 1 (single generation) ──────────────► REFLECTION
│
├─ 2-4 (sequential, each uses prior) ──► PROMPT CHAINING
│
├─ 2-4 (independent, same question) ───► PARALLELIZATION
│
├─ Branching on input type ────────────► ROUTING
│
├─ Quality must meet a rubric ─────────► EVALUATOR-OPTIMIZER
│
├─ Emergent subtasks, dynamic ─────────► ORCHESTRATOR-WORKERS
│
├─ Open debug / root-cause ────────────► ReAct (thought→action→observation)
│
├─ Multi-agent collaborative review ───► BLACKBOARD (council)
│
└─ Unsure? ────────────────────────────► use agents/pattern-router
| Pattern | Cost | Best for | Template |
|---|---|---|---|
| Reflection | 1.1× | Default quality gate on single shots | cc_kb_pattern_template("reflection") |
| Prompt chaining | 1.5–2× | Multi-phase features (analyze→plan→implement→verify) | cc_kb_pattern_template("prompt-chaining") |
| Routing | 1× | Task-type decides the branch | cc_kb_pattern_template("routing") |
| Parallelization | 1–3× | Independent parallel subtasks, fan-in synthesis | cc_kb_pattern_template("parallelization") |
| Evaluator-optimizer | 1.5–3× | Quality-critical artifacts (configs, security code) | cc_kb_pattern_template("eval-optimizer") |
| Orchestrator-workers | 2–5× | Large features where subtasks emerge during work | cc_kb_pattern_template("orchestrator-workers") |
| ReAct | 1.2–2× | Open-ended debugging, exploration | cc_kb_pattern_template("react") |
| Blackboard | 3–6× | Multi-agent collaborative review/synthesis | cc_kb_pattern_template("blackboard") |
Each pattern deploys artifacts across layers. Example for reflection:
| Layer | Artifact |
|---|---|
| L1 — CLAUDE.md | Add rule: "Review your own output before presenting. Check for off-by-one errors, unhandled edge cases, and inconsistency with existing code patterns." |
| L2 — Skill | None required — behavior driven from CLAUDE.md |
| L3 — Hook | Optional: PostToolUse on Write|Edit that prompts self-verify |
| L4 — Agent | agents/audit-reviewer for explicit second-pass when risk is high |
| L5 — Memory | Save rejection reasons to engram for learning |
Fetch a specific pattern's full wiring via cc_kb_pattern_template(name).
When the task is ambiguous, launch pattern-router:
Agent({
subagent_type: "pattern-router",
prompt: "Task: {...}. Select the optimal agentic pattern with rationale."
})
Router returns: pattern name + 5-layer wiring + cost estimate + anti-patterns.
| Need | Tool |
|---|---|
| Fetch pattern template | cc_kb_pattern_template(name) |
| Decide orchestration cost cap | cc_docs_model_recommend(task, budget) |
| Recommend topology for multi-agent | cc_docs_team_topology_recommend(task, complexity, team_size) |
Both fan out to multiple agents. The difference is whether agents read each other's work:
| | Parallelization | Blackboard | |---|---|---| | Agents see peers? | No — each gets only their scope | Yes — each reads the shared board before writing | | Subtasks | Fully independent | Overlapping; one agent's finding informs another | | Example | Run security + perf + test reviews simultaneously | Security agent flags an issue; architecture agent reads it and re-evaluates their finding | | Cost | 1–3× | 3–6× (extra rounds per agent) | | When to choose | Subtasks have zero shared state | Agents must build on each other's output (adversarial or consensus-building) |
If in doubt: start with parallelization. Upgrade to blackboard only when a second round of cross-agent reasoning is demonstrably necessary.
development
Enhanced plan-authoring skill with Pre-Writing context gathering, task metadata, non-TDD templates, Red Flags, telemetry, and an automated plan linter. Use when you have a spec or requirements for a multi-step task, before touching code.
tools
Documentation intelligence engine with graph-based API docs, algorithm library, and drift detection
tools
Ultraplan cloud planning — kick off a plan in the cloud from your terminal, review and revise in the browser, then execute remotely or send back to CLI
tools
--- name: mcp description: Configure MCP servers for Claude Code — stdio vs HTTP, authentication, Tools/Resources/Prompts distinction, channels (CI webhook, mobile relay, Discord bridge, fakechat), and cost of always-loaded tools. Use this skill whenever adding an MCP server, debugging connection issues, choosing between MCP Tools vs Prompts vs Resources, installing channel servers, or managing .mcp.json. Triggers on: "MCP server", "mcp config", "add Obsidian MCP", "install context7", "channels"