correction-pipeline

correction-pipeline is a skill for Claude Code from garrytan/gbrain. It costs 87 tokens per session (3,090 once invoked), scanned A, original, MIT.

A process for handling factual corrections by finding and fixing the original source of the error.

In plain words
What is it for?
Use it whenever a user identifies a factual error in an answer, page, memory file, identity file, or facts table.
Why use it?
It prevents the same wrong fact from being noted and then repeated. The process checks brain pages and other stored sources, distinguishes bad data from generated mistakes, and records the correction.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: built for gbrain.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **Convention:** see [conventions/brain-first.md](../conventions/brain-first.md).

Part of the gbrain-coding plugin — 20 skills shipped together

Good fit Use it whenever a user identifies a factual error in an answer, page, memory file, identity file, or facts table.

Compare 6 skills from other repositories ↓
About the project

GBrain is a memory and retrieval layer for AI agents that searches, connects, and synthesizes information from stored sources. It is used to give coding agents and autonomous agents access to knowledge beyond their current code, including shared company information with access controls. The catalogue add-ons help agents operate GBrain and connect it to agent workflows.

garrytan/gbrain · 29,668 stars · on GitHub

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/garrytan/gbrain
agentmods
npx agentmods add skills/garrytan/gbrain/correction-pipeline

Made for: Claude Code.

Or install gbrain-coding, the plugin that ships this one along with the rest of its 20 skills.

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 correction-pipeline

README.md
[![agentmods](https://agentmods.dev/badge/skills/garrytan/gbrain/correction-pipeline.svg)](https://agentmods.dev/skills/garrytan/gbrain/correction-pipeline)
Your own site
<a href="https://agentmods.dev/skills/garrytan/gbrain/correction-pipeline"><img src="https://agentmods.dev/badge/skills/garrytan/gbrain/correction-pipeline.svg" alt="Measured on agentmods" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,090 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 6 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Agent Snooping · line 139
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 252
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 244
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 255
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Excessive Agency · line 264
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 271
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.1 $0.00087 $0.03090
Opus 5 $0.00044 $0.01545
Sonnet 5 $0.00017 $0.00618
Haiku 4.5 $0.00009 $0.00309

Measured 8d ago against content hash caf1264b7afe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

correction-pipeline 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 8d 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.

plugin-variants/gbrain-coding/skills/correction-pipeline/SKILL.md · 276 lines

How it starts

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

Correction Pipeline

Convention: see conventions/brain-first.md — Step 1 of the root-cause chain IS the brain-first lookup chain (search for exact tokens, query for concept-shaped questions) before anything else.

Convention: see _brain-filing-rules.md — corrections edit pages in place; the page stays filed by primary subject.

Trigger

ANY factual error the user identifies. No exceptions. No "I'll note that."

(Routing here is a harness convention, not a mechanical guarantee — but once this skill is in play, the no-exceptions contract above is the discipline.)

Immediate Response

  1. Acknowledge the error. Don't defend. Don't explain. Just: "You're right. I got that wrong."
  2. Quote the specific wrong claim so the user can see you know exactly what was wrong.
  3. State the correct fact as the user gave it.

Root Cause Analysis (do THIS, not just a memory note)

Run these steps IN ORDER. Report findings to the user.

Step 1: Search the brain

gbrain search "<relevant terms>" --limit 10

For concept-shaped or synonym-phrased claims, escalate to gbrain query "<question>" (LLM expansion recovers phrasings search misses). Also grep the brain repo checkout directly — resolve it once from config:

BRAIN_DIR=$(gbrain config get sync.repo_path)
grep -ri "<wrong claim terms>" "$BRAIN_DIR/people/" "$BRAIN_DIR/companies/" "$BRAIN_DIR/concepts/" 2>/dev/null

Question: Is the wrong fact IN the brain? If yes → the brain is the contamination source. Fix the brain page (Step 6).

Step 2: Search memory files

Grep the harness's always-loaded memory files (e.g. the workspace MEMORY.md and any memory/*.md companions — the exact location depends on your harness):

grep -ri "<wrong claim terms>" <memory files> 2>/dev/null

Question: Is the wrong fact in memory? If yes → memory is the contamination source. Fix the memory file.

Read the full file on GitHub · 276 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 276 lines · 87 tokens per session scan A caf1264b7afe

Subscribe to this mod's changes

correction-pipeline is a skill published in the GitHub repository garrytan/gbrain (29,668 stars, last pushed today), licensed MIT. It adds 87 tokens to every session and 3,090 once invoked, about $0.0004 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens