# Kb lint

> Kb lint is an open-source agent skill for knowledge and memory. Runs health checks and batch fixes on a markdown knowledge base, with tiered lint modes. It is available on Claude Code.

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

## About

This skill guides the agent through linting a knowledge base kept as markdown pages. It distinguishes a quick pass that only checks recently ingested pages from a deep pass that scans the whole library and adds extended check families covering structure, frontmatter fields, evidence chains, link graph, tool completeness and content hygiene. The agent is told to run the lint tool before reporting problems, and to preview mechanical fixes in dry-run mode before applying them with backups.

The workflow also covers backlink suggestions for orphaned or weakly linked pages, index freshness checks, and a toolcheck that runs every bundled tool's self-test. It stresses that self-tests must be run against known good and bad samples, and that write-capable scripts need a dry-run default and a recount after writing. Manual review items such as contradictions, outdated claims and missing pages are left to the agent to read from the index.

The skill expects a Python-based knowledge base repository with its tools folder and wiki layout, and it is written in Chinese.

## When your agent uses it

> 知识库健康检查与批量修复（分级 lint、补链、工具实跑自检）。用户说“lint”“健康检查”“检查一下库”“补链”“孤立页面”“这批 ingest 质量如何”时使用。区分 --quick（效率优先，只查最近 ingest）与 --deep（全库全量 + 扩展检查族 A–F + 可修复项）。改动任何 lint/校验脚本后必跑自检。

## 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-lint)
- [License: MIT](https://github.com/cqxcrl/matsci-kb-kit/tree/HEAD/skills/kb-lint)

## Features

- **Tiered lint modes:** Offers a quick pass over recent ingests and a deep pass over the full library.
- **Dry-run batch fixes:** Previews mechanical repairs and applies them only with an explicit flag and backup.
- **Link and orphan repair:** Finds isolated or weakly connected pages and suggests backlinks.
- **Extended check families:** Covers structure, evidence chains, graph relations, tool completeness and content hygiene.
- **Self-test discipline:** Requires validators to be checked against known samples before results are trusted.
- **Tool health check:** Runs every bundled tool's self-test and help command while the library is idle.

## Good for

- Check the knowledge base for broken links and orphaned pages
- Review the quality of the latest batch of ingested sources
- Preview and apply safe frontmatter or link fixes across the wiki
- Run the validator self-tests after changing a lint script
- Find claims whose evidence qualifiers were dropped in downstream pages

## 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-lint`:

```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-lint &&
cp -R "$tmp/skills/kb-lint" ~/.claude/skills/kb-lint &&
rm -rf "$tmp"
```

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

### Codex

Copy the skill folder to `~/.agents/skills/kb-lint` 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-lint &&
cp -R "$tmp/skills/kb-lint" ~/.agents/skills/kb-lint &&
rm -rf "$tmp"
```

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

### Cursor

Copy the skill folder to `~/.cursor/skills/kb-lint` 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-lint &&
cp -R "$tmp/skills/kb-lint" ~/.cursor/skills/kb-lint &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/kb-lint` 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-lint
```

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

### VS Code

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

```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-lint &&
cp -R "$tmp/skills/kb-lint" ~/.copilot/skills/kb-lint &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/kb-lint` 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-lint` into your agent's skills folder as `kb-lint`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Kb lint trigger?

When the user asks for lint, a health check, a library check, link repair, orphaned pages, or the quality of a recent ingest.

### What is the difference between quick and deep mode?

Quick checks only recently ingested pages and skips whole-library items; deep checks the full library plus extended families A to F.

### Does running Kb lint change files?

Fix commands default to a dry run. Writing to disk requires an explicit apply flag, and backups are stored under .qc/backups.

### What does Kb lint need to run?

It assumes a knowledge base repository with a tools folder containing Python scripts such as kb_lint.py and kb_toolcheck.py.

### How do I install Kb lint in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/kb-lint to use it in all your projects, or to .claude/skills/kb-lint 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 lint 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 lint?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Kb lint?

The closest alternatives to Kb lint are Kb qc loop, LLM wiki, Kb ingest batch, Validate skills and Correct.

## Where this comes from

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

## Alternatives

- [Kb qc loop](https://ai-powered.com/skills/kb-qc-loop): Kb qc loop 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 ingest batch](https://ai-powered.com/skills/kb-ingest-batch): Kb ingest batch is an open-source agent skill for knowledge and memory.
- [Validate skills](https://ai-powered.com/skills/validate-skills): Validate skills is an open-source agent skill for developer tools.
- [Correct](https://ai-powered.com/skills/correct): Correct is an open-source agent skill for developer tools.
- [Lit watch](https://ai-powered.com/skills/lit-watch): Lit watch is an open-source agent skill for knowledge and memory.
- [Wiki llms txt](https://ai-powered.com/skills/wiki-llms-txt): Wiki llms txt is an open-source agent skill for ai models and llm tooling.
- [Spec lint](https://ai-powered.com/skills/spec-lint): Spec lint is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/kb-lint
