do-wiki-align
Skill0 starsChanged 6 months agoApache-2.0View on GitHub
Inspect an existing wiki-like markdown corpus and align it to this repo's Obsidian-friendly note-graph conventions. Use this when the user wants to import, normalize, retrofit, or clean up an existing wiki, notes folder, vault, docs tree, or mixed markdown knowledge base. In monorepos, also use it to align relevant AGENTS.md and CLAUDE.md files. Not for routine wiki maintenance; use /do-wiki-lint for that.
In this repository15 other files it gives its agents.
- agent-md-improverSkill
- do-agentsSkill
- do-amendSkill
- do-planSkill
- do-researchSkill
- do-startSkill
- do-wiki-addSkill
- do-wiki-amendSkill
- do-wiki-buildSkill
- do-wiki-learningsSkill
- do-wiki-lintSkill
- do-wiki-querySkill
- do-wiki-reviewSkill
- revise-agent-mdSkill
- setup-obsidian-vaultSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
49 rules. About 0 are common, 42 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈42
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 16
Use /do-wiki-lint for ongoing maintenance of a wiki that already largely follows the conventions.
- Very specific: line 17
Use /do-wiki-align when the structure, naming, link style, hub notes, or note graph need normalization or retrofit work.
- Distinctive: line 33
If no explicit target is provided, align the most plausible wiki-like root in the current workspace.
- Very specific: line 50
If --guidance-only appears anywhere, set the mode to guidance-only.
- Distinctive: line 51
Remove the flag from the remaining text.
- Distinctive: line 52
Treat the remaining text, if any, as the target root or scope.
- Distinctive: line 53
If no target remains, use the most plausible wiki root and its most relevant guidance scope.
- Distinctive: line 60
read the wiki so those guidance files can point to the right hub notes and durable pages
- Distinctive: line 61
treat the wiki as read-only context only
- Distinctive: line 62
do not rename or move wiki notes
- Distinctive: line 63
do not normalize links across the whole wiki corpus
- Distinctive: line 64
do not restructure category directories
- Very specific: line 65
do not create, update, or append any wiki file, including SCHEMA.md, index.md, log.md, or any legacy root overview.md
- Distinctive: line 82
If the user names a root or scope explicitly, prefer it.
- Distinctive: line 83
If multiple roots are plausible, ask the smallest follow-up question needed.
- Distinctive: line 84
If nothing wiki-like exists yet, stop and recommend:
- Very specific: line 90
Treat the chosen location as <wiki root> for the rest of this skill.
- Distinctive: line 96
Use these scoping rules:
- Distinctive: line 98
Always inspect root-level AGENTS.md / CLAUDE.md when they exist.
- Very specific: line 99
Always inspect <wiki root>/AGENTS.md / <wiki root>/CLAUDE.md when they exist.
- Distinctive: line 100
If the target names a subtree such as an app, package, service, or module, inspect the nearest relevant scoped guidance files in or above …
- Distinctive: line 101
If no explicit subtree is named, inspect additional scoped guidance files only when the wiki scope clearly covers them or when they likely …
- Distinctive: line 102
Treat mirror files such as CLAUDE.md files that only defer to AGENTS.md as mirrors.
- Distinctive: line 108
Before proposing changes, read:
- Distinctive: line 137
Treat the existing corpus with care.
- Distinctive: line 143
Do not change any files yet.
- Very specific: line 145
Use ${CLAUDE_SKILL_DIR}/references/proposal-template.md as the exact structure for your proposal.
- Distinctive: line 155
Call out every file you expect to create or update.
- Distinctive: line 156
Call out every file you expect to rename or move.
- Distinctive: line 157
Call out any ambiguous duplicates you will not merge automatically.
- Distinctive: line 160
Call out the guidance files you expect to update.
- Distinctive: line 161
Call out any guidance sections you expect to shorten and replace with wiki pointers.
- Distinctive: line 162
Call out any suspected stale guidance claims that need verification or correction.
- Distinctive: line 163
Call out mirror files you will intentionally leave thin or untouched.
- Distinctive: line 166
After presenting the proposal, ask:
- Distinctive: line 170
Wait for explicit confirmation before editing files.
- Distinctive: line 202
When renaming or moving notes:
- Distinctive: line 206
update obvious inbound references
- Distinctive: line 207
avoid partial graph breakage
- Distinctive: line 209
When updating guidance files:
- Distinctive: line 212
prefer concise pointers into the wiki over long duplicated deep-reference prose
- Distinctive: line 213
verify stale-looking claims against current repo state before changing or removing them
- Distinctive: line 214
keep mirror files like CLAUDE.md thin when they intentionally defer to AGENTS.md
- Distinctive: line 225
If a case is ambiguous, leave it unresolved and report it explicitly.
- Distinctive: line 231
After applying the alignment, output:
- Distinctive: line 261
If the scope was already close to the target conventions and only small repairs were needed, say so explicitly.
- Distinctive: line 270
Prefer the smallest safe alignment over a broad rewrite.
- Distinctive: line 277
Do not silently merge ambiguous duplicates.
- Distinctive: line 278
Do not modify raw-source files.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
You are a senior engineer and wiki maintainer retrofitting an existing wiki-like markdown corpus to this repo's Obsidian-friendly conventions.
This skill is broader than /do-wiki-lint.
- Use
/do-wiki-lintfor ongoing maintenance of a wiki that already largely follows the conventions. - Use
/do-wiki-alignwhen the structure, naming, link style, hub notes, or note graph need normalization or retrofit work.
The target output is:
- an Obsidian-friendly note graph
- durable category notes with canonical kebab-case filenames
- internal links written as
[[kebab-case-note-name]] index.mdfunctioning as the single root hub, with a concise## Overviewsection near the top- stronger reciprocal links and fewer isolated notes
- an explicit
SCHEMA.mdwhen one is missing or materially incomplete - lean operational
AGENTS.md/CLAUDE.mdfiles that point into the wiki for durable deep reference instead of duplicating long, fast-aging technical knowledge
Input
The alignment target is: $ARGUMENTS
If no explicit target is provided, align the most plausible wiki-like root in the current workspace.
Step 0 — Parse arguments
$ARGUMENTS may contain an optional mode flag and an optional target scope.
Examples:
--guidance-only--guidance-only apps/apiwikiapps/web
Parse the arguments like this:
- If
--guidance-onlyappears anywhere, set the mode to guidance-only. - Remove the flag from the remaining text.
- Treat the remaining text, if any, as the target root or scope.
- If no target remains, use the most plausible wiki root and its most relevant guidance scope.
Guidance-only mode
In --guidance-only mode:
- inspect and update only relevant
AGENTS.mdandCLAUDE.mdfiles - read the wiki so those guidance files can point to the right hub notes and durable pages
- treat the wiki as read-only context only
- do not rename or move wiki notes
- do not normalize links across the whole wiki corpus
- do not restructure category directories
- do not create, update, or append any wiki file, including
SCHEMA.md,index.md,log.md, or any legacy rootoverview.md
Phase 1 — Resolve the wiki-like root and guidance scope
Locate the most plausible wiki-like root by checking for signals such as:
SCHEMA.mdindex.mdoverview.mdas a legacy root-hub signallog.md- dense markdown trees under directories like
wiki/,knowledge/,vault/,notes/,docs/, orresearch/ - existing source, topic, concept, entity, or analysis note clusters
Rules:
- If the user names a root or scope explicitly, prefer it.
- If multiple roots are plausible, ask the smallest follow-up question needed.
- If nothing wiki-like exists yet, stop and recommend:
/do-wiki-build <topic or wiki goal>Treat the chosen location as <wiki root> for the rest of this skill.
Then resolve the relevant guidance-file scope.
Guidance files may exist at multiple levels in a monorepo. Do not assume there is only one global pair.
Use these scoping rules:
- Always inspect root-level
AGENTS.md/CLAUDE.mdwhen they exist. - Always inspect
<wiki root>/AGENTS.md/<wiki root>/CLAUDE.mdwhen they exist. - If the target names a subtree such as an app, package, service, or module, inspect the nearest relevant scoped guidance files in or above that subtree.
- If no explicit subtree is named, inspect additional scoped guidance files only when the wiki scope clearly covers them or when they likely contain duplicated or stale deep-reference material that should point into the wiki.
- Treat mirror files such as
CLAUDE.mdfiles that only defer toAGENTS.mdas mirrors. Keep them thin unless the workspace clearly intends otherwise.
Phase 2 — Inspect the current shape
Before proposing changes, read:
${CLAUDE_SKILL_DIR}/references/alignment-rules.md${CLAUDE_SKILL_DIR}/references/proposal-template.md${CLAUDE_SKILL_DIR}/references/guidance-file-triage.md<wiki root>/SCHEMA.mdwhen it exists<wiki root>/index.mdwhen it exists<wiki root>/overview.mdwhen it exists, so you can assess whether it contains legacy root-hub content that should be folded intoindex.md<wiki root>/log.mdwhen it exists- the relevant
AGENTS.md/CLAUDE.mdfiles for the resolved scope - a representative sample of notes from the target scope
In --guidance-only mode, only read the minimum wiki context needed to point guidance files at the right hub or scoped notes. Do not perform a full graph audit.
Map the current state:
- current directory structure
- current filename patterns
- current internal link styles such as
[[wikilinks]], markdown links, plain-text references, or mixed styles - existing hub notes and whether they are effective
- obvious duplicate note identities
- broken or unresolved internal links
- missing reciprocal backlinks where relationships are material
- notes that should likely move into
topics/,entities/,concepts/, oranalyses/ - existing
sources/directories whose pages should be absorbed into topic/entity/concept pages - relevant
AGENTS.md/CLAUDE.mdfiles and whether each is canonical, scoped, or mirror-only - stale or duplicated deep-reference sections in guidance files that should instead point into the wiki
- guidance sections that should stay local and operational, such as commands, hard rules, safety constraints, scope boundaries, and canonical source-of-truth pointers
Treat the existing corpus with care. The goal is alignment, not a destructive rewrite.
Phase 3 — Build the proposal and stop
Do not change any files yet.
Use ${CLAUDE_SKILL_DIR}/references/proposal-template.md as the exact structure for your proposal.
The proposal should distinguish clearly between:
- changes that are safe and obvious
- changes that are likely right but still somewhat judgmental
- ambiguous duplicates or restructures that should not be applied silently
Important proposal requirements:
- Call out every file you expect to create or update.
- Call out every file you expect to rename or move.
- Call out any ambiguous duplicates you will not merge automatically.
- State whether
SCHEMA.mdorindex.mdneed creation or major revision, and whether any legacy rootoverview.mdshould be consolidated and removed. - State whether link-style normalization will be partial or broad.
- Call out the guidance files you expect to update.
- Call out any guidance sections you expect to shorten and replace with wiki pointers.
- Call out any suspected stale guidance claims that need verification or correction.
- Call out mirror files you will intentionally leave thin or untouched.
- In
--guidance-onlymode, set all wiki-structure proposal sections such as create/update, rename/move, link normalization, and backlink repairs toNoneunless a guidance file itself is the item being updated.
After presenting the proposal, ask:
"Does this alignment proposal look right? If yes, I'll apply it. If anything should be added, removed, or made more conservative, tell me and I'll revise it first."
Wait for explicit confirmation before editing files.
Phase 4 — Apply the alignment
Once the user confirms, apply the smallest safe set of changes needed to align the wiki.
Safe full-alignment work includes:
- creating or updating
<wiki root>/SCHEMA.md - creating or updating
<wiki root>/index.mdas the single root hub with a concise## Overviewsection near the top - consolidating a legacy root
<wiki root>/overview.mdintoindex.mdand removing it when safe - normalizing obvious durable category-note filenames to kebab-case
- normalizing obvious internal links to
[[kebab-case-note-name]] - updating inbound references when filenames change
- adding reciprocal backlinks where the relationship is clearly material
- creating missing category directories when the current scope clearly benefits from them
- moving notes into clearer category locations when the destination is obvious and safe
- migrating source pages: when
<wiki root>/sources/exists, read each source page, synthesize its claims into the most relevant topic/entity/concept pages, then remove the source page. Flag any source pages where the destination is not obvious rather than guessing. - auditing and updating relevant
AGENTS.md/CLAUDE.mdfiles so they point to the wiki and keep operational guidance concise - shortening duplicated deep-reference sections in guidance files into concise wiki pointers when the durable detail already belongs in the wiki
- correcting clearly stale guidance after verifying against current repo state, guidance scope, and the wiki
- keeping mirror files thin when they intentionally defer to a canonical guidance file
- appending a parseable entry to
<wiki root>/log.mdlike:
## [YYYY-MM-DD] alignment | <scope>In --guidance-only mode, restrict the work to items 10-13 above. Do not rename or move wiki notes, restructure the wiki graph, or modify any wiki file including log.md.
When renaming or moving notes:
- preserve the content
- preserve the durable identity
- update obvious inbound references
- avoid partial graph breakage
When updating guidance files:
- preserve commands, hard rules, safety constraints, scope boundaries, and canonical source-of-truth pointers
- prefer concise pointers into the wiki over long duplicated deep-reference prose
- verify stale-looking claims against current repo state before changing or removing them
- keep mirror files like
CLAUDE.mdthin when they intentionally defer toAGENTS.md
Do not:
- silently merge ambiguous duplicate notes
- flatten meaningful disagreements
- rewrite raw-source files
- perform broad speculative synthesis during alignment
- turn
AGENTS.md/CLAUDE.mdfiles into shadow wiki pages - rewrite every scoped guidance file in a monorepo when the target scope does not require it
If a case is ambiguous, leave it unresolved and report it explicitly.
Phase 5 — Report back
After applying the alignment, output:
Alignment applied to <wiki root>
### Mode
- <full alignment or guidance-only>
### Guidance files updated
- <path or "none">
### Created or updated
- <path>
### Renamed or moved
- <old path> -> <new path>
### Left unresolved
- <issue or "none">
### Next useful command
- `/do-wiki-lint [scope]`If the scope was already close to the target conventions and only small repairs were needed, say so explicitly.
In --guidance-only mode, the Created or updated, Renamed or moved, and other structural wiki sections should normally be none unless the item is itself an AGENTS.md or CLAUDE.md file.
Rules
- Proposal first. Do not edit anything before explicit confirmation.
- Prefer the smallest safe alignment over a broad rewrite.
- Durable category-note filenames use kebab-case. Special root files keep their fixed names.
- Internal links use
[[kebab-case-note-name]]where the target note is a durable internal note. - Preserve note content and durable identity when renaming or moving files.
- In monorepos, scope guidance-file edits to the root, wiki-local, and nearest relevant subtree files. Do not fan out across unrelated modules.
- Guidance files should stay operational entrypoints, not shadow wiki pages.
- In
--guidance-onlymode, edit onlyAGENTS.md/CLAUDE.mdfiles. The wiki is read-only context in that mode. - Do not silently merge ambiguous duplicates.
- Do not modify raw-source files.
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.

