Skip to content
Back to skills

Product Knowledge Graph

ASecurity

Turn a folder of PRDs, specs, research notes and decision records into a graph of documents and the links between them, built by the bundled script from real links and named terms, then answer questions by walking it. Use when asked to map how our docs connect, which documents mention this feature, find orphaned specs, what depends on this PRD, or build a knowledge graph of our product docs without a vector database. Produces a graph file, a map of clusters and orphans, answers that cite the ...

  • 1,628 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 27, 2026
ai-agentspythonbashnodegitdatabase

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 27, 2026

npx -y skills add mohitagw15856/pm-claude-skills --skill product-knowledge-graph --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Product Knowledge Graph?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Product Knowledge Graph
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mohitagw15856-product-knowledge-graph/badge)](https://www.skillsdirectory.com/skills/mohitagw15856-product-knowledge-graph)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: product-knowledge-graph
description: "Turn a folder of PRDs, specs, research notes and decision records into a graph of documents and the links between them, built by the bundled script from real links and named terms, then answer questions by walking it. Use when asked to map how our docs connect, which documents mention this feature, find orphaned specs, what depends on this PRD, or build a knowledge graph of our product docs without a vector database. Produces a graph file, a map of clusters and orphans, answers that cite the documents they came from, and a list of links worth adding."
---

# Product Knowledge Graph Skill

Product knowledge lives in documents that refer to each other: a PRD points to research, a decision record overrides a spec, three teams write about the same feature under different names. Search finds documents; it does not show which ones are connected, which contradict each other, or which nobody links to any more. This skill builds that picture from evidence that can be checked by eye, the links and the terms actually in the files, with no embeddings and no service to run. To tidy a personal notes collection, use `knowledge-gardening`.

## What This Skill Produces

- **`graph.json`**: documents as nodes, and edges from Markdown links, wiki links and shared terms
- **A map**: the clusters, the hubs that many documents rely on, and the orphans
- **Cited answers**: questions answered by walking the graph, each claim tied to a document
- **Suggested links**: pairs of documents that share a term but do not link to each other
- **A staleness list**: hubs that many documents depend on and that deserve an owner

## Required Inputs

Ask for these if not provided:
- **The folder** of Markdown documents
- **The terms that matter**: feature names, customer segments, systems, metrics. One per line. Synonyms should be listed together so the user can decide whether they mean the same thing
- **The question**, if there is one: impact of a change, onboarding reading order, finding duplicates

## Framework: Build From Evidence, Then Walk

1. **Agree the terms.** A graph built on vague terms connects everything to everything. Use names specific to the product.
2. **Build.** Run the script. An edge exists only where a link or a listed term is present in the text.
3. **Read the shape first.** Look at orphans (documents nothing connects to), hubs (documents many depend on) and bridges (documents that are the only connection between two groups).
4. **Answer by walking.** For "what depends on this PRD", list its incoming edges, then theirs. State the path taken so the reader can follow it.
5. **Flag disagreement.** Where two connected documents state different things about the same term, quote both and say which is newer if dates are present. Do not pick a winner without the user.
6. **Propose links.** Documents that share a term but have no link are candidates for a cross-reference.
7. **State the limits.** The graph sees links and listed terms. It does not understand meaning, and a document that discusses a feature without naming it will not be connected.

## Programmatic Helper

This skill ships `scripts/knowledge_graph.py`, with no dependencies beyond the standard library. Run it instead of estimating connections:

```bash
python3 scripts/knowledge_graph.py build docs/ --out graph.json --terms terms.txt
python3 scripts/knowledge_graph.py neighbours graph.json "prd-checkout.md"
python3 scripts/knowledge_graph.py orphans graph.json
```

`build` scans the folder (hidden folders skipped, symbolic links not followed, links that point outside the folder ignored, code blocks ignored) and prints the document, edge and orphan counts. `neighbours` lists what a document links to and what links to it, with the kind of edge. `orphans` lists documents with no connections. Output is sorted, so two runs on the same folder give the same file.

## Output Format

# Knowledge Graph: [folder]

**Built from:** [N documents · N edges · N orphans, as printed by the script] · **Terms used:** [list]

## Shape
- **Hubs:** [documents most linked to]
- **Orphans:** [documents with no connections]
- **Bridges:** [documents that alone connect two groups]

## Answer: [the question]
[Answer, with each claim followed by the document it came from and the path walked]

## Disagreements Found
| Term | Document A says | Document B says | Newer |
|------|-----------------|-----------------|-------|

## Links Worth Adding
| From | To | Shared term |
|------|----|-------------|

## What the Graph Cannot See
[Unlisted synonyms, non-Markdown files, meaning without the term]

## Quality Checks

- [ ] Counts in the report are the counts the script printed
- [ ] Every claim in an answer names its source document
- [ ] Disagreements quote both documents
- [ ] The terms list was agreed with the user, not invented
- [ ] The limits section is present

## Anti-Patterns

- [ ] Do not describe connections the graph does not contain
- [ ] Do not use generic terms such as "user" or "data" as graph terms
- [ ] Do not resolve a contradiction between documents silently
- [ ] Do not treat an orphan as worthless; it may simply be unlinked
- [ ] Do not present term co-occurrence as a dependency

## Example Trigger Phrases

- "Map how our product docs connect."
- "Which specs are orphaned?"
- "What depends on this PRD?"
- "Build a knowledge graph of this docs folder without a vector database."

Run this skill in your browser: https://mohitagw15856.github.io/pm-claude-skills/skill/product-knowledge-graph.html

Files in this skill

  • SKILL.md5.4 KB
  • scripts/knowledge_graph.py6.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.