Quality Loop logo

Quality Loop

OrganizationPopular
trpc-group
quality-loop

Use this workflow recipe when a draft, plan, proposal, or other deliverable should be independently reviewed and revised until it satisfies explicit quality criteria.

Overview

Publishertrpc-group
Repositorytrpc-agent-go
Skill namequality-loop
Stars
1.8K
Forks
309
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by trpc-group on GitHub. Read the source before you install it.

Installation

Install the Quality Loop AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/trpc-group/trpc-agent-go.git /tmp/trpc-agent-go
mkdir -p .claude/skills
cp -r /tmp/trpc-agent-go/examples/dynamicworkflow/skills/skills/quality-loop .claude/skills/quality-loop
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Quality Loop in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Quality Loop on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Quality Loop is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

python
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"],
}

On the third rejected review, return the latest reviewed draft and feedback; do not create a fourth, unreviewed revision. Adapt the role instructions and inputs to the current request rather than copying this shape as a fixed task.

Review Discipline

  • Review only against the user's original request and its explicit quality criteria. Do not invent a broader deliverable.
  • When the user did not provide real names, dates, URLs, contacts, tools, or organization-specific facts, treat clear placeholders as acceptable. Do not reject solely for missing concrete values or ask the writer to invent them; check that the placeholders are clear and the required content is complete.
  • Return at most three material required changes per review. Do not reject for optional polish.
  • After a revision, first verify the previous required changes. Do not move the goalposts by adding unrelated requirements; add a new item only for a material regression introduced by the revision.
  • Approve once the required criteria and previous feedback are satisfied.

Compilation Rules

  • Express the review cycle as an explicit bounded loop in one Dynamic Workflow.
  • Use separate workflow-local Agent instances for writer and reviewer.
  • Keep both roles tool-free unless the user's request clearly needs a capability already allowed by the registered Agent template.
  • Use model-native structured output for the approval decision. Do not parse a JSON-looking text response.
  • Read the branch fields from the Agent result's explicit structured object.
  • Pass task facts and feedback through Agent inputs. Do not rely on a role to remember facts that were never provided to it.

Frequently asked questions

What does the Quality Loop AI skill do?

Use this workflow recipe when a draft, plan, proposal, or other deliverable should be independently reviewed and revised until it satisfies explicit quality criteria.

Why use Quality Loop on TypingMind?

Because you install it once and use it with any model. Quality Loop is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Quality Loop in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/trpc-group/trpc-agent-go/tree/main/examples/dynamicworkflow/skills/skills/quality-loop. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Quality Loop?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Quality Loop?

As many as you like. As long as a model supports skills, you can use Quality Loop with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Quality Loop AI skill free?

Yes. It is published on GitHub by trpc-group under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇