$npx -y skills add vanillaflava/llm-wiki-skills --skill wiki-integrateWeave a wiki page into the knowledge graph: add it to index.md and add backlinks in both directions. Always use this skill when the user says /wiki-integrate, 'nothing links to this page', 'this page is an orphan', 'connect this page to related pages', 'add backlinks to this page
| 1 | # Wiki Integrate |
| 2 | |
| 3 | Connects a new or updated wiki page into the knowledge graph by adding backlinks and an index entry. |
| 4 | |
| 5 | --- |
| 6 | |
| 7 | ## Config Discovery |
| 8 | |
| 9 | **Every invocation starts here.** Wiki root is the directory containing `wiki-config.md`. Skills derive it at runtime. Pages this skill writes to follow the structure in `wiki-schema.md` - both files need to be present. |
| 10 | |
| 11 | 1. **Identify scope**: Determine your filesystem scope root - the top-level directory your filesystem tool can access. |
| 12 | |
| 13 | 2. **Scope check - MANDATORY STOP**: If scope is bare drive root (`C:\`, `D:\`, `/`), OS root, or user home (`C:\Users\X`, `/home/X`, `/Users/X`) → **stop immediately. Do not search. Do not attempt to locate wiki-config.md.** Go directly to step 6. |
| 14 | |
| 15 | 3. **Scan `<available_skills>` for `wiki-config`.** Note whether it's available - this shapes the recommendations below. The bundled `references/setup-help.md` is also available; read it if the user needs orientation or if you get stuck. |
| 16 | |
| 17 | 4. **Locate and read `wiki-config.md`**: Search recursively (first-match, max 5 levels). If found, read it (`blacklist`, `index_excludes`, `ingested_folder`, `ingested_subdirs`, `log_format`). If not found, skip to step 6. |
| 18 | |
| 19 | 5. **Locate and read `wiki-schema.md` - mandatory check**: In the same directory as `wiki-config.md`, verify `wiki-schema.md` exists and parses as YAML. **Do not proceed to the Workflow below until you have a definite verdict** (present / missing / malformed). Then: |
| 20 | |
| 21 | - **Present and parses cleanly** → read the schema (`mandatory_fields`, `conditional_fields`, `enums`) and proceed to the Workflow. |
| 22 | |
| 23 | - **Missing** → STOP. Do not proceed. Do not deploy. Response depends on whether `wiki-config` is in `<available_skills>` (from step 3): |
| 24 | |
| 25 | - **wiki-config available:** Output exactly this pattern - *"Your wiki is missing `wiki-schema.md`. Run `/wiki-config` to deploy it and complete setup. I'll wait for that to be done before proceeding."* End of turn. Do not offer bundled deployment; do not present alternatives. wiki-config's guided flow is the correct path when wiki-config is available. |
| 26 | |
| 27 | - **wiki-config not available:** Offer bundled fallback - *"Your wiki is missing `wiki-schema.md` and the wiki-config skill is not installed. I can deploy a default from my bundled reference, but I'd recommend installing wiki-config for the guided setup. Deploy bundled default?"* Wait for explicit confirmation. On OK, deploy from `references/wiki-schema.md`. |
| 28 | |
| 29 | - **Malformed** → STOP. Same structure: |
| 30 | |
| 31 | - **wiki-config available:** *"Your `wiki-schema.md` is malformed. Run `/wiki-config` - it has a guided repair flow that preserves any customizations you've made. I'll wait."* End of turn. Do not attempt repair or bundled overwrite. |
| 32 | |
| 33 | - **wiki-config not available:** Point to `references/setup-help.md` for manual repair guidance. If the user explicitly instructs a reset (not as an automatic fallback), warn that it overwrites any customizations, then deploy the default on explicit OK. |
| 34 | |
| 35 | The same two-branch structure applies if `wiki-config.md` itself was found malformed in step 4: wiki-config available → stop and recommend `/wiki-config`, end of turn; unavailable → guided manual repair via setup-help.md. |
| 36 | |
| 37 | 6. **Config not found at all**: Ask the user for their wiki root path, search there (bounded, max 5 levels). If still nothing, they don't have a wiki yet - follow the "Missing" branch above (recommend `/wiki-config`; offer bundled deployment if unavailable). |
| 38 | |
| 39 | |
| 40 | --- |
| 41 | |
| 42 | ## Capability Requirements |
| 43 | |
| 44 | This skill requires **filesystem read and write access**. If unavailable, inform the user and stop. |
| 45 | |
| 46 | --- |
| 47 | |
| 48 | ## When to Use This Skill |
| 49 | |
| 50 | Run wiki-integrate when: |
| 51 | - A new wiki page has been created directly in a chat (not via wiki-ingest) |
| 52 | - An existing page has been significantly revised and may have new connection opportunities |
| 53 | - Pages exist in the vault that are orphaned from the knowledge graph |
| 54 | |
| 55 | **wiki-ingest** processes raw source material into wiki pages and links them automatically. **wiki-integrate** links pages that already exist as wiki content. Do not use one as a substitute for the other. |