Chaining AI Skills: Where Handoffs Break and How to Fix Them
I split one job into four skills. Each one worked fine on its own. Together they fell apart. The problem wasn't any single step. It was the space between them โ the handoff. Here's what fixed it, and the three failure
I split one job into four skills. Each one worked fine on its own. Together they fell apart.
The problem wasn't any single step. It was the space between them โ the handoff.
Here's what fixed it, and the three failure modes I see most often.
A chain is only as good as what gets passed between steps
Splitting a task into steps solves "how do I cut this into pieces." Chaining solves "how does the output of one piece become the input of the next."
I think of it like a cafeteria line: the first station serves the main dish, you carry your tray forward, the next station ladles out soup. If nobody served the main dish, you show up at the soup station with an empty tray.
That analogy is imperfect in one important way. At a cafeteria you can ask for soup without the main dish. In a skill chain, if step one's output is malformed, step two doesn't receive "less" โ it receives the wrong thing.
And wrong-but-confident output flowing downstream costs more than just stopping. So the thing you actually need to design in a chain isn't the order. It's the handoff.
A handoff has three questions:
- What format does the previous step produce?
- Which fields does the next step need?
- Which step do we roll back to when something is off?
In every chain I've debugged, the eight-out-of-ten failures weren't a step running badly. They were a handoff that was never specified.
Step zero: fix one "handoff object"
Before you write any prompt, take a sheet of paper and write one sentence: between every two steps of this chain, what exactly gets passed?
My rule is to pass exactly one thing โ a small, fixed-shape intermediate result, like a five-column table. Everything else gets thrown away.
The payoff: when any step breaks, you look at that little table and can see exactly where it broke.
Let me show it with real work. Say you have 12 raw customer feedback entries, and you need a "categorized issue + suggested reply" sheet.
Split it into three steps:
- Categorize
- Draft suggested replies
- Merge into a deliverable table
Between step 1 and step 2, lock the handoff object to four fields: ID | Category | Verbatim quote | Impact.
Step 1: make it categorize only
Don't ask it to categorize and reply in one go. Categorize only, fixed format.
Failed version (this is how most people start):
Look at these customer feedback entries, categorize them, and write a reply for each.
What's wrong: no format specified, so you get a wall of prose. No "categorize only," so it writes the replies anyway. No count, so 12 entries may come back as 8. No IDs, so step 2 has nothing to line up against.
Better version:
You are a support QA reviewer. Below are 12 feedback entries. Categorize only โ do not write replies.
Output one line per entry in this exact format: [ID] | [Category] | [First 20 characters of the original text] | [Impact: single / multiple / all].
Use only these five categories: Login, Payment, UI, Performance, Other.
Anything outside those five goes to Other. Do not invent categories.
All 12 entries must appear. When done, report the count.
Every added constraint blocks a specific drift: the fixed format blocks prose, the fixed categories block invention, the count blocks omissions.
You get a 12-row table. That is the handoff object. Copy it into a separate file. Don't leave it in the chat window.
Why separate? Because the next step needs to reference it, and you can't "point" at something inside a chat window โ you can only paste the whole thing in.
Step 2: feed the table forward
The most common mistake here is continuing the same conversation.
Don't. Open a new conversation and paste the 12-row table in.
Failed version:
Following up on the above, write a reply for each.
What's wrong: "above" doesn't exist in a new conversation. Even in the same conversation, it guesses from the whole chat history โ and the longer that history gets, the further it drifts.
Better version:
You are a support agent. Below are 12 categorized feedback entries with fields: ID | Category | Quote | Impact.
Write one suggested reply per entry in this format: [ID] | [Category] | [Suggested reply] | [Needs human review: yes/no].
Keep each reply to two sentences or fewer. Never promise compensation. Never promise a timeline.
Payment-category entries must always be flagged "yes" for human review.
Copy ID and Category verbatim from the input. Do not change them.
Here's the key move: parameter backfill. ID and Category are carried over verbatim from step one.
Why "copy verbatim, don't change"? I learned this the hard way. It decided my categorization was slightly wrong and "helpfully" fixed one. Step 3 then couldn't line the rows up.
Backfilled fields are yours to lock down. Judgement is what you delegate.
Step 3: merge the two tables
You now have two 12-row tables with matching IDs. You can let the AI merge them, or paste both into a spreadsheet yourself.
If you hand it to the AI:
Merge these two tables into one, aligned by ID. Field order: ID, Category, Quote, Impact, Suggested reply, Needs human review.
List any IDs that don't match in a separate section at the end. Don't force them into rows.
After merging, check IDs row by row. Report every missing one.
That "list unmatched IDs separately" line stops it from fabricating rows to make things look tidy. A tidy-looking wrong row is worse than an obvious gap.
What "done" looks like
Open the merged table and count three things:
- Are there 12 rows?
- Does any row have an empty field across the six columns?
- Are all the payment entries flagged "yes"?
All three pass, the chain works. Next time you do the same job, run the same three steps.
On this exact workflow, the 12 feedback entries used to take me 25 minutes solo. With the chain running smoothly, it's about 8 minutes including my review. I'm not claiming a magic multiplier โ those are just the numbers.
Rollback: go back one step, not to the start
Any sufficiently long chain will eventually have a step go wrong. What matters is where you go back.
My rule: if a step's output is wrong, rerun only that step. Don't touch the earlier tables.
Example: in step 2, the payment-category replies read like refund promises. You don't restart from step 1. Paste step 1's table again, unchanged, and edit only step 2's constraint:
Add one rule to the previous prompt: for payment-category replies, describe the current state only. Do not use phrases like "we will refund" or "you will be compensated."
Old table, new constraint, rerun. That's a one-step rollback.
Why insist on pasting the old table? Because you need the input to be byte-for-byte identical. Otherwise you can't tell whether the fix came from your changed constraint or from a changed input.
Three places beginners keep falling
1. Continuing the conversation instead of passing the table. Step 1's result stays in the chat, and step 2 says "go on" in the same window. There's nothing to align against. Fix: copy step 1's table to plain text, open a new conversation, paste it in.
2. Backfilled fields not locked. You ask it to copy the IDs, it copies them and "optimizes" a category along the way. By merge time nothing lines up. Fix: add "copy ID and Category verbatim, do not change" to step 2 and rerun only step 2.
3. Not counting rows. 12 in, 11 out, and you ship it. Of everyone I've walked through this, this is the most common miss. Fix: ask it to "report the count" at every step, then check that against your original number.
One detail you only learn from actually guiding beginners: the same feedback table pasted into a desktop browser sometimes gets truncated to the first few rows, while a phone renders it fully across screenfuls. The safe move is to paste in chunks and have it reply "received entries N through M" before you send the next chunk.
Three self-checks
Q1 (easy): Between two steps, what most needs to be fixed?
The format and fields of the handoff object. Only with a fixed format can you see where it broke and whether you can roll back.
Q2 (medium): Step 2's output is wrong. Which steps do you rerun?
Step 2 only. Paste step 1's table verbatim again, change the constraint, rerun. Don't touch step 1.
Q3 (hard): You delegate categorization, but step 2 changes a category. How do you prevent it at the process level?
Treat category as a "you decide, it copies" field. Say "copy verbatim, do not change" in step 2, then verify by ID in the merge step. Relying on its good behaviour is not a control.
Where this came from
This is one entry in a hands-on series on working with AI agents โ practical patterns for prompts, skills, and delegation, written from actual runs rather than theory. You can find the full series, including the failure cases and the earlier steps this one builds on, at mryk123.cn.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.