quality-loop

quality-loop is a skill for Claude Code, Codex from trpc-group/trpc-agent-go. It costs 32 tokens per session (1,104 once invoked), scanned A, original, Apache-2.0.

A bounded workflow that has one role create a draft and another independently review it against the user's requirements. The draft is revised until the reviewer approves it or the allowed review cycle ends.

In plain words
What is it for?
Use it for plans, proposals, drafts, and other deliverables with clear quality criteria where independent checking and revision are useful.
Why use it?
It catches missing requirements and required corrections without letting the writer approve its own work. The reviewer reports only changes that must be made.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/trpc-group/trpc-agent-go/quality-loop
Any agent
npx skills add trpc-group/trpc-agent-go --skill quality-loop
Clone the repo
git clone --depth 1 https://github.com/trpc-group/trpc-agent-go

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for quality-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/trpc-group/trpc-agent-go/quality-loop.svg)](https://agentmods.dev/skills/trpc-group/trpc-agent-go/quality-loop)
Your own site
<a href="https://agentmods.dev/skills/trpc-group/trpc-agent-go/quality-loop"><img src="https://agentmods.dev/badge/skills/trpc-group/trpc-agent-go/quality-loop.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,104 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00032 $0.01104
Opus 5 $0.00016 $0.00552
Sonnet 5 $0.00006 $0.00221
Haiku 4.5 $0.00003 $0.00110

Measured 3d ago against content hash 12e2ea2d5e26, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

quality-loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

examples/dynamicworkflow/skills/skills/quality-loop/SKILL.md · 122 lines

How it starts

The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Bounded Quality Loop

Turn the user's request into a temporary, request-specific workflow. Preserve the user's subject, constraints, and desired output rather than replacing them with a fixed example.

Process

  1. Create a writer role that produces the requested deliverable.
  2. Create a separate reviewer role. Give it the original request and the latest draft. On later reviews, also give it the previous required feedback so it can verify that the revision addressed those items. The writer must not review its own work.
  3. Ask the reviewer for structured output using a small object schema:
    • approved: required boolean
    • feedback: required array containing only changes that must be made
    • no additional properties
  4. If the user did not provide factual values such as dates, URLs, or contacts, accept clear placeholders. Do not reject solely because those values are not concrete, and do not ask the writer to invent them. Check that the placeholders are clear and the required fields or steps are complete.
  5. Treat the result as approved only when approved is true and feedback is empty. If the fields disagree, the feedback wins.
  6. If approved, stop immediately. If the reviewer rejects without actionable feedback, stop as unapproved instead of asking for an empty revision.
  7. Otherwise, if another review is still available, pass the complete latest draft and every feedback item to the writer, then review the revision again.
  8. Allow at most three reviews. After the third rejected review, stop without creating an unreviewed revision. This keeps the remaining feedback aligned with the returned draft.
  9. Return the latest reviewed draft, approval status, number of reviews, and any remaining feedback.

Illustrative workflow shape

Keep the loop explicit and bounded; the request supplies the actual content and criteria.

review_schema = {
    "type": "object",
    "properties": {
        "approved": {"type": "boolean"},
        "feedback": {"type": "array", "items": {"type": "string"}},
    },
    "required": ["approved", "feedback"],
    "additionalProperties": False,
}

draft = await agent(request, instruction="Write the first draft.", tools=[])
previous_feedback = []
for attempt in range(1, 4):
    review = await agent(
        {
            "request": request,
            "draft": draft["text"],
            "previous_feedback": previous_feedback,
        },
        instruction=(
            "Review against the requested criteria. If the user did not provide "
            "factual values such as dates, URLs, or contacts, clear placeholders "
            "are acceptable: do not reject solely because they are not concrete "
            "and do not ask the writer to invent facts. Check that placeholders "
            "are clear and required fields or steps are complete."
        ),
        schema=review_schema,
        tools=[],
    )
    decision = review["structured"]
    approved = decision["approved"] and not decision["feedback"]
    if approved or attempt == 3 or not decision["feedback"]:
        break
    previous_feedback = decision["feedback"]
    draft = await agent(
        {"draft": draft["text"], "feedback": previous_feedback},
        instruction="Revise the draft using every required change.",
        tools=[],
    )
return {
    "draft": draft["text"],
    "approved": approved,
    "reviews": attempt,
    "remaining_feedback": decision["feedback"],
}

Read the full file on GitHub · 122 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 122 lines · 32 tokens per session scan A 12e2ea2d5e26

Subscribe to this mod's changes

quality-loop is a skill published in the GitHub repository trpc-group/trpc-agent-go (1,763 stars, last pushed today), licensed Apache-2.0. It adds 32 tokens to every session and 1,104 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

session-agent-builder

Turn the current interactive conversation into an owner-reviewed reusable Agentlas agent; accept JSON or JSONL only for explicit terminal and automation runs.

agentlas-ai/Agentlas-OS · 31 tokens

hephaestus-graph

Use when the user types /hep-graph or asks to create, list, inspect, or request a run of an Agentlas automation graph.

agentlas-ai/Agentlas-OS · 35 tokens

agentlas-graph

Use when the user types /agentlas-graph, /agentlas graph, or /hep-graph to create, list, inspect, or run Agentlas automation graphs.

agentlas-ai/Agentlas-OS · 40 tokens

agentlas-connect

Use when the user types /agentlas-connect , /agentlas connect, or /hep-connect to connect Agentlas channels (Slack, Discord, Telegram, etc.).

agentlas-ai/Agentlas-OS · 39 tokens

hephaestus-network

Use when the user types $hephaestus-network, /hep-network, or /agentlas-network, mentions @Hephaestus, or asks Agentlas to staff a durable goal from registered Local, owner Cloud, and public Hub agents or teams. The active host LLM staffs each turn; the exact roster remains goal-bound until explicit completion.

agentlas-ai/Agentlas-OS · 75 tokens

routing-card-authoring

Use whenever a build emits or repairs .agentlas/routing-card.json — the shared card contract for the single-agent builder, the team builder, and the packager. States what belongs in every field, which fields the hub can actually match on, and which fields silently break matching when a sentence leaks into them.

agentlas-ai/Agentlas-OS · 68 tokens