Start using AI properly: 10 skills that replace an assistant

routine-builder

turn a job you do every week into something that runs itself

How the two work together

Claude thinks it through. Paste the Claude prompt into Claude Code, or drop the folder into your skills folder. Claude does the judgement: what to look for, what is worth doing, what is right.

Codex gets it done. At the hand-off point Claude runs Codex on your machine with one command and passes it the Codex prompt. Codex does the mechanical part and hands the result back. Claude checks it before you see it.

No API key to set up: Claude calls the Codex you already have installed. If Codex is not installed, Claude does that half itself and tells you.

Prompt for Claude

---
name: routine-builder
description: Turns a job you repeat every week into a written, versioned routine you can run on demand, by interviewing you once, deciding whether it needs a single prompt or a workflow, and handing the file writing to Codex.
---

# Turn a job you do every week into something that runs itself

You describe the job once. You get back a named, versioned routine you paste in and run, plus a log line every time it runs.

## Claude does

1. Ask for the job in the user's own words, then ask **5 to 10 clarifying questions** and stop (the doc-coauthoring pattern in anthropics/skills). Required: what triggers it, what goes in, what comes out, who sees it, and one real past example of a good result.
2. Climb the ladder from Anthropic's *Building effective agents*: **single prompt first**, then a workflow, then an agent. Add a step only when it demonstrably improves the outcome. Say which rung and why in one line.
3. If it is a workflow, name one pattern: prompt chaining, routing, parallelisation, orchestrator-workers, or evaluator-optimizer. Never blend two.
4. Write it in the **10 fixed slots** (prompt-eng tutorial, ch.09): role, task context, tone, rules, examples, input data, immediate task, think step by step, output format, prefill. Long input at the top, the request at the bottom.
5. Supply **3 to 5 examples**, relevant, diverse and structured, each in `<example>` tags. Six for classification, with the order shuffled.
6. Write rules as **instructions, not prohibitions**, each led by an action verb: Extract, Rank, Rewrite, Summarise, Sort. Keep constraints for safety and output format, with the reason attached.
7. Fill the **log template** (Google whitepaper, Table 21): name and version, goal, model and version, temperature, token limit, top-K, top-P, full prompt, output. Start at temperature 0.2, top-P 0.95, top-K 30; use 0 where there is one correct answer.
8. Refuse to guess the trigger, the recipient, or any number the user did not give. Leave `[]` where a fact is missing.

## Then Codex does

Codex writes the folder out: the routine file, the filled log, a run checklist and a README, all from Claude's decisions. That is mechanical file production, identical for every routine, so it belongs to the bulk worker, not the interview.

```
codex exec --sandbox danger-full-access --skip-git-repo-check -C "<working folder>" - < CODEX.md
```

Claude fills these first: `{ROUTINE_NAME}`, `{JOB_DESCRIPTION}`, `{TRIGGER}`, `{PATTERN}`, `{TEN_SLOTS}`, `{EXAMPLES}`, `{LOG_SETTINGS}`.

## Claude checks

1. Count the slots. Ten, in order, question last, or reject.
2. Count the examples. Under three, or all one shape, means rerun with diverse ones.
3. Find prohibitions with no reason attached and rewrite them as instructions.
4. Confirm no step was added that the ladder did not justify. Anthropic's own failure case was a vague brief producing duplicated, off-target work.
5. Confirm the log names a model version and a temperature. Without a version, next month's result cannot be compared.
6. Reject once, quoting the failing check. If it fails twice, Claude writes that part itself.

## Rules

- Public information only.
- Never invent a fact, a number or a quote. Missing facts become `[]`.
- Anything sent in someone's name says whose name it is.
- Do not build an agent where a prompt works.
- Version on every edit; never overwrite silently.

## If Codex is not installed

Claude writes the four files itself and says it did that half by hand.

## Built from

- anthropics/skills, https://github.com/anthropics/skills, 174,340 stars via api.github.com; skill-creator and doc-coauthoring give the 500-line cap and the 5 to 10 questions.
- Anthropic, Building effective agents, https://www.anthropic.com/engineering/building-effective-agents, the escalation ladder and the five workflow patterns.
- anthropics/prompt-eng-interactive-tutorial, https://github.com/anthropics/prompt-eng-interactive-tutorial, 38,070 stars via api.github.com; the 10-element order, ch.09.
- Lee Boonstra, Prompt Engineering whitepaper, https://www.kaggle.com/whitepaper-prompt-engineering, Table 21 logging template and the temperature settings.

Prompt for Codex

# Turn a job you do every week into something that runs itself - Codex task

You are writing the files for one reusable routine. Every decision is already made and supplied below. Do not redesign it, add steps, or invent content.

## You are given

- `{ROUTINE_NAME}` - short kebab-case name, e.g. `weekly-supplier-chase`.
- `{JOB_DESCRIPTION}` - the repeating job in the user's own words.
- `{TRIGGER}` - what starts it: a day, an event, or a manual run.
- `{PATTERN}` - one of: single prompt, prompt chaining, routing, parallelisation, orchestrator-workers, evaluator-optimizer.
- `{TEN_SLOTS}` - the routine text, already ordered as role, task context, tone, rules, examples, input data, immediate task, think step by step, output format, prefill.
- `{EXAMPLES}` - 3 to 5 worked examples.
- `{LOG_SETTINGS}` - model and version, temperature, token limit, top-K, top-P.

## Produce

Four files in the working folder.

1. `{ROUTINE_NAME}.md` - the routine, with all ten slots as headings `## 1 Role` through `## 10 Prefill`, in that order, question last. Each example in its own `<example>` tag inside one `<examples>` block.
2. `{ROUTINE_NAME}-log.md` - a table with these nine columns and one blank row: Name and version, Goal, Model and version, Temperature, Token limit, Top-K, Top-P, Full prompt, Output. Carry `{LOG_SETTINGS}` into the header. Version starts at `v1.0`.
3. `RUN.md` - a numbered checklist, 5 to 8 steps: when to run it, what to paste, where to paste it, what to check in the output, where to record the run.
4. `README.md` - under 200 words: the job, the trigger, the pattern in one sentence, and a link line to the other three files.

## Rules

- Copy `{TEN_SLOTS}` verbatim. Reorder nothing, reword nothing, add no slot.
- If a placeholder arrives empty, write `[]` in its place and list it under `## Missing` in `README.md`. Never guess.
- Write rules as instructions led by an action verb. Where a prohibition is needed for safety or format, give the reason on the same line.
- No em dash characters. British English.
- Plain Markdown only. No scripts, no network calls, no installs.
- Create, move or delete nothing outside the working folder.
- Overwrite nothing. If `{ROUTINE_NAME}.md` exists, write `{ROUTINE_NAME}-v2.md`.

## Return

Print this and nothing else:

1. `FILES:` each filename with its byte size.
2. `SLOTS:` the ten heading lines exactly as written, in file order.
3. `EXAMPLES:` the count of `<example>` tags found.
4. `LOG:` the nine column headers, comma separated.
5. `MISSING:` each empty placeholder, or `none`.
6. `VERSION:` the version string written into the log.

Built from the best public work on this

Sources

  • **anthropics/skills, the official Agent Skills repository** - https://github.com/anthropics/skills - 174,340 stars read from api.github.com (20,648 forks, created 2025-09-22). The raw `skill-creator` and `doc-coauthoring` SKILL.md files were opened directly: skill-creator caps a SKILL.md at 500 lines and requires a table of contents on reference files over 300 lines; doc-coauthoring sets 5 to 10 clarifying questions before drafting.
  • **Anthropic engineering, Building effective agents** - https://www.anthropic.com/engineering/building-effective-agents - fetched in full. Gives the escalation ladder (single prompt, then workflow, then agent, adding complexity only when it demonstrably improves outcomes) and the five named workflow patterns: prompt chaining, routing, parallelisation, orchestrator-workers, evaluator-optimizer. Also states explicitly when not to build an agent.
  • **anthropics/prompt-eng-interactive-tutorial** - https://github.com/anthropics/prompt-eng-interactive-tutorial - 38,070 stars read from api.github.com. Chapter 09, Complex Prompts from Scratch, gives the canonical ten-element prompt order and the rule that long documents and examples precede the final request.
  • **Lee Boonstra, Prompt Engineering whitepaper (Google / Kaggle)** - https://www.kaggle.com/whitepaper-prompt-engineering - the PDF was downloaded and all 65 pages extracted locally (79,645 characters). Supplies Table 21, the prompt-logging template, plus the starting settings: temperature 0.2, top-P 0.95, top-K 30, and 0 for single-correct-answer tasks; at least three to five examples, six for classification.

Best public prompt we found for this job

https://www.anthropic.com/engineering/building-effective-agents

The rule that decides whether a weekly job needs a routine at all, verbatim from Anthropic's own guidance: "find the simplest solution possible, and only increase complexity when needed." Their framing is that agentic systems trade latency and cost for better task performance, and that for many applications a single call with retrieval and in-context examples is enough. Start there, and add a workflow step only when the extra step measurably improves the result.

Second-best, for the shape of the routine file itself: https://github.com/anthropics/prompt-eng-interactive-tutorial - chapter 09 orders every prompt as user role, task context, tone context, detailed task description and rules, examples, input data, immediate task, precognition, output formatting, prefill.

Want this running in your business?

I optimise how businesses run — your sales, your visibility, your social media — and build bespoke software where nothing off the shelf fits. The first conversation is free. Work starts from £150 a day.