AI WorkflowAgent SkillAI Agent

AI workflows and agent skills: what they are and how to use them

This guide explains what AI workflows and agent skills are, how they differ, how to choose, and how real systems use the two together.

By Rahmatullah Musawi · · updated 8 October 2026 · 6 min read · sources checked 5 October 2026

Key points

  • A workflow is a set of AI steps whose order is fixed in program code; a skill is a folder of instructions that an AI agent loads when a task needs it.[1] [2]
  • In Claude Code and in Microsoft's Agent Framework, which offer both, code decides the next step in a workflow; with a skill, the AI model decides, guided by the instructions.[3] [4]
  • Rule of thumb: use a skill when the AI should work out how to do a task, and a workflow when the steps and their order must be guaranteed.[4]
  • The two combine: in LangChain's tools, for example, a workflow fixed in code can contain agents that load skills on demand.[5]

Workflows and skills are two of the ways to make an AI system carry out a multi-step task.3 A workflow follows a path that is written beforehand.1 A model can also handle input that is not fixed in advance: it interprets natural language or documents6, and an agent can load more data while it works.7 That is why an agent fits tasks whose steps cannot be predicted.1 A skill gives that agent the instructions for such a task.2

What is an AI workflow?

A workflow is a system in which program code fixes the path that calls to a large language model (LLM) and tools follow.1

Anthropic describes five common patterns.1 Each one is a different shape of path:

Five workflow patterns
Each diagram is one pattern, read from In to Out. Blue is an LLM call, navy is a step in code. Dashed lines are chosen by the model while the task runs; dotted lines are paths not taken.
INLLM call 1GatePassFailEXITLLM call 2LLM call 3OUTPrompt chainingEach LLM call works on the output of the previous one. A check in code, the gate, can stop the run between steps.
INOUTRouterLLM call 1LLM call 2LLM call 3RoutingAn input is classified and sent to one specialized follow-up step.
INOUTLLM call 1LLM call 2LLM call 3AggregatorParallelizationSeveral LLM calls work at the same time, and code combines their outputs.
INOUTOrchestratorLLM call 1LLM call 2LLM call 3SynthesizerOrchestrator-workersA central LLM decides the subtasks while the task runs and hands them to worker LLMs; their results are then synthesized.
INOUTGeneratorEvaluatorSolutionRejected + feedbackAcceptedEvaluator-optimizerOne LLM call generates a response, and another evaluates it and gives feedback, in a loop.

Workflows suit well-defined tasks, where they offer predictability and consistency.1

What is an agent skill?

A skill, also called an Agent Skill, is a folder of instructions, scripts and resources that an AI agent loads when a task calls for it.2 The folder holds a file named SKILL.md with a name, a description and the instructions; scripts and reference files are optional.8

An agent does not read all its skills at once. It loads each skill in three stages, so it can keep many skills available without filling its context, the text a model can take in at one time.8

How an agent loads a skill in three stages
The folder of one skill, and when the agent loads each part of it. The numbers match the notes.
Agentmy-skill/SKILL.mdname, descriptioninstructionsscripts/executable codereferences/documentationassets/templates, resourcesloads into its contextat startup1task matches2as needed3
  1. DiscoveryAt startup the agent loads only the name and description of each skill, about 100 tokens.8 9
  2. ActivationWhen a task matches a skill's description, the agent reads the full instructions in SKILL.md.8
  3. ExecutionThe agent follows the instructions and, as needed, runs the skill's scripts or loads its other files.8

Skills measurably help. In the SkillsBench test of 87 tasks, curated skills raised agents' average pass rate from 33.9% to 50.5%. Skills that the models wrote for themselves lowered it in the three setups tested.10

Workflow and skill: the differences

Claude Code and Microsoft's Agent Framework, which offer both, name the same main difference: who decides the next step. In a workflow it is the code, and with a skill it is the AI model.3 4 The diagram shows both.

Who decides the next step: with a skill and in a workflow
The outer box shows who decides: the agent in the first diagram, a script in the second.
With a skill
The model decides each next step, turn by turn, following the skill's instructions.
AgentTASKLLMdecidesToolsactSkillinstructionsThe model chooses eachnext step, turn by turn.RESULT
In a workflow
A script decides the steps and starts the agents.
SCRIPT (CODE)TASKReviewerfile 1Reviewerfile 2Reviewernext fileRankerranks, deduplicatesONE RANKED SUMMARY
The workflow shown is an example from the Claude Code documentation: one reviewer per changed file, then one agent that ranks and deduplicates the findings.3

The table lists the practical differences that these two products document:

SkillWorkflow
Who decides the next stepThe model, following the instructions3The script3
Where intermediate results are keptThe model's context window3Script variables3
RepeatabilityThe model interprets the instructions, so the outcome can vary11A saved workflow runs the same orchestration each time3
After a failureThe whole operation is retried4Can resume from the last successful step4
Token useAbout 100 tokens per skill until it is used12A run starts many agents, so it can use meaningfully more tokens than the same task done in conversation3

Choosing: workflow, skill or both

Microsoft's documentation gives a rule of thumb: use a skill if the AI should figure out how to accomplish a task, and a workflow if you need to guarantee which steps run and in what order.4

Start with the simplest option that works, because workflows and agents often trade latency and cost for better task performance.1 The path below asks the questions in that order.

A decision path: single call, workflow, skill or both
Start at the top and follow Yes or No. The numbers match the notes.
A TASK1Is one optimizedLLM call enough?YesOne LLM callneither is neededNo2Guaranteed steps,recovery or manyagents needed?YesWorkflowfixed in codeNothen, foreach step3Should the AIwork out how todo the task?YesSkillthe model decidesNoNO SKILL NEEDED4
  1. Is one optimized LLM call enough?With retrieval and examples, it is for many applications.1 Then neither is needed.
  2. A workflow, if one of these holds
    • The steps and their order must be guaranteed.4
    • A failed run must resume from the last successful step.4
    • A step must not run twice, such as charging a payment.4
    • The same step runs across many items, or the task needs more agents than one conversation can coordinate.3
  3. A skill, if one of these holds
    • The task calls for an agent because its input is unstructured, such as natural language or documents.6
    • You keep pasting the same instructions or checklist.13
    • The task is focused, lies in one domain and can be handled by one agent.4
  4. The answer can be bothA workflow can hand single steps to agents, and those agents can use skills.5 The next section shows how.

How real systems combine both

Workflows and skills are not an either-or choice. One arrangement uses a workflow for the overall order, hands the steps that need judgment to agents, and gives those agents skills.5

One system: code keeps control, an agent does the open step
One run, from top to bottom. The numbers in the diagram match the notes.
WORKFLOW (CODE)Agent step2A REQUEST IN NATURAL LANGUAGEStart agentpasses input1SkillsinstructionsLLMdecidesToolsload data, actwaitsCheck resultpass or fail3Fail: againPassCode stepfixed order4progress savedApproval5DONE
  1. Code starts the agent stepThe workflow, not the agent, decides when an agent runs and what input it gets.3
  2. The agent handles what is not fixedA model can interpret natural language or documents where fixed rules fall short.6 The agent loads a skill's instructions on demand5 and more data through its tools.7
  3. Code checks the resultThe agent's output goes back to the code. A check in code decides whether the run goes on1, and a failed agent step can be run again.3
  4. Exact steps run as codeThese steps are fixed code and need no model call.5 14
  5. A person can step in, and progress is savedThe workflow pauses for input or approval and resumes without repeating finished steps.15 16
Each part of this picture is documented by at least one of the systems in the table below; it is not the diagram of one system. It can also be the other way round: an agent that calls a workflow.5 16

Five systems have a part in which code runs the steps and a part in which an agent uses skills:

SystemCode runs the stepsAn agent uses skills
LangChain (LangGraph, Deep Agents)LangGraph, for workflows that mix deterministic and agentic steps5Deep Agents, which load skills on demand and can be placed inside a LangGraph workflow5
Hermes AgentA scheduler runs jobs at set times; a job can be a plain script without the model, and one job's output can feed the next14An agent job loads one or more skills before it runs its prompt14
Claude CodeA script runs many subagents3Subagents can find and use skills11
Microsoft Agent FrameworkWorkflows take agents as participants, save their progress and pause for outside input15An agent loads a skill when a task matches it4
OpenClawLobster runs a multi-step tool pipeline as one deterministic call, with approval checkpoints and resume tokens16Listed among the products that support Agent Skills8

The bottom line

A workflow puts the order of the steps into code: use it when the steps, their order and the recovery after a failure must be guaranteed. A skill puts the know-how into instructions that an agent loads on demand: use it when the AI should work out how to do the task. The systems compared here have both parts, and in LangChain's tools, for example, a workflow can contain agents that load skills.

Sources

  1. Building effective agents Anthropic
  2. Equipping agents for the real world with Agent Skills Anthropic
  3. Orchestrate subagents at scale with dynamic workflows Claude Code docs
  4. Agent Skills Microsoft Agent Framework docs
  5. Deep Agents vs LangChain vs LangGraph LangChain
  6. A practical guide to building agents OpenAI
  7. Effective context engineering for AI agents Anthropic
  8. Agent Skills Overview agentskills.io
  9. Specification agentskills.io
  10. SkillsBench: Benchmarking How Well Agent Skills Work Across Diverse Tasks arXiv, full text
  11. Extend Claude Code Claude Code docs
  12. Agent Skills Claude Platform docs
  13. Extend Claude with skills Claude Code docs
  14. Scheduled Tasks (Cron) Hermes Agent docs
  15. Workflow capabilities Microsoft Agent Framework docs
  16. Lobster OpenClaw docs

Written by Rahmatullah Musawi with the help of an AI assistant.