linkage-repair

Audit and repair bidirectional links between research sources and findings in a knowledge base.

Updated Apr 19, 2026
One-click install
npx skills add https://github.com/nickgogan/improvement-loop --skill linkage-repair-nickgogan
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: linkage-repair
Source: https://github.com/nickgogan/improvement-loop/tree/main/.claude/skills/linkage-repair
Command: npx skills add https://github.com/nickgogan/improvement-loop --skill linkage-repair-nickgogan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Bidirectional links between research sources and findings in a knowledge base drift out of sync after bulk extractions, backfills, or migrations, leaving orphaned findings, unlinked sources, and asymmetric references that break traceability. ## Core Features & Use Cases - Gap Detection: Identifies orphaned findings, unlinked sources, asymmetric links, and broken references across Markdown frontmatter arrays. - Content Matching: Matches orphaned findings to candidate sources using name, URL, topic, and tag heuristics with confidence levels. - Guided Repair: Produces a structured repair report, waits for human approval, then edits frontmatter arrays to restore bidirectional links. - Use Case: After a bulk extraction session creates dozens of findings, run the audit to find findings with empty sources arrays, match them to existing sources, and apply approved fixes. ## Quick Start Run the linkage repair audit on the Improvement Loop knowledge base in dry-run mode and show me the gap report.

Frequently Asked Questions about linkage-repair

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find orphaned findings in a Markdown knowledge base?▼

Scan each finding file's frontmatter for an empty or missing sources array, then attempt content matching against source names, URLs, key takeaways, and tags. The linkage analyzer script outputs these orphans as structured JSON for review.

How do I fix asymmetric links between two Markdown files?▼

Identify which direction is missing: a source listing a finding without a reverse link, or vice versa. Then edit the file lacking the reference to add the counterpart filename to its findings or sources array, keeping entries in alphabetical order.

What does the linkage repair dry-run mode do?▼

Dry-run mode is the default behavior and reports all detected gaps without modifying any files. It produces a structured report of orphaned findings, unlinked sources, asymmetric links, and repair candidates with confidence levels, then stops before any edits.

Can findings legitimately have no linked sources?▼

Yes. Findings originating from conversations, searches, or background knowledge may have no corresponding source file, so an empty sources array is acceptable. The skill prefers precision over recall and only auto-fixes high-confidence matches.

Why are Notion URLs in sources arrays flagged instead of auto-fixed?▼

A Notion URL or ID is not a filename and may point to a different version of the source than the one in the knowledge base. These references are flagged for manual review rather than automatically converted to filename links.