llmwiki-sync
Skill383 starsChanged 5 months agoMITView on GitHub
Sync Claude Code session transcripts into the user's llmwiki and ingest them into the wiki. Use when the user says "sync the wiki", "update llmwiki", "ingest recent sessions", "refresh the knowledge base", or asks a knowledge question that would benefit from up-to-date sessions. Also use when the user explicitly asks to refresh or rebuild the LLM wiki from their agent history.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llmwiki-ingestSkill
- llmwiki-querySkill
- project-maintainerSkill
- self-learnSkill
- wiki-allSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 37
Do NOT invoke when:
- Distinctive: line 44
Locate the llmwiki install: Check the current working directory and common locations:
- Distinctive: line 50
If you can't find it, tell the user and stop.
- Very specific: line 84
If the user wants the converter to run automatically on every Claude Code session start, offer to add this to ~/.claude/settings.json:
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill 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.
Files
llmwiki-sync
What this skill does
The user maintains a Karpathy-style LLM Wiki — a local, file-based knowledge base compiled from their Claude Code (and Codex CLI) session transcripts.
This skill runs the full sync pipeline:
~/.claude/projects/*/*.jsonl (raw session transcripts)
│
▼ python3 -m llmwiki sync
llmwiki/raw/sessions/<proj>/*.md (Karpathy layer 1 — immutable markdown)
│
▼ /wiki-ingest (Claude in the loop)
llmwiki/wiki/sources, entities, (Karpathy layer 2 — LLM-maintained wiki)
concepts, syntheses
│
▼ python3 -m llmwiki build
llmwiki/site/ (Karpathy layer 3 — static HTML)When to use
Invoke this skill when the user:
- Says "sync the wiki", "update llmwiki", "ingest recent sessions", "refresh the knowledge base"
- Asks a knowledge question that would benefit from the latest sessions ("what have I been working on this week?") — run sync first, then
/wiki-query - Starts a new project and wants context from past work
- Says "what's new" or "catch me up" in a context where session history matters
Do NOT invoke when:
- The user is asking a question unrelated to their own work
- The tool is not installed (check for
llmwiki/directory first)
Workflow
Locate the llmwiki install. Check the current working directory and common locations:
./(if cwd containsllmwiki/package)~/Desktop/2026/production-draft/llmwiki/~/llmwiki/$LLMWIKI_HOMEenvironment variable
If you can't find it, tell the user and stop.
- Run the converter (idempotent — safe to re-run):
Capture the summary line:cd <llmwiki-dir> python3 -m llmwiki syncN converted, M unchanged, K live, J filtered, X errors. - If N == 0, report that the wiki is up to date and stop.
- If N > 0, ingest the new files into the wiki using the Ingest Workflow from the repo's
CLAUDE.md. Process one project at a time. If more than 20 new files, ask the user whether to process all or a subset first. - Append to
wiki/log.md:## [YYYY-MM-DD] sync | <N> sessions across <M> projects - Report what was converted, which wiki pages were created or updated, and any contradictions flagged.
Options
The converter supports flags the user may want:
python3 -m llmwiki sync --project <substring> # only one project
python3 -m llmwiki sync --since 2026-04-01 # only recent
python3 -m llmwiki sync --include-current # include <60min live
python3 -m llmwiki sync --force # ignore state, reconvert all
python3 -m llmwiki sync --dry-run # preview without writingHook installation (optional, for auto-sync)
If the user wants the converter to run automatically on every Claude Code session start, offer to add this to ~/.claude/settings.json:
{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "(python3 /absolute/path/to/llmwiki/tools/sessions_to_markdown.py > /tmp/llmwiki-sync.log 2>&1 &) ; exit 0"
}
]
}
]
}
}The ( ... &) ; exit 0 pattern ensures the hook runs in the background and never blocks session start.
Troubleshooting
- Permission errors on
raw/: the converter writes tollmwiki/raw/sessions/. Make sure the repo is writable. - Nothing converted, only "live": the default 60-minute live filter is skipping recent sessions. Pass
--include-currentto override, or wait an hour. - Converter says "module 'tomllib' not found": stale source. Update to the current version (
tools/sessions_to_markdown.pyusesjson, nottomllib). - Privacy: the converter redacts username, API keys, tokens, and emails by default. If you see unredacted PII, check
examples/sessions_config.json→redaction.real_username.
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
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.

