Do you find yourself asking AI to do the same thing every week? You start a chat, give it roughly the same instructions, add whatever is new, and correct it a few times before you get something you can use.

That chat is a workflow waiting to be written down. Getting there has three stages, and each one has to work before you move to the next:

  1. Chat. You do the task with the agent by hand and notice what you keep correcting.
  2. Saved workflow. You write the instructions down as a skill and run it on demand until it stops needing you halfway through.
  3. Scheduled run. Once the saved workflow is reliable, you let it run on its own.

Most of the value is in stage 2. Scheduling is the last step, and some workflows should never get there.

A note on terms: Claude Code also has a feature called dynamic workflows, where Claude writes a script that runs many agents in parallel for large one-off jobs such as codebase migrations. That is a different tool for a different problem. This article is about one agent doing the same job the same way each time.

What do you keep correcting?

Look back at three or four of those chats and list every correction you made. Most fall into four groups, and each one becomes part of the written workflow:

  • Where to look. You keep pointing the agent to the same folder, report, or system. That becomes the inputs.
  • What to include. You keep telling it what matters and what to skip. That becomes the selection criteria.
  • How it should look. You keep fixing the order, headings, or level of detail. That becomes the template.
  • What to do when something is off. You keep stepping in when a source is missing or a number looks wrong. That becomes the rules for gaps.

Some corrections are judgment calls that change week to week, such as what deserves top billing. Don’t try to write those down as rules. Ask the agent to flag what stands out so you make the call when you review.

How do you write the workflow down?

Write it as a skill. A skill is a folder with a file called SKILL.md that holds the instructions, plus any templates or scripts the instructions refer to. Claude Code and Codex both follow the same open Agent Skills standard, so one skill works in both tools. Only the folder it lives in differs:

Claude Code:  .claude/skills/weekly-report/
Codex:        .agents/skills/weekly-report/

weekly-report/
├── SKILL.md        the workflow itself
├── template.md     what a finished result looks like
└── scripts/        optional: steps that must run exactly the same way every time

SKILL.md has two parts. The top section (called frontmatter) holds a name and a one-line description. The agent reads the description to decide when the skill applies, so describe when to use it, not just what it is. The body below is the workflow: write it as if you were handing the task to someone for the first time.

---
name: weekly-report
description: Prepare the weekly client status report. Use when asked for the weekly report.
---

Task
Prepare [deliverable] for [audience].
Cover the previous Monday to Sunday.

Inputs
Use [sources or folders].
If a required source is missing, say which one and stop.
If an optional source is missing, continue and flag the gap.

Process
1. Gather the inputs for the period.
2. Select what to include using [criteria].
3. Draft the result using template.md.
4. Check it against the sources and flag anything uncertain.

Format
Keep these sections in this order:
- Summary: two or three sentences on the most important points.
- Details: [labels or table columns], in the same order each time.
- Needs review: gaps or decisions that need my attention. Write "None" if there are none.

Delivery
Save the draft to [destination] as weekly-report-[date].md.
Do not send or share it. Leave it ready for review.

If you already have a result you like, save it as template.md and tell the skill what to carry forward: the headings, the column order, how much detail goes in each section. Someone reading two weeks of results should find the same kind of information in the same place.

Keep guidance that applies to the whole project out of the skill. Where approved sources live and where drafts go belong in CLAUDE.md for Claude Code or AGENTS.md for Codex, which load in every session. The skill loads only when it is used. (Claude Code skills · Codex skills)

How do you know it works?

Run it in a fresh session, not the chat where you wrote it. A fresh session has none of the context you built up while writing, which is exactly the situation a future run will be in. Type /weekly-report in Claude Code or $weekly-report in Codex, or ask in plain words: “Run the weekly report for last week.”

Test it with at least three kinds of week:

  1. A typical week. Does the result match the template without corrections?
  2. A week with a missing source. Does it stop and name what is missing, or flag the gap and continue, as the instructions say?
  3. A messy week. Something unusual happened. Does it put that under “Needs review” instead of guessing?

Every time you correct the result, fix the skill or the template, not just the draft. Then run it again in another fresh session.

The workflow is ready when it runs from start to finish without you stepping in, and everything it could not decide shows up under “Needs review”. If you still have to answer questions halfway through, it is not ready to run on its own yet.

What can’t instructions guarantee?

A skill is instructions the agent follows, not code that forces it. The agent will normally do the steps in order, but nothing mechanically stops it from skipping one or improvising. Two kinds of step need something firmer.

Steps that must be exact go in a script. Pulling numbers from a system, converting a file, or saving to a fixed path should come out the same every time. Put that in a script in the skill’s scripts/ folder and have the instructions say “run scripts/export.py”. The agent decides when to run it; the script decides what happens.

Actions that need your approval go in permission rules. If the workflow could ever send an email, post something, or change shared data, don’t rely on a sentence in SKILL.md saying “ask me first”. Set it in the tool itself:

  • Claude Code: add the command to the ask list (or deny, to block it) in the permissions section of .claude/settings.json.
  • Codex: add a prefix_rule with decision = "prompt" (or "forbidden") to a rules file, and check it with codex execpolicy check. When Codex asks for approval, approve that one run. Choosing to always allow it saves a rule that removes the check for good.

The simplest safe design is a workflow whose only output is a draft. If it never sends anything, there is nothing to approve. (Codex rules)

When should you put it on a schedule?

Only after the fresh-session test passes for a few weeks in a row. Scheduling doesn’t make a workflow better; it just runs it when you aren’t watching. If it still needs you, a schedule produces broken drafts on time.

When you’re ready, the schedule simply runs the same skill:

  • Claude Code, on your machine: in the Desktop app, Routines → New routine → Local. It runs with your files and tools, but only while the app is open and the computer is awake.
  • Claude Code, in the cloud: Routines → New routine → Cloud, or /schedule in the terminal. It runs on Anthropic’s servers even when your laptop is closed. It is currently a research preview and needs Claude Code on the web enabled.
  • Codex: use Automations to run a task on a schedule or trigger.

The prompt for the scheduled run can be one line: “Run the weekly-report skill for last week and save the draft.”

A scheduled run has no one to ask. Cloud routines in Claude Code run with no approval prompts at all. A local run that hits an approval prompt waits until you come back. Either way, decide in advance what the run may do. Give it read access to its sources and write access to one drafts folder, and only the connectors it needs. Sending, posting, and editing shared documents stay with you.

After each of the first few runs, note how long your review takes and what you changed. If you make the same edit twice, put it in the skill or the template. (Claude Code routines · Claude Code Desktop scheduled tasks)

Which workflows should stay on demand?

Any workflow that needs your judgment partway through. Writing a blog post is a good example. You pick the topic, react to drafts, approve the artwork, and sign off before anything is published. That process is still worth writing down as a skill, because the steps, the voice, and the checks are the same every time. But you run it yourself, and the skill pauses for you at each decision.

A useful test: if the best possible run still ends with you making a choice before anything happens, keep it on demand. If the best run ends with a draft you only need to read, it is a candidate for a schedule.

Either way, the work is the same: notice what you keep repeating, write it down once, and test it until it no longer needs you to explain it again.

If you’d like help turning your team’s recurring work into reliable AI workflows, talk to us at SliceIQ.

TABLE OF CONTENTS