agentleFS
SamurAIGPTSamurAIGPT/llm-wiki-agent/CLAUDE.md

llm-wiki-agent

CLAUDE.md3.6k starsChanged 8 months agoMITView on GitHub

This wiki is maintained entirely by Claude Code. No API key or Python scripts needed — just open this repo in Claude Code and talk to it. Or just describe what you want in plain English: - "Ingest this file: raw/papers/attention-is-all-you-need.md" - "What does the wiki say about transformer models?" - "Check the wiki for orphan pages and contradictions" - "Build the graph and show me what's connected to RAG" Claude Code reads this file automatically and follows the workflows…

Trending

Quiet since June.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 1 mentionJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the SamurAIGPT/llm-wiki-agent repository that our weekly crawl found: only 1 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about SamurAIGPT/llm-wiki-agent

The biggest 1 of 1 mention linking to the repository that our crawl found. Each line is their own headline.

  • In this repositoryOne other file it gives its agents.

The file

Show its rules and text

We split this CLAUDE.md into the rules it gives an agent

19 rules. About 0 are common, 8 are distinctive, and 11 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every wiki page uses this frontmatter:

    line 48
  2. Very specific:

    Use [[PageName]] wikilinks to link to other wiki pages.

    line 60
  3. Distinctive:

    Read the source document fully using the Read tool (auto-convert if non-markdown)

    line 71
  4. Very specific:

    Read wiki/index.md and wiki/overview.md for current wiki context

    line 72
  5. Very specific:

    Write wiki/sources/<slug>.md — use the source page format below

    line 73
  6. Very specific:

    Update wiki/index.md — add entry under Sources section

    line 74
  7. Very specific:

    Update wiki/overview.md — revise synthesis if warranted

    line 75
  8. Distinctive:

    Update/create entity pages for key people, companies, projects mentioned

    line 76
  9. Distinctive:

    Update/create concept pages for key ideas and frameworks discussed

    line 77
  10. Distinctive:

    If the source falls into a specific domain (e.g., personal diary, meeting notes), the agent should use a specialized template instead of …

    line 113
  11. Very specific:

    Read wiki/index.md to identify relevant pages

    line 160
  12. Distinctive:

    Read those pages with the Read tool

    line 161
  13. Very specific:

    Ask the user if they want the answer filed as wiki/syntheses/<slug>.md

    line 163
  14. Distinctive:

    Use Grep and Read tools to check for:

    line 171
  15. Very specific:

    Run: python tools/health.py (or python tools/health.py --json for machine-readable output)

    line 187
  16. Very specific:

    When the user asks to build the graph, run tools/build_graph.py which:

    line 216
  17. Distinctive:

    If the user doesn't have Python/dependencies set up, instead generate the graph data manually:

    line 222
  18. Very specific:

    Use Grep to find all [[wikilinks]] across wiki pages

    line 223
  19. Very specific:

    Write graph/graph.html using the vis.js template

    line 226

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

LLM Wiki Agent — Schema & Workflow Instructions

This wiki is maintained entirely by Claude Code. No API key or Python scripts needed — just open this repo in Claude Code and talk to it.

Slash Commands (Claude Code)

CommandWhat to say
/wiki-ingestingest raw/my-article.md
/wiki-queryquery: what are the main themes?
/wiki-healthhealth (fast, every session)
/wiki-lintlint the wiki (expensive, periodic)
/wiki-graphbuild the knowledge graph

Or just describe what you want in plain English:

  • "Ingest this file: raw/papers/attention-is-all-you-need.md"
  • "What does the wiki say about transformer models?"
  • "Check the wiki for orphan pages and contradictions"
  • "Build the graph and show me what's connected to RAG"

Claude Code reads this file automatically and follows the workflows below.


Directory Layout

raw/          # Immutable source documents — never modify these
wiki/         # Claude owns this layer entirely
  index.md    # Catalog of all pages — update on every ingest
  log.md      # Append-only chronological record
  overview.md # Living synthesis across all sources
  sources/    # One summary page per source document
  entities/   # People, companies, projects, products
  concepts/   # Ideas, frameworks, methods, theories
  syntheses/  # Saved query answers
graph/        # Auto-generated graph data
tools/        # Standalone Python scripts
  health.py   # Structural checks (deterministic, no LLM calls)
  lint.py     # Content quality checks (uses LLM for semantic analysis)
  build_graph.py  # Knowledge graph generation

Page Format

Every wiki page uses this frontmatter:

---
title: "Page Title"
type: source | entity | concept | synthesis
tags: []
sources: []       # list of source slugs that inform this page
last_updated: YYYY-MM-DD
---

Use [[PageName]] wikilinks to link to other wiki pages.


Ingest Workflow

Triggered by: "ingest <file>" or /wiki-ingest

Supported formats: Markdown (.md) ingested directly. Non-markdown files (.pdf, .docx, .pptx, .xlsx, .html, .txt, .csv, .json, .xml, .rst, .rtf, .epub, .ipynb, .yaml, .yml, .tsv, .wav, .mp3) auto-converted to markdown via markitdown before ingestion. Use --no-convert to skip auto-conversion.

Steps (in order):

  1. Read the source document fully using the Read tool (auto-convert if non-markdown)
  2. Read wiki/index.md and wiki/overview.md for current wiki context
  3. Write wiki/sources/<slug>.md — use the source page format below
  4. Update wiki/index.md — add entry under Sources section
  5. Update wiki/overview.md — revise synthesis if warranted
  6. Update/create entity pages for key people, companies, projects mentioned
  7. Update/create concept pages for key ideas and frameworks discussed
  8. Flag any contradictions with existing wiki content
  9. Append to wiki/log.md: ## [YYYY-MM-DD] ingest | <Title>
  10. Post-ingest validation — check for broken [[wikilinks]], verify all new pages are in index.md, print a change summary

Source Page Format

---
title: "Source Title"
type: source
tags: []
date: YYYY-MM-DD
source_file: raw/...
---

## Summary
2–4 sentence summary.

## Key Claims
- Claim 1
- Claim 2

## Key Quotes
> "Quote here" — context

## Connections
- [[EntityName]] — how they relate
- [[ConceptName]] — how it connects

## Contradictions
- Contradicts [[OtherPage]] on: ...

Domain-Specific Templates

If the source falls into a specific domain (e.g., personal diary, meeting notes), the agent should use a specialized template instead of the default generic one above:

Diary / Journal Template

---
title: "YYYY-MM-DD Diary"
type: source
tags: [diary]
date: YYYY-MM-DD
---
## Event Summary
...
## Key Decisions
...
## Energy & Mood
...
## Connections
...
## Shifts & Contradictions
...

Meeting Notes Template

---
title: "Meeting Title"
type: source
tags: [meeting]
date: YYYY-MM-DD
---
## Goal
...
## Key Discussions
...
## Decisions Made
...
## Action Items
...

Query Workflow

Triggered by: "query: <question>" or /wiki-query

Steps:

  1. Read wiki/index.md to identify relevant pages
  2. Read those pages with the Read tool
  3. Synthesize an answer with inline citations as [[PageName]] wikilinks
  4. Ask the user if they want the answer filed as wiki/syntheses/<slug>.md

Lint Workflow

Triggered by: "lint the wiki" or /wiki-lint

Use Grep and Read tools to check for:

  • Orphan pages — wiki pages with no inbound [[links]] from other pages
  • Broken links — [[WikiLinks]] pointing to pages that don't exist
  • Contradictions — claims that conflict across pages
  • Stale summaries — pages not updated after newer sources
  • Missing entity pages — entities mentioned in 3+ pages but lacking their own page
  • Data gaps — questions the wiki can't answer; suggest new sources

Output a lint report and ask if the user wants it saved to wiki/lint-report.md.


Health Workflow

Triggered by: "health" or /wiki-health

Run: python tools/health.py (or python tools/health.py --json for machine-readable output)

Fast structural integrity checks — zero LLM calls, safe to run every session:

  • Empty / stub files — pages with no content beyond frontmatter (rate-limit damage)
  • Index sync — wiki/index.md entries vs actual files on disk
  • Log coverage — source pages missing a corresponding ingest entry in wiki/log.md

Output a health report. Use --save to write to wiki/health-report.md.

Health vs Lint Boundary

Dimensionhealthlint
ScopeStructural integrityContent quality
LLM callsZeroYes (semantic analysis)
CostFreeTokens
FrequencyEvery session, before other workEvery 10-15 ingests
ChecksEmpty files, index sync, log syncOrphans, broken links, contradictions, gaps
Tooltools/health.pytools/lint.py
Run orderFirst (pre-flight)After health passes

Run health first — linting an empty file wastes tokens.


Graph Workflow

Triggered by: "build the knowledge graph" or /wiki-graph

When the user asks to build the graph, run tools/build_graph.py which:

  • Pass 1: Parses all [[wikilinks]] → deterministic EXTRACTED edges
  • Pass 2: Infers implicit relationships → INFERRED edges with confidence scores
  • Runs Louvain community detection
  • Outputs graph/graph.json + graph/graph.html

If the user doesn't have Python/dependencies set up, instead generate the graph data manually:

  1. Use Grep to find all [[wikilinks]] across wiki pages
  2. Build a node/edge list
  3. Write graph/graph.json directly
  4. Write graph/graph.html using the vis.js template

Naming Conventions

  • Source slugs: kebab-case matching source filename
  • Entity pages: TitleCase.md (e.g. OpenAI.md, SamAltman.md)
  • Concept pages: TitleCase.md (e.g. ReinforcementLearning.md, RAG.md)
  • Source pages: kebab-case.md

Index Format

# Wiki Index

## Overview
- [Overview](overview.md) — living synthesis

## Sources
- [Source Title](sources/slug.md) — one-line summary

## Entities
- [Entity Name](entities/EntityName.md) — one-line description

## Concepts
- [Concept Name](concepts/ConceptName.md) — one-line description

## Syntheses
- [Analysis Title](syntheses/slug.md) — what question it answers

Log Format

Each entry starts with ## [YYYY-MM-DD] <operation> | <title> so it's grep-parseable:

grep "^## \[" wiki/log.md | tail -10

Operations: ingest, query, health, lint, graph

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.