wiki-sync

wiki-sync is a command for Claude Code from Pratiyush/llm-wiki. It costs 0 tokens per session (603 once invoked), scanned A, original, MIT.

A command that copies Claude Code and Codex CLI conversation transcripts into an llmwiki, a searchable project knowledge base, and adds new material to its wiki pages.

In plain words
What is it for?
Use it to sync new sessions, update related wiki pages, record what changed, and flag contradictions or unfinished synthesis work.
Why use it?
It keeps the project wiki current without manually finding, converting, and organizing session records.

Command for Claude Code

Part of the llm-wiki plugin — 6 skills, 18 commands shipped together

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.

agentmods
npx agentmods add commands/pratiyush/llm-wiki/wiki-sync
Clone the repo
git clone --depth 1 https://github.com/Pratiyush/llm-wiki

Made for: Claude Code.

Or install llm-wiki, the plugin that ships this one along with the rest of its 6 skills, 18 commands.

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 wiki-sync

README.md
[![agentmods](https://agentmods.dev/badge/commands/pratiyush/llm-wiki/wiki-sync.svg)](https://agentmods.dev/commands/pratiyush/llm-wiki/wiki-sync)
Your own site
<a href="https://agentmods.dev/commands/pratiyush/llm-wiki/wiki-sync"><img src="https://agentmods.dev/badge/commands/pratiyush/llm-wiki/wiki-sync.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 603 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00603
Opus 5 $0.00000 $0.00302
Sonnet 5 $0.00000 $0.00121
Haiku 4.5 $0.00000 $0.00060

Measured 4d ago against content hash fff3bcd3109b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

wiki-sync 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.

.claude/commands/wiki-sync.md · 53 lines

What it actually says

Sync Claude Code (and Codex CLI) session transcripts into the llmwiki, then ingest the new ones into wiki/.

Usage: /wiki-sync [project-substring]

Steps (run in this order, report progress to the user):

  1. Convert new sessions to markdown by running:

    python3 -m llmwiki sync $ARGUMENTS
    

    Capture the summary line (N converted, M unchanged, K live, J filtered, X errors).

  2. If N == 0: report "wiki is already up to date" and continue to step 6 (pending-prompt scan). Don't run ingest.

  3. If N > 0: for each newly written markdown file under raw/sessions/, follow the Ingest Workflow from CLAUDE.md. Process one project at a time. If there are more than 20 new files total, ask the user whether to process them all or a subset first.

  4. Append to wiki/log.md:

    ## [YYYY-MM-DD] sync | <N> sessions across <M> projects
    
  5. Report to the user:

    • How many sessions were converted
    • Which projects got updated
    • Which wiki pages were created or updated
    • Any contradictions flagged under ## Contradictions on wiki pages
  6. Complete any pending agent-delegate syntheses (#316) — the agent synthesis backend writes pending prompts to .llmwiki-pending-prompts/<uuid>.md that need you (the agent) to finalise. Run:

    python3 -m llmwiki synthesize --list-pending
    

    If the output is "No pending prompts": skip to step 7.

    Otherwise — for each pending prompt:

    a. Read .llmwiki-pending-prompts/<uuid>.md — it contains the rendered prompt (body + frontmatter) that the pipeline already filled in.

    b. Synthesize the wiki page body by following the prompt instructions. Emit the <!-- suggested-tags: ... --> comment as the first line per the prompt.

    c. Write the synthesized body to a scratch file, then finalise:

    python3 -m llmwiki synthesize --complete <uuid> --page wiki/sources/<project>/<date>-<slug>.md --body /tmp/synth-<uuid>.md
    

    d. The CLI verifies the uuid matches the page's sentinel, rewrites the placeholder in place, and deletes .llmwiki-pending-prompts/<uuid>.md.

    Process all pending prompts serially — the agent is single-conversation.

  7. Done. Run /wiki-build if the caller asked for fresh HTML.

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 First seen · 53 lines · 0 tokens per session scan A fff3bcd3109b

Subscribe to this mod's changes

wiki-sync is a command published in the GitHub repository Pratiyush/llm-wiki (383 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 603 tokens. 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-08-30.