Agentic AI AcademyAgentic AI Academy

MCP vs Skills vs Automations

Choosing the right extension mechanism

Intermediate 11 minBuilderDecision-maker
What you'll be able to do
  • Decide when context belongs in an MCP server versus a skill versus an automation, using a single decision framework
  • Recognize the signal that a repeated or repeatedly-corrected prompt should become a skill, and scope it with 2-3 concrete use cases
  • Explain the principle 'skills define the method, automations define the schedule' and why automation comes last
  • Use the in-session surfaces — /mcp, /skills, /plugins, /hooks, /apps, /memories — to inspect and manage each mechanism
  • Keep a skill local while you iterate and package it as a plugin only when you need to share it
  • Avoid the core anti-pattern of building automations before the underlying workflow works reliably by hand
At a glance

Codex has three distinct ways to extend it, and reaching for the wrong one is the most common way teams make their setup worse. This lesson gives you a clean decision framework: MCP brings in context and tools that live outside the repo, skills capture a method you keep repeating, and automations put a schedule on top of a skill. The golden rule — make a workflow reliable by hand before you ever schedule it — runs through all three.

  1. 1Three mechanisms, three different jobs
  2. 2Reach for MCP when context lives outside the repo
  3. 3Turn a repeated prompt into a skill
  4. 4Automations add a schedule — last, not first
  5. 5The decision framework in one table
  6. 6The in-session surfaces: /mcp, /skills, /plugins, /hooks, /apps, /memories

Three mechanisms, three different jobs

Codex is extensible in three ways, and the single biggest mistake is treating them as interchangeable. They answer three different questions:

  • MCP answers "where does the agent get context and tools that live outside this repo?" — connect Codex to a database, an issue tracker, a design tool, or a docs service.
  • Skills answer "how should the agent do this recurring task?" — a reusable, named method for a workflow you keep performing.
  • Automations answer "when should that method run?" — a schedule (or trigger) layered on top of a skill.

The cleanest way to hold this: MCP is what the agent can reach, a skill is the method, and an automation is the schedule. They compose — an automation can run a skill that calls an MCP tool — but each solves a problem the others don't. Picking the wrong layer (stuffing a method into MCP, or scheduling a workflow that isn't reliable yet) is exactly how setups rot.

The rest of this lesson is a decision framework for choosing among them, plus the in-session surfaces Codex gives you to inspect each one.

Key insight

One sentence to anchor on

MCP = what the agent can reach. Skill = the method it follows. Automation = the schedule that fires the method. Three different questions — answer them separately.

Reach for MCP when context lives outside the repo

The official rule is precise and worth memorizing: use MCP when the needed context lives outside the repo, the data changes frequently, or you want Codex to use a tool. Each clause is a separate trigger.

  • Lives outside the repo — the truth you need isn't in your files. Open tickets in Jira, rows in a production database, a Figma design, current library docs. The repo can't tell Codex what an open bug says; an MCP server can.
  • Changes frequently — anything you'd otherwise paste into a prompt and watch go stale. A snapshot of your schema rots; a live database MCP server is always current.
  • You want Codex to use a tool — not just read data, but take an action through an external system (query an API, fetch a page, run a service-specific operation).

If instead the context lives in your repo — your architecture, your conventions, your build commands — that belongs in AGENTS.md, not an MCP server. And if you find yourself describing a procedure over and over, that's a skill, not MCP. MCP is the plumbing to the outside world; it is not where you put instructions.

You add a server with codex mcp add and inspect what's connected with /mcp in the TUI:

bash
# stdio server (a local process Codex launches)
codex mcp add context7 -- npx -y @upstash/context7-mcp

# streamable HTTP server (a remote URL)
codex mcp add figma --url https://mcp.figma.com/mcp --bearer-token-env-var FIGMA_OAUTH_TOKEN

Servers are stored in ~/.codex/config.toml; /mcp in a session lists the active servers and their tools.

Tip

MCP vs AGENTS.md — don't confuse them

Context that is in your repo and stable (conventions, build/test commands, do-not rules) goes in AGENTS.md. MCP is for context that lives outside the repo or changes frequently. A stale snapshot pasted into a prompt is the smell that you needed MCP.

Watch out

External content is untrusted

Treat all MCP tool output as untrusted input — it can carry prompt-injection payloads. Keep approvals and sandbox tight, gate risky MCP tools with approval modes, and never grant full access just to make a server convenient.

Turn a repeated prompt into a skill

A skill is a reusable, named method — you teach Codex how to do a recurring task once, then invoke it instead of re-explaining every time. The signal that something should become a skill is simple and behavioral:

"If you keep reusing the same prompt or correcting the same workflow, it should probably become a skill."

Two triggers, both about repetition: a prompt you keep retyping, or a workflow where you keep making the same correction ("no, run the linter first," "always update the changelog too"). Those corrections are the method trying to become a skill.

Scope it with 2-3 concrete use cases. Don't try to write a general-purpose skill in the abstract — start from two or three real instances of the task you've actually done, and capture the method that covers them. A skill grounded in concrete cases is sharper and more reliable than one written speculatively.

Manage skills in-session with /skills (browse and use them). The discipline that keeps skills useful:

  • Keep skills local while you iterate. Refine the method against real tasks on your own machine first. A skill that's still changing shape doesn't belong in a shared package.
  • Package as a plugin to share. Once a skill is stable and you want your team to use it, package it as a plugin. Browse installed and discoverable plugins with /plugins.

Notice the boundary with MCP: a skill is instructions and method; MCP is reach. A skill can call MCP tools, but the moment you're writing down "how to do X," you're writing a skill, not configuring a server.

Example

From correction to skill

You ask Codex to cut a release three times, and each time you correct it: "bump the version, update CHANGELOG.md, then tag." That repeated correction is the method. Capture those 2-3 real release runs as a release skill, and the next cut follows the method without you re-steering it.

Automations add a schedule — last, not first

An automation runs a skill on a schedule (or trigger) without you in the loop. The defining line is the one to memorize:

"Skills define the method, automations define the schedule."

An automation has no method of its own — it fires a skill at a chosen time or event. Good candidates are recurring, low-judgment chores you'd otherwise forget: nightly commit summaries, a scheduled bug scan, release notes on tag, a CI-failure check that runs when a build goes red.

The hard rule — and the heart of this lesson — is sequencing: automate only after the manual workflow is reliable. The order is always:

  1. Run the task by hand in a session until it works consistently.
  2. Capture the stable method as a skill.
  3. Only then wrap the skill in an automation with a schedule.

Skip step 1 or 2 and you've built a robot that reliably does the wrong thing on a timer, unattended, where no one is watching to catch it. An unreliable manual workflow doesn't get more reliable by being scheduled — it gets less visible.

text
  manual & reliable  ──▶  capture as SKILL  ──▶  schedule as AUTOMATION
   (you verify it)        (the method)            (the schedule)

Think of it as a ladder you climb in order: prove it works, name the method, then let it run on its own.

Watch out

The cardinal anti-pattern

Creating an automation before the workflow is reliable manually. Automation amplifies whatever it wraps — a flaky workflow becomes a flaky workflow that runs unattended on a schedule. Earn the automation by making the manual version boringly dependable first.

The decision framework in one table

Put the three mechanisms side by side and the choice usually makes itself. Ask the questions in order:

QuestionIf yes →In-session surface
Does the context/tool live outside the repo or change frequently?MCP server/mcp
Is the context in the repo and stable (conventions, build/test cmds)?AGENTS.md (not an extension)/init to scaffold
Am I repeating a prompt or making the same correction over and over?Skill/skills
Do I want a reliable skill to run on a schedule / trigger?Automation(built on a skill)
Do I want to share a stable skill with my team?Plugin/plugins

A few sharpening notes:

  • These are not mutually exclusive — a real setup often has all of them. An automation runs a skill whose method calls an MCP tool and follows your AGENTS.md conventions.
  • MCP vs skill is the most-confused pair: MCP is reach (what the agent can touch), a skill is method (how it should act). When in doubt, ask whether you're connecting to something or describing how to do something.
  • Skill vs automation is just method vs schedule. If you can already invoke it cleanly by hand, the only thing automation adds is when.

Keep the ordering instinct, too: AGENTS.md and MCP set up what Codex knows and can reach; skills capture how; automations decide when — and you only get to "when" after "how" is reliable.

Tip

Two diagnostic questions

(1) Am I connecting to something or describing how to do something? Connecting → MCP. Describing → skill. (2) Can I already do it cleanly by hand? If not, you are not ready to automate — fix the method first.

The in-session surfaces: /mcp, /skills, /plugins, /hooks, /apps, /memories

Codex exposes each extension mechanism through a slash command, so you can inspect and manage your setup without leaving the session. Knowing what each surface is for keeps you from mixing them up:

CommandWhat it managesUse it to
/mcpConfigured MCP servers and their toolsSee which external servers are connected and what tools they expose
/skillsYour reusable methodsBrowse and invoke skills
/pluginsInstalled and discoverable pluginsBrowse plugins (how stable skills get shared)
/hooksLifecycle hooksReview hooks that fire on agent lifecycle events
/appsApps / connectorsBrowse connectors and insert one into a prompt
/memoriesMemory use and generationConfigure what Codex remembers and how it generates memories

The practical workflow: when something feels off — Codex can't reach a tool, a skill isn't firing, a connector is missing — open the matching surface to see actual state rather than guessing. /mcp tells you a server is connected; /skills tells you a method exists; /plugins tells you what's installed to share. These surfaces are how you audit your extension setup, which matters most right before you automate something, because an automation runs unattended and you want to confirm every piece it depends on is actually live.

The roster of slash commands evolves; check the live reference for the current set rather than memorizing it.

Note

The slash roster is volatile

Codex's slash commands change between releases (for example, /approvals was renamed /permissions, and there is no /undo — roll back with git). Confirm the current set at developers.openai.com/codex/cli/slash-commands rather than trusting a memorized list.

Try it: Climb the extension ladder: MCP → skill → (don't yet) automate

Goal: practice the decision framework on one real workflow instead of guessing. 1) Pick a recurring chore you actually do in a repo — for example, summarizing what changed before a commit, or scanning a module for obvious bugs. 2) Classify your needs. Write one line each: is there context you keep pasting that lives outside the repo or changes often? (If yes, that's an MCP candidate.) Is there a method you keep re-explaining or correcting? (That's the skill.) 3) Wire up reach if needed. If you found external context, add a server with codex mcp add <name> -- <command> (or --url for HTTP), then run /mcp to confirm it's connected and see its tools. 4) Run the workflow by hand, twice, in a normal Codex session. Each time you correct Codex, write the correction down — those corrections are your method. 5) Capture 2-3 concrete cases as a skill and browse it with /skills. Keep it local; don't package a plugin yet. 6) Deliberately do NOT automate. Instead, write three sentences: was your chore actually reliable by hand? what would break if you'd scheduled it on day one? and which surface (/mcp, /skills, /plugins) would you check before ever turning it into an automation? This builds the instinct the whole lesson is about — reach, then method, then (only when it's boringly reliable) schedule.

Key takeaways

  1. 1Three mechanisms, three jobs: MCP is what the agent can reach, a skill is the method it follows, an automation is the schedule that fires the method — they compose but are not interchangeable.
  2. 2Use MCP when context lives outside the repo, changes frequently, or you want Codex to use a tool; stable in-repo context belongs in AGENTS.md, and a repeated procedure belongs in a skill.
  3. 3When you keep reusing a prompt or making the same correction, turn it into a skill — and scope it with 2-3 concrete use cases rather than writing it in the abstract.
  4. 4'Skills define the method, automations define the schedule': automate only after the manual workflow is reliable, in the order run-by-hand → skill → automation.
  5. 5Keep skills local while iterating and package them as a plugin only when they're stable and you want to share them; inspect everything via /mcp, /skills, /plugins, /hooks, /apps, /memories.
  6. 6The cardinal anti-pattern is building an automation before the workflow works manually — scheduling an unreliable workflow just makes it fail unattended.

Quiz

Lock in what you learned

Check your understanding

0 / 4 answered

1.Your team keeps pasting a snapshot of the production database schema into Codex prompts, and it keeps going stale. Which extension mechanism best fits, and why?

2.What is the most reliable signal that a workflow should be captured as a skill?

3.A colleague wants to set up a nightly automation that runs a brand-new bug-scan workflow they've never actually run by hand. What's the correct guidance?

4.You're mid-session and want to check which external servers Codex is currently connected to and what tools they expose. Which surface do you use?

Go deeper

Hand-picked sources to keep learning