$npx -y skills add NicholasSpisak/second-brain --skill second-brain-lintHealth-check the wiki for contradictions, orphan pages, stale claims, and missing cross-references. Use when the user says "audit", "health check", "lint", "find problems", or wants to improve wiki quality.
| 1 | # Second Brain — Lint |
| 2 | |
| 3 | Health-check the wiki and report issues with actionable fixes. |
| 4 | |
| 5 | ## Audit Steps |
| 6 | |
| 7 | Run all checks below, then present a consolidated report. |
| 8 | |
| 9 | ### 1. Broken wikilinks |
| 10 | |
| 11 | Scan all wiki pages for `[[wikilink]]` references. For each link, verify the target page exists. Report any broken links. |
| 12 | |
| 13 | ```bash |
| 14 | # Find all wikilinks across wiki pages |
| 15 | grep -roh '\[\[[^]]*\]\]' wiki/ | sort -u |
| 16 | ``` |
| 17 | |
| 18 | Cross-reference against actual files in `wiki/`. |
| 19 | |
| 20 | ### 2. Orphan pages |
| 21 | |
| 22 | Find pages with no inbound links — no other page references them via `[[wikilink]]`. |
| 23 | |
| 24 | For each `.md` file in `wiki/sources/`, `wiki/entities/`, `wiki/concepts/`, `wiki/synthesis/`: |
| 25 | - Extract the page name (filename without extension) |
| 26 | - Search all other wiki pages for `[[Page Name]]` |
| 27 | - If no other page links to it, it's an orphan |
| 28 | |
| 29 | ### 3. Contradictions |
| 30 | |
| 31 | Read pages that share entities or concepts and look for conflicting claims. Flag when: |
| 32 | - Two source summaries make opposing claims about the same topic |
| 33 | - An entity page contains information that conflicts with a source summary |
| 34 | - Dates, figures, or factual claims differ between pages |
| 35 | |
| 36 | ### 4. Stale claims |
| 37 | |
| 38 | Cross-reference source dates with wiki content. Flag when: |
| 39 | - A concept page cites only old sources and newer sources exist on the same topic |
| 40 | - Entity information hasn't been updated despite newer sources mentioning that entity |
| 41 | |
| 42 | ### 5. Missing pages |
| 43 | |
| 44 | Scan for `[[wikilinks]]` that point to pages that don't exist yet. These are topics the wiki mentions but hasn't given their own page. Assess whether they warrant a page. |
| 45 | |
| 46 | ### 6. Missing cross-references |
| 47 | |
| 48 | Find pages that discuss the same topics but don't link to each other. Look for: |
| 49 | - Entity pages that mention concepts without linking them |
| 50 | - Concept pages that mention entities without linking them |
| 51 | - Source summaries that cover the same topic but don't reference each other |
| 52 | |
| 53 | ### 7. Index consistency |
| 54 | |
| 55 | Verify `wiki/index.md` is complete and accurate: |
| 56 | - Every page in `wiki/sources/`, `wiki/entities/`, `wiki/concepts/`, `wiki/synthesis/` has an index entry |
| 57 | - No index entries point to deleted pages |
| 58 | - Entries are under the correct category header |
| 59 | |
| 60 | ### 8. Data gaps |
| 61 | |
| 62 | Based on the wiki's current coverage, suggest: |
| 63 | - Topics mentioned frequently but lacking depth |
| 64 | - Questions the wiki can't answer well |
| 65 | - Areas where a web search could fill in missing information |
| 66 | |
| 67 | ## Report Format |
| 68 | |
| 69 | Present findings grouped by severity: |
| 70 | |
| 71 | ### Errors (must fix) |
| 72 | - Broken wikilinks |
| 73 | - Contradictions between pages |
| 74 | - Index entries pointing to missing pages |
| 75 | |
| 76 | ### Warnings (should fix) |
| 77 | - Orphan pages with no inbound links |
| 78 | - Stale claims from outdated sources |
| 79 | - Missing pages for frequently referenced topics |
| 80 | |
| 81 | ### Info (nice to fix) |
| 82 | - Potential cross-references to add |
| 83 | - Data gaps that could be filled |
| 84 | - Index entries that could be more descriptive |
| 85 | |
| 86 | For each finding, include: |
| 87 | - **What:** description of the issue |
| 88 | - **Where:** the specific file(s) and line(s) |
| 89 | - **Fix:** what to do about it |
| 90 | |
| 91 | ## After the Report |
| 92 | |
| 93 | Ask the user: |
| 94 | > "Found N errors, N warnings, and N info items. Want me to fix any of these?" |
| 95 | |
| 96 | If the user agrees, fix issues and report what changed. |
| 97 | |
| 98 | ## Log the lint pass |
| 99 | |
| 100 | Append to `wiki/log.md`: |
| 101 | |
| 102 | ## [YYYY-MM-DD] lint | Health check |
| 103 | Found N errors, N warnings, N info items. Fixed: [list of fixes applied]. |
| 104 | |
| 105 | ## When to Lint |
| 106 | |
| 107 | - **After every 10 ingests** — catches cross-reference gaps while they're fresh |
| 108 | - **Monthly at minimum** — catches stale claims and orphan pages over time |
| 109 | - **Before major queries** — ensures the wiki is healthy before you rely on it for analysis |
| 110 | |
| 111 | ## Related Skills |
| 112 | |
| 113 | - `/second-brain-ingest` — process new sources into wiki pages |
| 114 | - `/second-brain-query` — ask questions against the wiki |