Logo: Wiki Self Heal

Wiki Self Heal

Communautéit
JensHeitmann
wiki-self-heal

Autonomously audit an LLM wiki (Karpathy pattern) for gaps, contradictions, orphans, and stale data, then research and fill high-priority gaps using quality-gated web research. Supports audit-only dry-run mode. Operates on a dedicated branch and commits changes for human review — never auto-merges. Use when the user asks to "lint my wiki", "self-heal my knowledge base", "find gaps in my wiki", "update my second brain", "auto-research my wiki", "run a health check on my LLM wiki", "audit my wiki without making changes", "dry run the lint", or wants to schedule periodic wiki maintenance.

Iwwersiicht

EditeurJensHeitmann
Repositoryai-second-brain-skills
Skill-Nummwiki-self-heal
Stären
104
Forks
18
Matgeliwwert Dateien
5
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 5 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    JensHeitmann huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Wiki Self Heal an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/JensHeitmann/ai-second-brain-skills/tree/main/wiki-self-heal
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/JensHeitmann/ai-second-brain-skills.git /tmp/ai-second-brain-skills
mkdir -p .claude/skills
cp -r /tmp/ai-second-brain-skills/wiki-self-heal .claude/skills/wiki-self-heal
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Wiki Self Heal an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Wiki Self Heal automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Wiki Self Heal net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

wiki-self-heal

Audit → research → fill → commit. An autonomous pass over a Karpathy-style LLM wiki that finds what's weak or missing, researches high-quality answers, writes them into the wiki, and commits to a dedicated branch for human review.

Inspired by Karpathy's autoresearch loop: isolated branch per run, explicit CAN/CANNOT rules, numbered steps, structured logging, simplicity criterion, and a NEVER STOP autonomy directive once the loop begins.

When to use

User says: "lint my wiki", "self-heal", "find gaps", "auto-research my wiki", "update my second brain", "health check my wiki", "audit my wiki" or "dry run" (audit-only mode), or has scheduled this skill via cron / GitHub Actions / Claude Code triggers.

Two modes

  • Full mode (default) — audit → research → apply → commit. Changes the wiki on a heal branch.
  • Audit-only mode — audit → report. No research, no changes to wiki pages. The audit report itself is still committed to the branch.

Infer the mode from phrasing. If the user says "dry run", "just audit", "audit only", "don't make changes", or "show me the gaps first" → audit-only. If the user just says "lint" or "self-heal" → full mode. If unsure, ask once.

Preconditions

Before doing anything:

  1. The vault has Karpathy wiki structure: raw/, wiki/, CLAUDE.md, wiki/index.md, wiki/log.md. If any are missing → stop and suggest running the llm-wiki-setup skill first.
  2. The vault is a git repo. If not → git init && git add . && git commit -m "chore: pre-heal snapshot" before continuing.
  3. The git working tree is clean. If dirty → stop and ask the user to commit or stash first.

Research tool selection

At the start of the first run in a session, ask once:

I'll default to WebSearch + WebFetch for research. If you have any of these MCPs installed for higher-quality sources, let me know which and I'll prefer them: Apify, Firecrawl, Exa.

Priority order when available: Exa → Firecrawl → Apify → WebSearch/WebFetch. Fall back to the next tool on any failure. Never block the loop on tool selection — WebSearch + WebFetch always work.

First-run guidance

The first time this skill runs on a populated wiki, expect the audit to find many gaps. That is normal — the wiki has never been linted before.

Strong recommendation: use audit-only mode for the first run on any vault. Let the user read the audit report, understand the landscape, and decide priorities before any research pass writes pages. Don't dump 50 new pages into a wiki on the first pass without the user seeing what's coming.

If the vault is nearly empty (< 5 wiki pages), skip self-heal entirely — there's nothing meaningful to audit. Suggest the user ingest some sources first.

The loop

Full procedure with commands and edge cases in references/loop.md. Core sequence:

  1. Read state — CLAUDE.md, wiki/index.md, last 10 entries of wiki/log.md.
  2. Create branch — git checkout -b wiki-heal/$(date +%Y-%m-%d). Append -2, -3, etc. if a branch for today already exists.
  3. Audit — scan for the 6 gap types per references/audit.md. Write findings to wiki/audits/audit-<date>.md and add an entry under the ## Audits section of wiki/index.md.
  4. Audit-only early exit — if audit-only mode: commit the audit report and index update, append the log entry, print the audit-only report, stop.
  5. Prioritize — pick top N (default N=3) high-severity, skill-addressable gaps. Skip gaps needing human judgment.
  6. Research each gap — apply the quality gates in references/research-quality.md. Every factual claim needs ≥ 2 independent sources. Reject SEO spam and content farms.
  7. Apply — create or update wiki pages with cited findings. Update wiki/index.md. Add bidirectional [[wikilinks]].
  8. Log — append one consolidated entry to wiki/log.md per references/log-format.md.
  9. Commit — git add wiki/ && git commit -m "heal: <n> gaps addressed, <s> skipped". Leave on branch. Do not merge.
  10. Report — print the final summary in the format below.

Simplicity criterion

All else equal, fewer new pages wins. A 1-source stub that only restates what's already in [[related-page]] should be skipped or merged into the existing page, not created as its own file. Prefer updating existing pages over creating new ones when a concept already has a home. Adding 20 thin orphan pages is a regression, not progress.

If a run ends with zero new pages because all gaps were better addressed by updating existing pages → that is a successful run, not a failed one. Report it accordingly.

CAN / CANNOT

CAN:

  • Create new wiki pages (when justified by the simplicity criterion)
  • Update existing wiki pages
  • Update wiki/index.md (including a new ## Audits section if one doesn't exist yet)
  • Append to wiki/log.md
  • Create wiki/audits/audit-<date>.md
  • Download new sources to raw/ if research pulls in a fresh document (note in log)
  • Create a heal branch and commit to it

CANNOT:

  • Modify any existing file in raw/
  • Delete any wiki page (always flag for human review instead)
  • Add any factual claim without ≥ 2 qualifying sources
  • Merge the heal branch into main
  • Skip the log or commit step
  • Pause the loop to ask "should I continue?" (see Autonomy rule below)

Autonomy rule

Once the loop begins (after preconditions and tool selection), do not pause to ask the human if you should continue. The human may be asleep, away, or expecting autonomous operation. Work through the top-N gaps, then stop and report. Only stop early if:

  • A CANNOT rule would be violated
  • Quality gates fail for all sources on a gap → skip that gap, log reason, continue to the next
  • The heal branch has drifted from main by more than 50 commits → stop and report
  • A git operation fails → stop and report

Scheduling

Recommended cadence: weekly for active vaults (daily or near-daily ingest), monthly for slow vaults, on-demand after each research burst. Full recipes in references/scheduling.md — macOS launchd/cron, GitHub Actions (opens a PR automatically), and Claude Code scheduled triggers.

First run guidance: always run wiki-self-heal manually at least once — ideally in audit-only mode — before automating it. Never schedule a skill you haven't observed end-to-end.

Output format

Full mode

Wiki self-heal pass — <YYYY-MM-DD>
Branch: wiki-heal/<tag>
Mode:   full

Audit:     <N> gaps found (HIGH: <h>, MEDIUM: <m>, LOW: <l>)
Addressed: <n>
Skipped:   <s>

New pages:
  - [[<page>]] — <one-line summary> (sources: <k>)

Updated pages:
  - [[<page>]] — <what changed>

Skipped gaps:
  - [<type>] <title> — reason: <short reason>

Sources added: <k>
Commit:        <short-hash>
Status:        keep

Review: git diff main..wiki-heal/<tag>
Merge:  git checkout main && git merge wiki-heal/<tag>

Audit-only mode

Wiki audit — <YYYY-MM-DD>
Branch: wiki-heal/<tag>   (audit-only — no changes to wiki pages)
Mode:   audit-only

Scanned:    <N> wiki pages
Gaps found: <total> (HIGH: <h>, MEDIUM: <m>, LOW: <l>)

Top priorities (first 5):
  1. [<type>] <title> — <one-line detail>
  2. [<type>] <title> — <one-line detail>
  3. ...

Audit report: wiki/audits/audit-<date>.md
Commit:       <short-hash>
Status:       keep

Next step:
  Review wiki/audits/audit-<date>.md, then:
  - "Run wiki-self-heal on the top <k> high-priority gaps"
  - or edit the audit report and ask me to address specific items

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Wiki Self Heal?

Autonomously audit an LLM wiki (Karpathy pattern) for gaps, contradictions, orphans, and stale data, then research and fill high-priority gaps using quality-gated web research. Supports audit-only dry-run mode. Operates on a dedicated branch and commits changes for human review — never auto-merges. Use when the user asks to "lint my wiki", "self-heal my knowledge base", "find gaps in my wiki", "update my second brain", "auto-research my wiki", "run a health check on my LLM wiki", "audit my wiki without making changes", "dry run the lint", or wants to schedule periodic wiki maintenance.

Firwat Wiki Self Heal op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Wiki Self Heal besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Wiki Self Heal an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/JensHeitmann/ai-second-brain-skills/tree/main/wiki-self-heal an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Wiki Self Heal benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Wiki Self Heal benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Wiki Self Heal domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Wiki Self Heal gratis?

Jo. JensHeitmann huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇