/loopkit:structured-outputfrom loopkit
Enforces structured JSON output from the model using tool_use with schema, JSON mode, or prompted JSON with validate-and-retry. Essential when downstream code parses the response.
Ships in loopkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Prompted JSON — "reply as JSON" in the system prompt — fails on ~2-8% of calls in the wild: stray prose before the object, trailing commas, unescaped quotes, code fences. That failure rate is fine for a demo and fatal for a loop that runs a thousand times.
Tool use with schema (best) — declare a tool with a JSON Schema for its input. Force the model to call that tool. The API validates the arguments against the schema before you see them. Malformed JSON never leaves the model. Use this whenever the downstream is a real parser.
JSON mode / response_format (good) — where supported. Guarantees a valid JSON object at the top level; does not guarantee schema conformance. Cheap upgrade over prompted-JSON.
Prompted JSON with strict rules (fallback) — for models/tiers without tool use. Say "output ONLY the JSON object, no code fences, no prose", give an example, and validate on receive. Assume ~5% failure and handle it.
call → parse → if fail: retry once with the parse error appended → parse → if fail: hard fail
"severity": "high|medium|low" not "severity": "...".additionalProperties: true without a reason. If the model can add fields, it will, and they'll be inconsistent.{"answer": "yes"}).Otherwise use tool_use.
json.loads with a bare try/except: pass. Silent failure — you'll be debugging a downstream nil for hours.oneOf/anyOf. Split into multiple tools and let the model choose which to call.Loopkit's adversarial-verify output is {"passes": bool, "failures": [...]} — that is exactly the shape this skill formalizes. When you compose skills, keep every machine-consumed hop tool_use'd.
What SKILL.md sets; muted values are Claude Code's defaults
extracting structured data, agent-to-agent handoff, verifier verdicts, anything a script has to json.loads
npx claudepluginhub archive228/loopkit --plugin loopkit53 skills in this plugin
/a11y-passCatch the accessibility failures that ship in almost every AI-built UI. Use after building any interactive component./active-memory-reminderBefore compaction Loopkit extracts decisions into claude-decisions.json (machine-readable). Read it alongside claude-progress.txt at session start — prose is for humans, JSON is for the loop./adversarial-verifyReview a diff against the goal spec assuming the code is BROKEN. The reviewer that lives in the maker's head always agrees with itself — this pulls review into a hostile, separate pass. Invoke after every code change before marking work done.Other plugins' skills for the same job