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.
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:
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
- DiscoveryAt startup the agent loads only the name and description of each skill, about 100 tokens.8 9
- ActivationWhen a task matches a skill's description, the agent reads the full instructions in
SKILL.md.8 - 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.
The table lists the practical differences that these two products document:
| Skill | Workflow | |
|---|---|---|
| Who decides the next step | The model, following the instructions3 | The script3 |
| Where intermediate results are kept | The model's context window3 | Script variables3 |
| Repeatability | The model interprets the instructions, so the outcome can vary11 | A saved workflow runs the same orchestration each time3 |
| After a failure | The whole operation is retried4 | Can resume from the last successful step4 |
| Token use | About 100 tokens per skill until it is used12 | A 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.
- Is one optimized LLM call enough?With retrieval and examples, it is for many applications.1 Then neither is needed.
- A workflow, if one of these holds
- A skill, if one of these holds
- 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
- Code starts the agent stepThe workflow, not the agent, decides when an agent runs and what input it gets.3
- 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
- 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
- Exact steps run as codeThese steps are fixed code and need no model call.5 14
- A person can step in, and progress is savedThe workflow pauses for input or approval and resumes without repeating finished steps.15 16
Five systems have a part in which code runs the steps and a part in which an agent uses skills:
| System | Code runs the steps | An agent uses skills |
|---|---|---|
| LangChain (LangGraph, Deep Agents) | LangGraph, for workflows that mix deterministic and agentic steps5 | Deep Agents, which load skills on demand and can be placed inside a LangGraph workflow5 |
| Hermes Agent | A scheduler runs jobs at set times; a job can be a plain script without the model, and one job's output can feed the next14 | An agent job loads one or more skills before it runs its prompt14 |
| Claude Code | A script runs many subagents3 | Subagents can find and use skills11 |
| Microsoft Agent Framework | Workflows take agents as participants, save their progress and pause for outside input15 | An agent loads a skill when a task matches it4 |
| OpenClaw | Lobster runs a multi-step tool pipeline as one deterministic call, with approval checkpoints and resume tokens16 | Listed 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
- Building effective agents Anthropic
- Equipping agents for the real world with Agent Skills Anthropic
- Orchestrate subagents at scale with dynamic workflows Claude Code docs
- Agent Skills Microsoft Agent Framework docs
- Deep Agents vs LangChain vs LangGraph LangChain
- A practical guide to building agents OpenAI
- Effective context engineering for AI agents Anthropic
- Agent Skills Overview agentskills.io
- Specification agentskills.io
- SkillsBench: Benchmarking How Well Agent Skills Work Across Diverse Tasks arXiv, full text
- Extend Claude Code Claude Code docs
- Agent Skills Claude Platform docs
- Extend Claude with skills Claude Code docs
- Scheduled Tasks (Cron) Hermes Agent docs
- Workflow capabilities Microsoft Agent Framework docs
- Lobster OpenClaw docs
Written by Rahmatullah Musawi with the help of an AI assistant.