skills/nav-graph/SKILL.md
Query project knowledge graph. Search across tasks, SOPs, memories, and concepts. Use when user asks "what do we know about X?", "show everything related to X", or "remember this pattern/pitfall/decision".
npx skillsauth add alekspetrov/navigator nav-graphInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Query and manage the unified project knowledge graph. Surfaces relevant knowledge from tasks, SOPs, system docs, and experiential memories.
Navigator v6.0.0 introduces the Project Knowledge Graph:
Query triggers:
Memory capture triggers:
Graph management triggers:
.agent/knowledge/graph.json (~1-2k tokens, loaded on query)
QUERY (searching knowledge):
User: "What do we know about authentication?"
→ Query graph by concept
CAPTURE (storing memory):
User: "Remember: auth changes often break session tests"
→ Create new memory node
INIT (building graph):
User: "Initialize knowledge graph"
→ Build graph from existing docs
STATS (viewing graph):
User: "Show graph stats"
→ Display graph statistics
Check if graph exists:
if [ -f ".agent/knowledge/graph.json" ]; then
echo "Graph exists"
else
echo "No graph found, will initialize"
fi
Initialize if not exists:
PLUGIN_DIR="${CLAUDE_PLUGIN_DIR:-$HOME/.claude/plugins/cache/navigator-marketplace/navigator}"
[ -d "$PLUGIN_DIR" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
python3 "$PLUGIN_DIR/skills/nav-graph/functions/graph_builder.py" \
--agent-dir .agent \
--output .agent/knowledge/graph.json
Extract concept from user input:
User: "What do we know about testing?"
→ Concept: testing
User: "Any pitfalls for auth?"
→ Concept: auth (normalized to authentication)
Run query:
PLUGIN_DIR="${CLAUDE_PLUGIN_DIR:-$HOME/.claude/plugins/cache/navigator-marketplace/navigator}"
[ -d "$PLUGIN_DIR" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
python3 "$PLUGIN_DIR/skills/nav-graph/functions/graph_manager.py" \
--action query \
--concept "testing" \
--graph-path .agent/knowledge/graph.json
Display results:
Knowledge Graph: "testing"
TASKS (3)
- TASK-30: Task Verification Enhancement (completed)
- TASK-17: Visual Regression Integration (completed)
- TASK-11: Project Skills Generation (completed)
MEMORIES (2)
- PITFALL: "Auth changes break session tests" (90%)
- PATTERN: "Always run unit tests before integration" (85%)
SOPs (1)
- visual-regression-setup
FILES (5)
- skills/backend-test/*
- skills/frontend-test/*
Load details: "Read TASK-30" or "Show testing memories"
Parse memory from user input:
User: "Remember this pitfall: auth changes often break session tests"
→ Type: pitfall
→ Summary: "auth changes often break session tests"
→ Concepts: [auth, testing]
User: "Remember we decided to use JWT over sessions for scaling"
→ Type: decision
→ Summary: "use JWT over sessions for scaling"
→ Concepts: [auth, architecture]
Determine memory type:
| User Says | Memory Type | |-----------|-------------| | "pattern", "we use", "approach" | pattern | | "pitfall", "watch out", "careful" | pitfall | | "decided", "chose", "because" | decision | | "learned", "discovered", "realized" | learning |
Create memory:
PLUGIN_DIR="${CLAUDE_PLUGIN_DIR:-$HOME/.claude/plugins/cache/navigator-marketplace/navigator}"
[ -d "$PLUGIN_DIR" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
python3 "$PLUGIN_DIR/skills/nav-graph/functions/graph_manager.py" \
--action add-memory \
--memory-type pitfall \
--summary "auth changes often break session tests" \
--concepts "auth,testing" \
--confidence 0.9 \
--graph-path .agent/knowledge/graph.json
Optionally create detailed memory file:
# Pitfall: Auth Changes Break Session Tests
## Summary
Auth changes often break session tests due to...
## Context
Discovered during TASK-XX when...
## Recommended Approach
When modifying auth, always run...
## Related
- TASK-12: V3 Skills-Only
- SOP: autonomous-completion
Confirm capture:
Memory captured: mem-001
Type: Pitfall
Summary: "auth changes often break session tests"
Concepts: auth, testing
Confidence: 90%
This will be surfaced when working on auth or testing topics.
Build from existing docs:
PLUGIN_DIR="${CLAUDE_PLUGIN_DIR:-$HOME/.claude/plugins/cache/navigator-marketplace/navigator}"
[ -d "$PLUGIN_DIR" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
python3 "$PLUGIN_DIR/skills/nav-graph/functions/graph_builder.py" \
--agent-dir .agent \
--output .agent/knowledge/graph.json
Display results:
Knowledge Graph Initialized
Scanned:
- Tasks: 35
- SOPs: 12
- System docs: 3
- Markers: 8
Extracted:
- Concepts: 15
- Relationships: 47
Graph saved to .agent/knowledge/graph.json
Query with: "What do we know about [topic]?"
Display graph statistics:
PLUGIN_DIR="${CLAUDE_PLUGIN_DIR:-$HOME/.claude/plugins/cache/navigator-marketplace/navigator}"
[ -d "$PLUGIN_DIR" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
python3 "$PLUGIN_DIR/skills/nav-graph/functions/graph_manager.py" \
--action stats \
--graph-path .agent/knowledge/graph.json
Output:
Knowledge Graph Statistics
==========================
Total Nodes: 65
Total Edges: 47
Memories: 5
Last Updated: 2025-01-23T10:30:00Z
By Type:
Tasks: 35
SOPs: 12
System: 3
Markers: 8
Concepts: 15
Memories: 5
If user asks for related items:
User: "What's related to TASK-29?"
Run traversal:
PLUGIN_DIR="${CLAUDE_PLUGIN_DIR:-$HOME/.claude/plugins/cache/navigator-marketplace/navigator}"
[ -d "$PLUGIN_DIR" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
python3 "$PLUGIN_DIR/skills/nav-graph/functions/graph_manager.py" \
--action related \
--node-id "TASK-29" \
--max-depth 2 \
--graph-path .agent/knowledge/graph.json
"We use X for Y in this project"
"Watch out for X when touching Y"
"We chose X over Y because Z"
"X usually means Y in this codebase"
Base confidence:
Decay:
Boost:
Threshold:
Loads graph stats on session start:
Knowledge graph: 65 nodes, 5 memories
Relevant: 2 memories for current context
Auto-extracts concepts from new tasks:
Creating TASK-35: Project Memory
Extracted concepts: knowledge, memory, graph
Added to graph.
Corrections auto-create memories via correction_to_memory.py:
PLUGIN_DIR="${CLAUDE_PLUGIN_DIR:-$HOME/.claude/plugins/cache/navigator-marketplace/navigator}"
[ -d "$PLUGIN_DIR" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
# When correction detected in nav-profile:
python3 "$PLUGIN_DIR/skills/nav-graph/functions/correction_to_memory.py" \
--action convert-one \
--correction-json '{"pattern": "...", "context": "...", "confidence": "high"}'
# Output:
[Correction detected]
→ Type: pitfall (based on pattern analysis)
→ Concepts: [auth, testing] (auto-extracted)
→ Created memory: mem-002
→ Added to graph
Sync all corrections:
PLUGIN_DIR="${CLAUDE_PLUGIN_DIR:-$HOME/.claude/plugins/cache/navigator-marketplace/navigator}"
[ -d "$PLUGIN_DIR" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
python3 "$PLUGIN_DIR/skills/nav-graph/functions/correction_to_memory.py" \
--action sync \
--profile-path .agent/.user-profile.json \
--graph-path .agent/knowledge/graph.json
Markers reference graph state:
## Graph State
- Memories surfaced: mem-001, mem-003
- Concepts active: auth, testing
The navigator-research agent emits a structured research_findings JSON block alongside its markdown summary. After the agent returns, ingest those findings as graph memories via research_to_graph.py:
PLUGIN_DIR="${CLAUDE_PLUGIN_DIR:-$HOME/.claude/plugins/cache/navigator-marketplace/navigator}"
[ -d "$PLUGIN_DIR" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
# Save the JSON block from the agent output to a file (or pipe via stdin)
python3 "$PLUGIN_DIR/skills/nav-graph/functions/research_to_graph.py" findings.json
# Or from stdin
cat findings.json | python3 "$PLUGIN_DIR/skills/nav-graph/functions/research_to_graph.py" -
# Validate without writing
python3 "$PLUGIN_DIR/skills/nav-graph/functions/research_to_graph.py" findings.json --dry-run
Trigger phrases:
Defaults:
0.7 (lower than corrections/explicit captures — research is inference)pattern, pitfall, decision, learningsrc/auth.ts:42) is embedded into the memory summarySchema: see the Output Format section of agents/navigator-research.md for the full JSON shape the agent emits.
In .agent/.nav-config.json:
{
"knowledge_graph": {
"enabled": true,
"auto_capture_corrections": true,
"auto_capture_decisions": true,
"auto_surface_relevant": true,
"max_session_memories": 5,
"confidence_decay_rate": 0.01,
"staleness_threshold_days": 90,
"git_tracked": true
}
}
Note: confidence_decay_rate and staleness_threshold_days are consumed
only by the manual graph_maintenance commands (--action decay /
--action stale). They are not applied automatically on session start —
decaying a git-tracked file every session would create constant churn. Run
decay/staleness manually when curating the graph.
PLUGIN_DIR="${CLAUDE_PLUGIN_DIR:-$HOME/.claude/plugins/cache/navigator-marketplace/navigator}"
[ -d "$PLUGIN_DIR" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
python3 "$PLUGIN_DIR/skills/nav-graph/functions/graph_maintenance.py" --action health
Output:
Knowledge Graph Health Check
========================================
Total Nodes: 133
Total Edges: 706
Memories: 37 (37 high confidence)
Tasks: 38
Concepts: 16
Orphan Nodes: 0
Duplicate Edges: 0
Dangling Edges: 0
Confidence Out-of-Range: 0
Health Score: 100/100
No integrity issues detected!
Advisory (not scored):
- 8 potential memory conflicts (heuristic, advisory)
- 3 stale memories (not validated in 90+ days)
Duplicate Edges, Dangling Edges, and Confidence Out-of-Range are the
integrity gate — all three should read 0 on a healthy graph. If they don't,
run --action repair (below).
Idempotently dedupe (from, to, type) edge rows, drop edges that reference a
missing node id, and normalize out-of-range memory confidences (a value like
90.0 is treated as 90% → 0.9). Safe to re-run:
PLUGIN_DIR="${CLAUDE_PLUGIN_DIR:-$HOME/.claude/plugins/cache/navigator-marketplace/navigator}"
[ -d "$PLUGIN_DIR" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
python3 "$PLUGIN_DIR/skills/nav-graph/functions/graph_maintenance.py" --action repair
Find memories that may contradict each other. Advisory only — a high-false-positive keyword heuristic that does not affect the health score:
PLUGIN_DIR="${CLAUDE_PLUGIN_DIR:-$HOME/.claude/plugins/cache/navigator-marketplace/navigator}"
[ -d "$PLUGIN_DIR" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
python3 "$PLUGIN_DIR/skills/nav-graph/functions/graph_maintenance.py" --action conflicts
Find memories not validated in 90+ days:
PLUGIN_DIR="${CLAUDE_PLUGIN_DIR:-$HOME/.claude/plugins/cache/navigator-marketplace/navigator}"
[ -d "$PLUGIN_DIR" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
python3 "$PLUGIN_DIR/skills/nav-graph/functions/graph_maintenance.py" --action stale --stale-days 90
Find and optionally remove low-confidence memories:
PLUGIN_DIR="${CLAUDE_PLUGIN_DIR:-$HOME/.claude/plugins/cache/navigator-marketplace/navigator}"
[ -d "$PLUGIN_DIR" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
# Preview what would be removed
python3 "$PLUGIN_DIR/skills/nav-graph/functions/graph_maintenance.py" --action prune --threshold 0.3 --dry-run
# Actually remove (use with caution)
python3 "$PLUGIN_DIR/skills/nav-graph/functions/graph_maintenance.py" --action prune --threshold 0.3 --execute
Reduce confidence based on time since each memory's last decay. Idempotent —
running it twice on the same day is a no-op (each memory tracks last_decayed).
The rate defaults to knowledge_graph.confidence_decay_rate when --decay-rate
is omitted. This is not wired to any hook; run it manually when curating:
PLUGIN_DIR="${CLAUDE_PLUGIN_DIR:-$HOME/.claude/plugins/cache/navigator-marketplace/navigator}"
[ -d "$PLUGIN_DIR" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
python3 "$PLUGIN_DIR/skills/nav-graph/functions/graph_maintenance.py" --action decay
| Component | Tokens | When | |-----------|--------|------| | graph.json (50 nodes) | ~1000 | On query | | graph.json (200 nodes) | ~2000 | On query | | Memory summaries (5) | ~500 | On session start | | Full memory detail | ~500 each | On request |
Session overhead: ~1.3k tokens
Graph skill succeeds when:
Good queries:
Good memory capture:
Avoid:
This skill transforms Navigator from stateless assistant to knowledge-aware team member
tools
Sync project CLAUDE.md to the installed Navigator version, preserving customizations. Use when user says "sync CLAUDE.md", "update CLAUDE.md", or when detecting outdated Navigator configuration.
tools
Automates design review, token extraction, component mapping, and implementation planning. Reduces design handoff from 6-10 hours to 5 minutes via direct Figma MCP integration. Auto-invoke when user mentions design review, Figma mockup, or design handoff.
tools
Automates Navigator plugin updates. Detects current version, updates plugin, verifies installation, updates project CLAUDE.md, and validates new features. Auto-invoke when user mentions upgrading Navigator or getting new features.
documentation
Manage Navigator task documentation - create implementation plans, archive completed tasks, update task index. Use when user starts new feature, completes work, or says "document this feature".