Back to Blog
EnglishAI Coding

Claude Code Skills vs Subagents vs Dynamic Workflows: Which One Should You Use?

Claude Code, Codex, Cursor, and modern AI coding tools now expose multiple workflow primitives: skills, subagents, background agents, and dynamic workflows. This guide explains when to use each, with a small selector tool and Crazyrouter model-routing examples.

C
Crazyrouter Team
June 3, 2026 / 973 views
Share:
Claude Code Skills vs Subagents vs Dynamic Workflows: Which One Should You Use?

Claude Code Skills vs Subagents vs Dynamic Workflows: Which One Should You Use?#

AI coding tools are no longer just chat boxes.

Claude Code, Codex, Cursor, OpenClaw, and similar tools are moving toward workflow primitives: skills, subagents, background agents, and dynamic workflows.

That is good, but it creates a new problem: developers are starting to use the same hammer for every task.

A simple prompt, a reusable skill, a subagent, a background branch, and a dynamic workflow are not the same thing.

This guide gives a practical decision framework.

Dynamic workflow routing benchmark

Quick answer#

PrimitiveBest forAvoid when
Simple promptSmall, low-risk one-off tasksMulti-file or high-risk changes
SkillRepeated SOPs, formatting rules, publishing workflows, domain proceduresOne-off exploratory work
SubagentScoped research, audit, review, triage, isolated investigationTasks that require central orchestration
Background agentLong-running branch/worktree tasksWork requiring immediate tight feedback
Dynamic workflowComplex multi-step work needing planning, implementation, review, verificationTiny edits or cheap one-shot tasks

The core idea: choose the primitive by workflow shape, not by hype.

1. Simple prompt#

Use a simple prompt when the task is small and reversible.

Examples:

  • explain this function;
  • rename a variable in one file;
  • write a short regex;
  • summarize an error message;
  • draft a small README section.

A simple prompt is fast. It has low overhead. It does not need orchestration.

But it breaks down when the task has multiple phases or hidden risks.

2. Skill#

A skill is best when you repeat the same process many times.

Examples:

  • invoice email SOP;
  • blog publishing rules;
  • daily growth report workflow;
  • platform-specific formatting rules;
  • support triage procedure;
  • benchmark article checklist.

A skill is not a worker. It is reusable operational knowledge.

If you find yourself writing the same instructions again and again, turn them into a skill.

In our own workflow, we created:

text
skills/agent-workflow-replicator/SKILL.md

Its job is to turn viral Codex, Claude Code, and Cursor workflow examples into reproducible experiments, articles, and tools.

3. Subagent#

A subagent is useful when a task can be scoped and delegated.

Examples:

  • audit this PR for security issues;
  • inspect a repo for broken links;
  • compare three API responses;
  • research competing tools;
  • review logs and summarize root cause.

A good subagent has a narrow mission and reports back.

The mistake is giving every subagent the full product goal. That creates duplication and inconsistent decisions.

Subagents are workers. They are not always orchestrators.

4. Background agent#

A background agent is useful when work can run asynchronously.

Examples:

  • large refactor in a separate branch;
  • generating tests across a codebase;
  • dependency migration;
  • overnight research;
  • multiple git worktree experiments.

This is the pattern behind many Cursor background-agent discussions: move long-running work out of the local single-branch loop.

The key requirement is isolation. A background agent should not quietly corrupt the main working tree.

Use branches, worktrees, explicit diffs, and review gates.

5. Dynamic workflow#

A dynamic workflow is for complex work that needs multiple phases.

Examples:

  • billing export with authorization tests;
  • multi-file migration;
  • security-sensitive refactor;
  • agent workflow benchmark;
  • production incident automation;
  • model routing evaluation.

A dynamic workflow should create packets:

text
planner -> implementer -> adversarial reviewer -> verifier

That is why we built:

text
tools/agent_workflows/workflow_orchestrator.py

It generates a reproducible workflow folder with role packets, verification gates, and trace logging.

A selector tool#

We also created a small selector:

text
tools/agent_workflows/workflow_primitive_selector.py

Example:

bash
python tools/agent_workflows/workflow_primitive_selector.py \
  --task "Refactor billing export across 20 files with authorization tests and rollback notes" \
  --json

Output:

json
{
  "task": "Refactor billing export across 20 files with authorization tests and rollback notes",
  "scores": {
    "simple_prompt": 0,
    "skill": 0,
    "subagent": 0,
    "dynamic_workflow": 5,
    "background_agent": 0
  },
  "recommendation": "dynamic_workflow",
  "reason": "Complex change needs planner, implementer, reviewer, verifier, and evidence gates."
}

The selector is intentionally simple. It is a starting point for teams to encode their own workflow policy.

Where model routing fits#

Once you choose the primitive, choose the model route.

For example:

StepModel route idea
Skill-guided formattingfast/cheap model
Planningstronger reasoning model
Implementationcoding-optimized model
Adversarial reviewdifferent model from implementer
Verification summaryfast model after tests run

With Crazyrouter, the client can stay OpenAI-compatible:

python
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_CRAZYROUTER_API_KEY",
    base_url="https://cn.crazyrouter.com/v1"
)

resp = client.chat.completions.create(
    model="claude-opus-4-8",
    messages=[{"role": "user", "content": "Review this implementation plan for missing tests."}],
    temperature=0
)

Do not add UTM parameters to API base URLs. Human-facing links can have UTM. Code endpoints should stay clean.

Decision tree#

Use this rule of thumb:

text
Is it tiny and low-risk?
  -> simple prompt

Is it a repeated SOP or domain process?
  -> skill

Can it be delegated as a scoped investigation?
  -> subagent

Does it need to run for a long time in isolation?
  -> background agent

Does it require planning, implementation, review, and verification?
  -> dynamic workflow

Common mistakes#

Mistake 1: turning every task into a dynamic workflow#

Dynamic workflows have overhead. Do not use them for tiny edits.

Mistake 2: using skills as if they were workers#

Skills are reusable instructions. They do not replace execution or verification.

Mistake 3: letting subagents make product-level decisions#

Subagents should report findings. The orchestrator or human owner should decide.

Mistake 4: no trace logs#

If a workflow has multiple steps, log the role, model, latency, tokens, result, and evidence.

Without logs, you cannot improve routing.

Final recommendation#

For production AI coding, build a small operating system around your agents:

  • skills for repeated rules;
  • subagents for scoped work;
  • background agents for isolated long-running tasks;
  • dynamic workflows for complex changes;
  • model routing for cost and quality control;
  • trace logs for evidence.

The future is not one magical coding agent. It is a set of workflow primitives, routed through the right models and verified with evidence.

Try model routing with Crazyrouter: Crazyrouter

Implementation Guides

Podcast

AI Dev Tools: The Crazyrouter Podcast

Short episodes for developers on AI APIs, gateways, cost control and coding tools.

Latest episodes

  • EP196 · Oct 29, 2026 · 6:53

    AI API Security Posture — Turn Controls Into Continuous Evidence

    A practical guide to AI API security posture: inventory exposure, verify controls continuously, protect keys and data, constrain tools, and turn security assumptions into evidence that operators can act on.

  • EP195 · Oct 28, 2026 · 7:21

    AI API Policy Drift — Detect When Production Rules Stop Matching Intent

    A practical guide to policy drift in AI APIs: version routing and safety rules, detect stale enforcement, compare intended and observed behavior, and restore control before small gaps become incidents.

Episodes with written show notes →

Related Articles

Background Coding Agents Without Lock-In: Recreating the Cursor Pattern with Git WorktreesAI Coding

Background Coding Agents Without Lock-In: Recreating the Cursor Pattern with Git Worktrees

Cursor background agents are useful because they move long-running AI coding work out of your local single-branch loop. This guide rebuilds the same workflow pattern with plain git worktrees, task packets, trace logs, and Crazyrouter model routing.

Jun 4
Three Agent Routes, One Tool Contract: Completed Turns Can Still Fail JSONAI Coding

Three Agent Routes, One Tool Contract: Completed Turns Can Still Fail JSON

Opus 4.8 and Sonnet 4.6 complete synthetic stock lookups but wrap the final JSON; GPT-5.5 returns HTTP 404. Six executor checks pass, while no route passes the complete strict contract.

Jun 3
Claude Code Dynamic Workflows, Rebuilt: A Practical Ultracode-Style Orchestration TemplateAI Coding

Claude Code Dynamic Workflows, Rebuilt: A Practical Ultracode-Style Orchestration Template

Dynamic workflows in Claude Code are trending because they turn one prompt into orchestration, subagents, and verification gates. We rebuilt the useful pattern as a reproducible local workflow with model routing through Crazyrouter.

Jun 3
"Claude Plans, Codex Reviews: Rebuilding the Viral Two-Agent Coding Workflow with Crazyrouter"AI Coding

"Claude Plans, Codex Reviews: Rebuilding the Viral Two-Agent Coding Workflow with Crazyrouter"

"Twitter is full of Codex-in-Claude-Code workflows. We rebuilt the useful part: one agent plans or implements, a second agent reviews adversarially, and the whole process becomes reproducible packets instead of copy-paste chaos."

Jun 3
"AI API Pricing Comparison 2026: OpenAI, Claude, Gemini, DeepSeek, and Gateways"Comparison

"AI API Pricing Comparison 2026: OpenAI, Claude, Gemini, DeepSeek, and Gateways"

"Compare AI API pricing in 2026 by token economics, context, caching, batch work, and production workflow. Includes code examples and a practical gateway cost model."

Sep 20
Claude Opus 4.7 vs Opus 4.6: 7 Real-World Benchmarks via CrazyrouterTutorial

Claude Opus 4.7 vs Opus 4.6: 7 Real-World Benchmarks via Crazyrouter

We benchmarked Claude Opus 4.7 against Opus 4.6 on 7 tasks through Crazyrouter: coding, debugging, math, writing, translation, context, and reasoning.

Apr 16