knowledge-graph
How to Install
Claude Code:
git clone --depth 1 https://github.com/emmahyde/dotfiles.git && cp dotfiles/.claude/skills/knowledge-graph ~/.claude/skills/knowledge-graph -r---
name: knowledge-graph
description: Project document navigation. Use when you need to understand how documents connect, find related content, identify orphaned pages, or orient on a project's structure before doing other work.
---
# Knowledge Graph — Document Relationship Mapping
Parse markdown files to build a map of how a project's documents connect. Useful for orientation (what exists, how it's organized), finding related content before writing or reviewing, and maintenance (orphans, broken links, missing back-links).
## What It Parses
The bundled `resources/graph.sh` script extracts relationships from these patterns:
- **Markdown links** — `[text](path)` explicit references between documents
- **Wikilinks** — `[[entity-name]]` shorthand references common in knowledge bases
- **Mermaid relationship blocks** — `graph`, `flowchart`, and relationship lines in fenced mermaid blocks
- **YAML front matter references** — fields like `arc`, `chapter`, `characters`, `location` that connect documents by metadata
- **Entity mentions** — names and terms that appear across documents without explicit links
## What It Outputs
- **Connectivity graph** — file → list of outbound links and the files that link back to it
- **Orphaned files** — documents nothing links to (potential dead content or missing integration)
- **Broken links** — references to files or paths that don't exist
- **Missing back-links** — A references B, but B doesn't reference A (useful for wiki and knowledge base maintenance)
- **Clusters** — groups of tightly connected documents (helps identify topic areas)
- **Entity mention map** — which documents mention which entities, even without explicit links
## Running the Script
```bash
bash resources/graph.sh [root_directory]
```
If no directory is specified, it searches from the current working directory. The script uses only standard unix tools (grep, awk, sed, find, sort) — no Python or other runtime dependencies.
The output is plain text, structured with clear section headers. Pipe it, redirect it to a file, or read it directly.
## When to Read the Script Source
Read `resources/graph.sh` if you need to understand exactly what patterns it matches, extend it for a project with custom link conventions, or debug unexpected output. For normal use, just run it and read the report.
## Interpreting Results
Orphaned files aren't automatically problems — some documents are entry points (READMEs, indexes) that are linked *to* but not *from*. Missing back-links matter most in wikis and knowledge bases where bidirectional navigation is expected. Broken links are almost always worth fixing.
The graph is a starting point for investigation, not a verdict. An orphaned file might be intentionally standalone. A cluster of tightly linked files might be a well-maintained topic area or might indicate circular references with no external connections.
Details
| Category | Coding → generation |
| Source | emmahyde/dotfiles |
| SKILL.md | View on GitHub → |
| Repo Stars | N/A |
| Est. per Skill | N/A (shared across 91 skills from this repo) |
| Difficulty | Intermediate |
| Risk Level | Safe |
Related Skills
cc-skill-continuous-learning
cc-skill-continuous-learning Development skill skill. When to Use This skill is applicable to execut
git-hooks-automation
Git Hooks Automation Automate code quality enforcement at the Git level. Set up hooks that lint, for
conductor-setup
Set up this Rails project for Conductor, the Mac app for parallel coding agents. When to Use You nee
conductor-manage
Track Manager Manage the complete track lifecycle including archiving, restoring, deleting, renaming
Works Well With
Skills from the same repository — often designed to work together
duet
--- name: duet description: Two-party posture — user as director, agent as executor; every fork, tra
examples
BAD: jq CLI → common failure modes Same source as good-jq-skill.md, showing what goes wrong. --- Fai
audit
--- description: >- Structured PASS/FAIL audit of any target against any criteria. Takes a subject a