# Kb qc loop

> Kb qc loop is an open-source agent skill for knowledge and memory. Runs a serial, tick-based quality-check loop that flags numbers and claims missing from. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/cqxcrl/matsci-kb-kit/tree/main/skills/kb-qc-loop
- **Repository:** https://github.com/cqxcrl/matsci-kb-kit
- **GitHub stars:** 6
- **License:** MIT
- **Skill name:** kb-qc-loop
- **Collection:** https://github.com/cqxcrl/matsci-kb-kit
- **Categories:** [knowledge and memory](https://ai-powered.com/categories/knowledge-and-memory)
- **Listing updated:** 2026-12-02

## About

This skill steers a background quality-control pass over a knowledge-base wiki built from ingested sources. Each scheduled tick advances one batch: the agent reads the queue and ledger, finds the first unfinished batch, launches a single worker on it, marks it as running, and checks results on the next wake-up. The workflow caps batches at roughly a dozen pages and forbids parallel agents to avoid rate-limit failures, and it describes how to retry a stalled batch by splitting it in half.

The judgement rules are strict. Each claim is labelled as verified, mismatched, stretched beyond the source, unsourced, or uncheckable, and numbers must be matched word-for-word against the raw text after normalising line breaks, ligatures and thousands separators. Corrections must be traced to downstream pages that reuse the same content. The skill includes a progress dashboard and helper scripts for queue status, ledger appends and backlink lookups, with self-tests to run before writing files.

The skill assumes a local Windows knowledge-base layout with a .qc working directory, Python helper scripts and a protocol reference file. It is written in Chinese and relies on the user's own source archive, so it is not a general-purpose checker.

## When your agent uses it

> 在 <你的库根> 上推进、查看或暂停「知识库 QC 质量核查」串行循环——核查 ingest 产物里原文不存在的数字与结论。用户提到 qc_status.py、批次队列、LEDGER、进度看板、每 tick 推一批、防限流、上批是否还在跑时使用。含每 tick 五步顺序、串行与单批 ≤12 页的不变量、五级判定与假阴性归一化纪律。

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/cqxcrl/matsci-kb-kit/tree/HEAD/skills/kb-qc-loop)
- [License: MIT](https://github.com/cqxcrl/matsci-kb-kit/tree/HEAD/skills/kb-qc-loop)

## Features

- **Serial batch scheduling:** Advances one batch per tick and refuses to start a new worker while a previous one is still running.
- **Five-level claim verdicts:** Classifies each statement as verified, mismatched, stretched, unsourced or uncheckable against raw sources.
- **Number matching rules:** Normalises separators, ligatures and line breaks so that absent numbers are not missed or misread.
- **Downstream impact tracing:** Finds other pages that link to a corrected source page so copied errors are also fixed.
- **Progress dashboard tooling:** Provides scripts to print or write queue status, append ledger entries idempotently and snapshot batch progress.
- **Stall recovery procedure:** Defines how to detect a dead batch by tick count and rerun it in smaller halves.

## Good for

- Check whether figures in a wiki article appear in the original source text
- Resume a paused quality-check queue and see which batches are finished
- Refresh the quality-check progress dashboard for the knowledge base
- Rerun a stalled batch of pages after a rate-limit interruption
- Trace which linked pages must be updated after fixing a source page

## Install

### Claude Code

This skill ships in the `matsci-knowledge-base` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add cqxcrl/matsci-kb-kit
/plugin install matsci-knowledge-base@matsci-local
```

Or copy only this skill to `~/.claude/skills/kb-qc-loop`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/cqxcrl/matsci-kb-kit.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/kb-qc-loop &&
cp -R "$tmp/skills/kb-qc-loop" ~/.claude/skills/kb-qc-loop &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/kb-qc-loop` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/kb-qc-loop` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/cqxcrl/matsci-kb-kit.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/kb-qc-loop &&
cp -R "$tmp/skills/kb-qc-loop" ~/.agents/skills/kb-qc-loop &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/kb-qc-loop` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/kb-qc-loop` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/cqxcrl/matsci-kb-kit.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/kb-qc-loop &&
cp -R "$tmp/skills/kb-qc-loop" ~/.cursor/skills/kb-qc-loop &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/kb-qc-loop` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/cqxcrl/matsci-kb-kit.git --path skills/kb-qc-loop
```

Or copy the folder to `~/.gemini/skills/kb-qc-loop` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/kb-qc-loop`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/cqxcrl/matsci-kb-kit.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/kb-qc-loop &&
cp -R "$tmp/skills/kb-qc-loop" ~/.copilot/skills/kb-qc-loop &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/kb-qc-loop` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/cqxcrl/matsci-kb-kit.git
```

Then copy `matsci-kb-kit/skills/kb-qc-loop` into your agent's skills folder as `kb-qc-loop`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Which AI clients does Kb qc loop work with?

The content ties it to a Claude Code plugin marketplace entry, so the listed platforms are limited to what the skill format supports in general.

### Does Kb qc loop need any scripts to run?

The skill refers to helper scripts such as qc_status.py and qc_ledger.py in the tools folder, but the skill folder itself contains no scripts.

### How often does the loop run?

The instructions recommend a session cron job waking every 25 minutes, with roughly 10 ticks for a full run of about 4 to 5 hours.

### How do I install Kb qc loop in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/kb-qc-loop to use it in all your projects, or to .claude/skills/kb-qc-loop in one project. Or install the matsci-knowledge-base plugin, which includes it: /plugin marketplace add cqxcrl/matsci-kb-kit, then /plugin install matsci-knowledge-base@matsci-local.

### Does Kb qc loop run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Kb qc loop?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Kb qc loop?

The closest alternatives to Kb qc loop are Kb lint, Kb ingest batch, LLM wiki, Kb query and Lit watch.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Kb lint](https://ai-powered.com/skills/kb-lint): Kb lint is an open-source agent skill for knowledge and memory.
- [Kb ingest batch](https://ai-powered.com/skills/kb-ingest-batch): Kb ingest batch is an open-source agent skill for knowledge and memory.
- [LLM wiki](https://ai-powered.com/skills/llm-wiki): LLM wiki is an open-source agent skill for knowledge and memory.
- [Kb query](https://ai-powered.com/skills/kb-query): Kb query is an open-source agent skill for knowledge and memory.
- [Lit watch](https://ai-powered.com/skills/lit-watch): Lit watch is an open-source agent skill for knowledge and memory.
- [Fact check](https://ai-powered.com/skills/fact-check): Fact check is an open-source agent skill for knowledge and memory.
- [Scientific writer](https://ai-powered.com/skills/scientific-writer): Scientific writer is an open-source agent skill for health and science.
- [Multi source investigation](https://ai-powered.com/skills/multi-source-investigation): Multi source investigation is an open-source agent skill for knowledge and memory.

---
Source: https://ai-powered.com/skills/kb-qc-loop
