wiki-sync
Syncs knowledge zones from merged PRs or documentation files into a structured wiki.
Install
mkdir -p .claude/skills/wiki-sync && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12791" && unzip -o skill.zip -d .claude/skills/wiki-sync && rm skill.zipInstalls to .claude/skills/wiki-sync
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use to sync the wiki from a merged PR or from a source doc/file path. Two modes — PR mode (post-merge: creates ADR if needed, flips ADR to accepted, updates wiki pages, appends log, records idempotency, archives related plan/source files) and doc mode (ingests existing implemented knowledge from a file or doc path directly). Use when the user says "wiki-sync", "/wiki-sync", "sync the wiki", "update the wiki from this PR", "ingest this PR", "ingest this doc", or "add this to the wiki".Key capabilities
- →Sync the wiki from a merged PR
- →Sync the wiki from a source document or file path
- →Create an ADR if needed during PR mode
- →Update wiki pages based on PR content or source docs
- →Append logs for synced PRs and record idempotency
- →Archive related plan/source files after sync
How it works
The skill operates in PR mode or doc mode to ingest knowledge, routing it to appropriate wiki zones, updating pages, and managing associated logs and archives.
Inputs & outputs
When to use wiki-sync
- →Update wiki from PR
- →Ingest documentation
- →Sync ADRs
About this skill
Wiki Sync
Wiki Zones
Per the wiki-zone model in CONCEPT.md, route wiki knowledge through namespace zones:
wiki/<namespace>/— product/domain knowledge for one namespace: its concept, vocabulary, architecture, and app/API behavior. One zone per product, customer, domain, or workstream namespace the team defines.wiki/platform/— shared implementation substrate: infrastructure, deploys, dependencies, environments, and cross-namespace implementation details.wiki/general/— team/brain workflow operating knowledge: lifecycle semantics, conventions, and process principles.
Boundary rule: route by implementation sharing, not by topic. If changing the knowledge would force edits in more than one namespace's code, use platform; if it only touches one namespace's code, use that namespace's zone even when the concept sounds shared.
Fixed-path exceptions: wiki/decisions/index.md, wiki/logs/, and wiki/index.md stay at the wiki root. ADR files live under wiki/decisions/<zone>/ while retaining global ADR numbers and Namespace: fields (a product namespace, platform, or general).
If the wiki predates zones, tolerate a half-migrated layout: read/update existing legacy root pages when a repos.yaml feed still points there, but classify the intended zone and call out any future move needed. Do not move wiki pages as part of this skill unless the user explicitly asks for a migration.
Two input modes — PR mode for post-merge sync, doc mode for ingesting existing implemented knowledge that has no PR or predates the workflow.
Mode detection
| Input | Mode |
|---|---|
A number, owner/repo#NNN, PR URL, or sha:abc | PR mode |
| A file path, glob, or prose description of a source doc | Doc mode |
| No argument | List recent unsynced PRs and prompt — runs PR mode on selection |
PR Mode
Use after a PR merges to the default branch in an implementation repo (any repo registered under repos[] in repos.yaml). Brain repo PRs can also be implementation PRs when they implement workflow, skill, wiki behavior, or repo metadata described by a plan.
Inputs
- PR number on the default repo:
/wiki-sync 1234(defaults to the firstrole: implementationrepo inrepos.yaml) - Cross-repo PR:
/wiki-sync owner/repo#1234 - PR URL:
/wiki-sync https://github.com/owner/repo/pull/1234 - Merged commit SHA:
/wiki-sync sha:abc123 - No argument: list the most recently merged PRs not yet in
wiki/logs/synced-prs.md, prompt the user to pick one
Step 1 — Read context
Read repos.yaml, CONCEPT.md, wiki/index.md, and wiki/decisions/index.md.
Step 2 — Resolve the PR
gh pr view <pr> --repo <owner/repo> --json title,body,files,mergedAt,labels,state,headRefName,closingIssuesReferences
Require state=MERGED. If the PR is not yet merged, stop and tell the user.
Canonicalize the PR identity before idempotency checks:
- Prefer the GitHub API owner/repo and PR number.
- Treat PR URLs and
owner/repo#Nreferences as the same PR when the repo name and PR number match. - Check
wiki/logs/synced-prs.mdby canonical identity, not exact URL text only.
If the canonical PR identity already appears in wiki/logs/synced-prs.md, report "already synced", note any known archive state if relevant, and stop without moving files again.
Step 3 — Identify and verify the bound plan file and source idea
Look for a reference to a plan file in this order:
- The PR body
## Lifecyclesection, acceptingPlan: plans/<namespace>/<feature-slug>/<phase-slug>.mdorPlan: plans/<namespace>/<feature-slug>/. - A line matching
plans/<namespace>/<feature-slug>/<phase-slug>.mdelsewhere in the PR body. - Scan
plans/for a phase slug that matches the PR title or branch name. - Ask the user: "Which plan file or folder does this PR correspond to? (e.g.
plans/general/auth-rewrite/phase-1-token-storage.md,plans/general/workflow-fix/, or 'none')"
If the user says "none" or no plan file is found, skip plan/source archive cleanup at the end.
When a plan file is found, resolve the source idea from:
- The PR body
## Lifecyclesection lineSource idea: .... - The plan frontmatter field
source_dump. - A source idea file whose
related_planpoints at the plan path or folder.
Do not invent a source idea if none is found.
Before proceeding with archive cleanup, verify the lifecycle chain:
- The PR body
Plan:value must match the resolved plan path or folder. - The PR body
Source idea:value, when present, must match the plansource_dump. - If the PR body has
Implementation scope: noneor only an artifact scope, do not archive plan/source files or mark lifecycle implementation complete. Continue wiki/ADR sync if appropriate. - The source idea
related_plan, when present, must match the resolved plan path or folder. - The plan/source
related_pr, when present, must match the canonical PR identity. - The plan/source
artifact_pr, when present, is provenance only and must not be used as implementation evidence. - If any values conflict, stop archive cleanup and ask the user to confirm the correct chain. Continue wiki/ADR sync if possible, but do not archive conflicting lifecycle files.
Step 4 — Resolve or create the ADR
Look for an existing bound ADR in this order:
- Any closing issue with an
adr:NNNlabel → searchwiki/decisions/*/adr-NNN-*.mdand read the matching ADR - A line matching
wiki/decisions/<zone>/adr-NNN-in the PR body - The head branch name matching
^adr-NNN-
If an existing ADR is found: proceed to Step 5 to flip its status.
If no ADR is found: create one now.
-
Find the highest existing ADR number:
python3 -c "from pathlib import Path; print(sorted(Path('wiki/decisions').glob('*/adr-*.md'))[-1])"Increment by 1. Use zero-padded 3-digit format:
adr-001-,adr-002-, etc., and write the file under the classified decision zone. -
Derive the slug from the PR title or plan file name (kebab-case).
-
Write
wiki/decisions/<zone>/adr-NNN-<slug>.md:# ADR NNN: <Title> Status: accepted Date: YYYY-MM-DD Namespace: <product namespace | platform | general> Implemented-by: <PR URL> Implemented-on: YYYY-MM-DD ## Context <1-2 sentences on why this was built and what problem it solves — derive from PR body or plan file> ## Key Design Decisions Bullet list of the meaningful choices made in this phase. Derive from the "Key Design Decisions" section of the plan file. Each bullet should state the choice and the reason behind it. - **<Decision>** — <why this approach was chosen over alternatives> - … ## Alternatives Considered <For each rejected alternative: what it was and why it was ruled out. Derive from plan file if available, otherwise "Not recorded."> ## Consequences <Bullet list of outcomes and trade-offs — what this enables, what it costs, what to watch.> ## Sources - PR: <PR URL> - Plan: `<plan file path if available>` ## Related - [Decision index](../index.md) -
Update
wiki/decisions/index.md— add the new ADR under its zone group.
Step 5 — Update ADR status (if ADR already existed)
In wiki/decisions/<zone>/adr-NNN-<slug>.md:
- Change
Status: proposed→Status: accepted - Add or preserve
Namespace:using the wiki-zone boundary rule - Add after the status line:
Implemented-by: <PR URL>Implemented-on: YYYY-MM-DD
Step 6 — Identify affected wiki pages
gh pr view <pr> --repo <owner/repo> --json files --jq '.files[].path'
For each changed file, look up repos[name].sources[path].feeds in repos.yaml to find the downstream wiki pages, then run those targets through the zone-aware target resolution rules below.
Step 7 — Update affected wiki pages
For each wiki page from Step 6: read the current page, add or update a brief synthesis section. Do not paste the diff wholesale. Preserve source authority with a link or path. Mark uncertainty explicitly.
Step 7.5 — Write Tunable Knobs to engineering wiki
If the plan file has a "Tunable Knobs and Notes" section with any content, append it to wiki/platform/engineering/tunable-knobs.md (create the file if it doesn't exist):
## <ADR title> (ADR NNN)
> Source: `<plan file path>` — ingested YYYY-MM-DD
<Paste the Tunable Knobs section verbatim from the plan file>
This preserves operational knowledge (thresholds, caps, timeouts, signals to watch) that would otherwise become harder to find after the plan file is archived. If there are no tunable knobs, skip this step.
Step 8 — Append to wiki log
Append to wiki/logs/index.md:
### YYYY-MM-DD — <ADR title or PR title>
- PR: <PR URL>
- ADR: <ADR path> (status → accepted)
- Wiki pages updated: <list>
- Sources consulted: <list of changed source files>
If wiki/logs/index.md exceeds ~20 entries, move older entries to wiki/logs/YYYY-MM.md and keep the last 5 in index.md.
Step 9 — Record in synced-prs ledger
Append to wiki/logs/synced-prs.md (create if missing):
<PR URL> synced <YYYY-MM-DD>
Step 10 — Archive plan and source idea files
Archive cleanup is allowed only when the whole linked idea/plan chain is complete. A source idea linked to a plan folder remains active until every linked phase file is synced, archived, or explicitly included in the completed implementation scope. Do not archive a source idea merely because one phase in its plan folder merged or because a planning/artifact PR landed.
Treat these statuses as complete for archive-scope checks: implemented-and-synced and archived. Treat pr-open as complete only when related_pr matches the merged PR being synced and the phase is explicitly included in the PR implementation lifecycle scope. Never treat artifact_pr alone as complete. Treat wip, ready to ship, implemented-pending-pr, missing status, and unknown
Content truncated.
When not to use it
- →When the PR is not yet merged to the default branch
- →When copying source documents wholesale into the wiki
- →When presenting speculation as settled knowledge in the wiki
Limitations
- →The skill requires the PR to be merged for PR mode.
- →It does not move wiki pages unless explicitly asked for a migration.
- →The wiki contains only decided and implemented knowledge.
How it compares
This skill provides a structured, zone-aware workflow for wiki synchronization, ensuring that documentation is consistently routed, logged, and archived, which is more systematic than manual wiki updates.
Compared to similar skills
wiki-sync side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| wiki-sync (this skill) | 0 | 2mo | Review | Intermediate |
| wiki | 0 | 3mo | No flags | Beginner |
| wiki-page-writer | 5 | 3mo | No flags | Advanced |
| search-company-knowledge | 2 | 5mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by zoraxl
View all by zoraxl →You might also like
wiki
yangyuan-zhen
[OMX] Persistent markdown project wiki stored under .omx/wiki with keyword search and lifecycle capture
wiki-page-writer
microsoft
Generates rich technical documentation pages with dark-mode Mermaid diagrams, source code citations, and first-principles depth. Use when writing documentation, generating wiki pages, creating technical deep-dives, or documenting specific components or systems.
search-company-knowledge
atlassian
Search across company knowledge bases (Confluence, Jira, internal docs) to find and explain internal concepts, processes, and technical details. When Claude needs to: (1) Find or search for information about systems, terminology, processes, deployment, authentication, infrastructure, architecture, or technical concepts, (2) Search internal documentation, knowledge base, company docs, or our docs, (3) Explain what something is, how it works, or look up information, or (4) Synthesize information from multiple sources. Searches in parallel and provides cited answers.
confluence-assistant
tech-leads-club
Expert in Confluence operations using Atlassian MCP - automatically detects workspace Confluence configuration or prompts for site details. Use for searching, creating, updating pages, managing spaces, and adding comments with proper Markdown formatting.
technical-doc-creator
mhattingpete
Create HTML technical documentation with code blocks, API workflows, system architecture diagrams, and syntax highlighting. Use when users request technical documentation, API docs, API references, code examples, or developer documentation.
wiki
jmstar85
>