◉CLAUDE LABJP
●2.1.301 — Adds the vim % motion, LaTeX math rendering in the VS Code panel, and a retry-watchdog limit for usage-limit waits (10/15)●2.1.299 — Conversations over 200K tokens left idle about 54 minutes get compacted; MCP allow rules now match only the server they name●SONNET 4.5 — Retires on the Claude API on 11/30, 45 days left. Migrate to Sonnet 5.5●WINDOWS — Reports say hooks break silently only on Japanese-locale Windows; check the character encoding first●FAST MODE — Opus 5.5 fast mode is out of research preview and no longer needs the beta header (10/15)●NEW — I Put a Ten-Line Promise File at the To…●2.1.301 — Adds the vim % motion, LaTeX math rendering in the VS Code panel, and a retry-watchdog limit for usage-limit waits (10/15)●2.1.299 — Conversations over 200K tokens left idle about 54 minutes get compacted; MCP allow rules now match only the server they name●SONNET 4.5 — Retires on the Claude API on 11/30, 45 days left. Migrate to Sonnet 5.5●WINDOWS — Reports say hooks break silently only on Japanese-locale Windows; check the character encoding first●FAST MODE — Opus 5.5 fast mode is out of research preview and no longer needs the beta header (10/15)●NEW — I Put a Ten-Line Promise File at the To…
Articles/Claude Code
⟐ Claude Code/2026-05-30Advanced

Designing Skills That Stabilize Output: Template Fixing and Decision Guides in Claude Code

A practical design guide for stabilizing wobbly Claude Code skill output: stating when to use it, decision-guide tables, fixing quality with references templates, and traceability rules, with code from real operations.

Claude Code264Agent Skills4SKILL.md7prompt design6

✦ Premium Article

The most frustrating thing about writing skills is output that differs every run despite the same prompt. I run article generation and quality checks for four sites as skills, and my early skills just wrote down "how to ask," so the structure and tone of the deliverable wobbled on every execution. Here's how to kill that wobble through design, drawn from a skill that converts spec docs into readable HTML and from how I operate my own article_gate.py.

The subject is a skill that "analyzes, restructures, and summarizes a spec doc into an HTML report with diagrams and badges." The crux is that it's a comprehension-bearing conversion, not a mechanical Markdown-to-HTML transform, and how you encode that into the design is what separates stable output from chaos.

Put "when to use, when not to" at the top of the body

The first thing to do is fix the task's premise at the top. Write only "convert" and weaker models read it as swapping Markdown tags for HTML tags; even strong models lean toward literal conversion depending on context. So declare up front that "this is a conversion that involves analysis, restructuring, and summarization."

## When to Use This Skill
- Convert a specification, requirements, or design doc into a
  readable HTML report (analyze, restructure, summarize)
- Make a Markdown spec easier for humans to read
- Add summaries, diagrams, and charts that aid comprehension
 
Do **not** treat this as a literal Markdown-to-HTML conversion
unless the user explicitly asks for a faithful conversion.

That "Do not" line does the work. In my article-generation skill too, after I stated up front, in the negative, that "this is not a task of summarizing the official docs," the drift toward template summaries dropped visibly. Write the unwanted interpretation in the negative with the same weight as the definition of what you want as the first step toward pulling output toward intent.

Give decision criteria as a table

Leave a skill room and "how to decide" wobbles every time. To kill that, make the decision branches explicit in the skill. The HTML skill gave "when to emit which diagram" as a table.

  • A step-by-step process → flowchart
  • API calls between systems → sequence diagram
  • Entities and relationships → ER diagram
  • A status lifecycle → state diagram

Just handing over this mapping makes the right diagram get selected automatically. My quality-check skill uses the same idea, embedding threshold judgments like "fewer than N signals is a violation, N or more passes" and doubling it up with article_gate.py. Rather than writing judgment in fuzzy prose, enumerate it as input feature -> output to take and the model's decisions stabilize.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦Anyone frustrated by skill output that wobbled every run can now get stable output by fixing a references template
✦You'll learn to state when to use and when not to use a skill so 'convert' isn't misread as tag substitution
✦You'll embed decision-guide tables and traceability rules to prevent summaries from drifting off the source
✦You can apply references/ to your own skill to fix CSS and structure and reproduce output quality
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⟐ Claude Code2026-09-10
One plugin.json turns a shelf of skills into something you can switch off as a group
When I sorted my skills by what work they belong to, the set I open almost daily turned out to be 5 percent of the total. Here is how I dropped a .claude-plugin/plugin.json into each group so I could switch a whole shelf off, plus the two loading rules I tripped over on the way.
⟐ Claude Code2026-09-06
I counted 42 skills on my shelf, and four of them were just a note saying they had moved
Claude Code v2.1.261 added /skill-doctor. Before running it I counted my own skill shelf from the files, found four tombstones, and learned that the obvious awk one-liner for spotting duplicate plugin names quietly reports skills that are not duplicates at all.
⟐ Claude Code2026-08-20
The Biggest Section in Your SKILL.md Is Usually the One to Keep
A skill I run every week cost about 10K tokens just to load. Measuring it section by section showed why the largest block was the one I had to leave in place, and what splitting by reach actually saved.