docs/opencode/skills/exploring-knowledge-graph/SKILL.md
Guidance for deep knowledge graph traversal across memories, entities, and relationships. Use when needing comprehensive context before planning, investigating connections between concepts, or answering "what do you know about X" questions.
npx skillsauth add scottrbk/forgetful exploring-knowledge-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.
Forgetful stores knowledge as an interconnected graph: memories link to other memories, entities link to memories, and entities relate to each other. Deep exploration reveals context that simple queries miss.
Explore the knowledge graph when:
Track visited IDs to prevent cycles. Execute phases sequentially.
execute_forgetful_tool("query_memory", {
"query": "<topic>",
"query_context": "Exploring knowledge graph for comprehensive context",
"k": 5,
"include_links": true,
"max_links_per_primary": 5
})
Collect: primary_memories + linked_memories (1-hop connections).
For key memories, get full details:
execute_forgetful_tool("get_memory", {"memory_id": <id>})
Extract: document_ids, code_artifact_ids, project_ids, additional linked_memory_ids.
Find entities linked to discovered projects:
execute_forgetful_tool("list_entities", {
"project_ids": [<discovered project ids>]
})
You can also explicitly link entities to projects for organizational grouping:
execute_forgetful_tool("link_entity_to_project", {
"entity_id": <id>,
"project_id": <id>
})
For relevant entities, map relationship graph:
execute_forgetful_tool("get_entity_relationships", {
"entity_id": <id>,
"direction": "both"
})
Relationship types: works_for, owns, manages, collaborates_with, etc.
For each entity, find all linked memories:
execute_forgetful_tool("get_entity_memories", {
"entity_id": <id>
})
Returns {"memory_ids": [...], "count": N}. Fetch any new memories not already visited.
Group findings by type:
Memories: Primary (direct matches) -> Linked (1-hop) -> Entity-linked (via entities)
Entities: Name, type, relationship count, linked memory count
Artifacts: Documents and code snippets found via memory links
Graph Summary: Total nodes, key themes, suggested follow-up queries
Match depth to task complexity. Start shallow, go deeper if context insufficient.
truncated flag from query_memory (8000 token budget)project_ids filter to scope explorationtesting
Guidance for using Forgetful semantic memory effectively. Applies Zettelkasten atomic memory principles. Use when deciding whether to query or create memories, structuring memory content, or understanding memory importance scoring.
development
Guidance for maintaining memory quality through curation. Covers updating outdated memories, marking obsolete content, and linking related knowledge. Use when memories need modification, when new information supersedes old, or when building knowledge graph connections.
testing
Guidance for using Forgetful semantic memory effectively. Applies Zettelkasten atomic memory principles. Use when deciding whether to query or create memories, structuring memory content, or understanding memory importance scoring.
tools
Guidance for deep knowledge graph traversal across memories, entities, and relationships. Use when needing comprehensive context before planning, investigating connections between concepts, or answering "what do you know about X" questions.