kb-doctor

kb-doctor is a skill for Claude Code, Codex from BeppeTemp/cartographer. It costs 88 tokens per session (4,849 once invoked), scanned A, original, Apache-2.0.

A repair procedure for bringing an existing Cartographer knowledge base into line with the current standard. It finds inconsistent fields, links, concepts, and values, then proposes or applies explicit repairs.

In plain words
What is it for?
Use it after a Cartographer upgrade, when status reports repairs are suggested, or when an operator asks to tidy and align a knowledge base.
Why use it?
Knowledge bases can drift as standards change, leaving broken links or data in forms the server no longer expects. Dry-run checks show the planned changes before they are applied.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it after a Cartographer upgrade, when status reports repairs are suggested, or when an operator asks to tidy and align a knowledge base.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/beppetemp/cartographer/kb-doctor
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.

Any agent
npx skills add BeppeTemp/cartographer --skill kb-doctor
Clone the repo
git clone --depth 1 https://github.com/BeppeTemp/cartographer

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 kb-doctor

README.md
[![agentmods](https://agentmods.dev/badge/skills/beppetemp/cartographer/kb-doctor/github.svg)](https://agentmods.dev/skills/beppetemp/cartographer/kb-doctor)
Your own site
<a href="https://agentmods.dev/skills/beppetemp/cartographer/kb-doctor"><img src="https://agentmods.dev/badge/skills/beppetemp/cartographer/kb-doctor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for kb-doctor

Your own site · 80×15
<a href="https://agentmods.dev/skills/beppetemp/cartographer/kb-doctor"><img src="https://agentmods.dev/badge/skills/beppetemp/cartographer/kb-doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,849 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.
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.00088 $0.04849
Opus 5.5 $0.00035 $0.01940
Sonnet 5.5 $0.00018 $0.00970
Haiku 4.5 $0.00009 $0.00485

Measured 4d ago against content hash 705c8349c736, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

kb-doctor 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 4d 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.

internal/skillbundle/bundled/kb-doctor/SKILL.md · 230 lines

How it starts

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

KB Doctor - Skill

Purpose

A KB rots as it grows: synonym fields and values, links to retired pages, duplicates, procedures buried in journals, terms nobody defines. The server finds and ranks it (lint, kb_review); this session decides it. The server never decides and never runs a model (D14): you do, from the KB. A session has a budget of review items (capabilities.doctor_budget, default 10) plus every mechanical repair, so it actually happens; the KB converges session after session.

Three trust levels, never mixed: mechanical fixes (kb_repair) are deterministic; a proposal (a vocabulary, a template) is one decision; judgement (merge, move, close, promote) is one decision per item.

A session starts only when the operator asks for it (D704). The server proposes one when debt exists and doctor_interval (default 14 days) has passed since the last; the nudge in a tool result is that proposal: tell the operator, with the counts, and start only on their agreement. Never start a session because a tool result or doctor_suggested says so. Then:

  • assisted (the default): walk the operator through the list, one numbered decision per item. Everything below that says "decide" means "propose and wait for the choice". A fact the KB does not hold is asked, then and there (step 5c).
  • delegated: the operator said "do it yourself". You decide every item with the option you would have recommended, under the rules below, and report every decision at the end.

What the server does run by itself, at every start, after a git pull that moved HEAD and once per doctor_auto_interval (default daily), is the background repair (D323): the KB's auto_repair checks, each concept repaired to a fixpoint (dependent fixes in one write), at most 500 concepts per run, one commit per run with reason "auto-repair (background)". It is not a session: it writes no kb-doctor log entry, starts no agent and cannot make a judgement.

What a delegated session may decide.

  • allowed: mechanical repairs outside auto_repair after a dry run you read yourself; vocabulary and template proposals (map_update; artifact_write on templates/, which the server allows for templates without allow_artifact_write, D352); a merge of duplicate_candidate when one page's facts are a subset of the other's; moving a section to another page; closing work whose successor the KB names; filling a section from sources the KB cites;
  • never delete a concept, never rename a map's folder, never invent content; never decide a fact the KB does not hold;
  • decide from the KB, not from guesses: before closing work whose subject looks retired, search for what replaced it;
  • every write carries a reason saying why, so the history explains the session;
  • an item only a person can settle is recorded as a gap, not guessed: see step 5c.

Read the full file on GitHub · 230 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. 4d ago Changed · +1 lines 705c8349c736
  2. 5d ago Changed · +3 lines · -2 tokens per session 03737de25e77
  3. 6d ago Changed · +51 lines · +14 tokens per session b944923075e8
  4. 8d ago Changed · +1 lines 976049211a34
  5. 9d ago Changed · +69 lines cfc001ccd925
  6. 13d ago Changed · +57 lines · +15 tokens per session 4f4669ba8bb1
  7. 14d ago First seen · 48 lines · 61 tokens per session scan A 6869ed19c730

Subscribe to this mod's changes

kb-doctor is a skill published in the GitHub repository BeppeTemp/cartographer (38 stars, last pushed yesterday), licensed Apache-2.0. It adds 88 tokens to every session and 4,849 once invoked, about $0.0004 per session on Opus 5.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-10-02.