knowledge_graph_skill
Skill for searching and evolving the SQLite-backed Knowledge Graph.
Skill by NPC-Worldwide
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/npc-worldwide-knowledge-graph-skill
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, ml, writing, knowledge-base, agent-memory
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/knowledge-graph-skill
What's inside
- Skill name
knowledge_graph_skill- Description
- Skill for searching and evolving the SQLite-backed Knowledge Graph. Use this when you need structured fact/concept/link search across one or more teams, NPCs, or directory scopes. The Knowledge Graph (KG) is stored in the application's database (not YAML). It is scoped by (team_name, npc_name, directory_path). Facts and concepts carry generation numbers and origin tags. Search methods (choose the right one): 1. Keyword search — fast substring match over fact statements. `kg_search_facts(engine_or_kg, "keyword")` → List[str] 2. Embedding search — semantic cosine similarity via vector embeddings. `kg_embedding_search(engine_or_kg, query="...", embedding_model="nomic-embed-text", embedding_provider="ollama", similarity_threshold=0.6, max_results=20)` → List[dict] with 'content', 'type', 'score' 3. Link search — graph traversal (BFS/DFS) starting from keyword-matched seeds. `kg_link_search(engine_or_kg, query="...", max_depth=2, breadth_per_step=5, strategy="bfs", max_results=20)` → List[dict] with 'content', 'type', 'depth', 'path', 'score' 4. Hybrid search — combines keyword + embedding + link, boosting results found by multiple methods. `kg_hybrid_search(engine_or_kg, query="...", mode="all", max_depth=2, similarity_threshold=0.6, max_results=20)` → List[dict] with 'content', 'type', 'score', 'source' Graph evolution (use sparingly, usually in background): - `kg_initial(content, model, provider)` — build a new KG from text - `kg_evolve_incremental(existing_kg, new_content_text, ...)` — add content - `kg_sleep_process(existing_kg, model, provider)` — prune/deepen/consolidate - `kg_dream_process(existing_kg, model, provider, num_seeds)` — speculative synthesis When a user asks a question that spans facts, concepts, and their relationships, prefer hybrid search. For pure semantic similarity without graph structure, use embedding search. For exploring connected neighborhoods, use link search with BFS.
- License
- MIT
- Instructions
- 51 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Agent Skills spec issues
- name: only lowercase letters, digits and single hyphens allowed
- description: longer than 1024 characters
Files (2)
- SKILL.md
- instruct.py
SKILL.md (first lines)
# knowledge_graph_skill
Skill for searching and evolving the SQLite-backed Knowledge Graph. Use this when you need structured fact/concept/link search across one or more teams, NPCs, or directory scopes.
The Knowledge Graph (KG) is stored in the application's database (not YAML). It is scoped by (team_name, npc_name, directory_path). Facts and concepts carry generation numbers and origin tags.
Search methods (choose the right one):
1. Keyword search — fast substring match over fact statements.
`kg_search_facts(engine_or_kg, "keyword")` → List[str]
2. Embedding search — semantic cosine similarity via vector embeddings.
`kg_embedding_search(engine_or_kg, query="...", embedding_model="nomic-embed-text",
embedding_provider="ollama", similarity_threshold=0.6, max_results=20)`
→ List[dict] with 'content', 'type', 'score'
3. Link search — graph traversal (BFS/DFS) starting from keyword-matched seeds.
`kg_link_search(engine_or_kg, query="...", max_depth=2, breadth_per_step=5,
strategy="bfs", max_results=20)`
→ List[dict] with 'content', 'type', 'depth', 'path', 'score'
4. Hybrid search — combines keyword + embedding + link, boosting results
found by multiple methods.
`kg_hybrid_search(engine_or_kg, query="...", mode="all", max_depth=2,
similarity_threshold=0.6, max_results=20)`
→ List[dict] with 'content', 'type', 'score', 'source'
Graph evolution (use sparingly, usually in background): - `kg_initial(content, model, provider)` — build a new KG from text - `kg_evolve_incremental(existing_kg, new_content_text, ...)` — add content - `kg_sleep_process(existing_kg, model, provider)` — prune/deepen/consolidate - `kg_dream_process(existing_kg, model, provider, num_seeds)` — speculative synthesis
When a user asks a question that spans facts, concepts, and their relationships, prefer hybrid search. For pure semantic similarity without graph structure, use embedding search. For exploring connected neighborhoods, use link search with BFS.
## Inputs
- `name` (default: `'search_method'`)
- `description` (default: `'keyword | embedding | link | hybrid'`)
- `name` (default: `'query'`)
- `description` (default: `"The user's query or topic to search"`)
- `name` (default: `'scope_team'`)
- `description` (default: `'Team name to scope the search (optional)'`)
- `name` (default: `'scope_npc'`)
- `description` (default: `'NPC name to scope the search (optional)'`)
- `name` (default: `'scope_directory'`)
- `description` (default: `'Directory path to scope the search (optional)'`)
## Steps
- `instruct` → [`instruct.py`](./instruct.py)
## Usage
```
/run_jinx jinx_ref=knowledge_graph_skill input_values={"name": "scope_directory", "description": "Directory path to scope the search (optional)"}
```From NPC-Worldwide/npcpy, MIT.
More from NPC-Worldwide/npcpy
- 0.823score
natural
NPC-Worldwide
Render the provided prompt template with Jinja context and send it to the active NPC's LLM.
SkillAFreshness: A★ 1.5KClaude Code +9 - 0.822score
run_jinx
NPC-Worldwide
Execute a jinx by name (already loaded on the team) or by filesystem path (e.g.
SkillAFreshness: A★ 1.5KClaude Code +9 - 0.822score
create_jinx
NPC-Worldwide
Write a new .jinx file from inputs (name, description, inputs spec as JSON list of strings, python body).
SkillAFreshness: A★ 1.5KClaude Code +9 - 0.817score
knowledge_store_skill
NPC-Worldwide
Skill for working with local .knowledge.yaml files via KnowledgeStore.
SkillAFreshness: A★ 1.5KClaude Code +9 - 0.817score
knowledge_sememolution_skill
NPC-Worldwide
Skill for population-based Knowledge Graph evolution via Sememolution.
SkillAFreshness: A★ 1.5KClaude Code +9 - 0.812score
knowledge_index_skill
NPC-Worldwide
Skill for using the KnowledgeIndex registry to discover which directories contain `.knowledge.yaml` files without walking the filesystem.
SkillAFreshness: A★ 1.5KClaude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 1,519
- Forks
- 130
- Open issues
- 6
- Last commit (this folder)
- Jun 20, 2026 (4 months ago)
- Last release
- Oct 12, 2026 (15 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/NPC-Worldwide/npcpy
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from NPC-Worldwide
- 0.823score
natural
NPC-Worldwide
Render the provided prompt template with Jinja context and send it to the active NPC's LLM.
SkillAFreshness: A★ 1.5KClaude Code +9 - 0.822score
create_jinx
NPC-Worldwide
Write a new .jinx file from inputs (name, description, inputs spec as JSON list of strings, python body).
SkillAFreshness: A★ 1.5KClaude Code +9 - 0.822score
run_jinx
NPC-Worldwide
Execute a jinx by name (already loaded on the team) or by filesystem path (e.g.
SkillAFreshness: A★ 1.5KClaude Code +9 - 0.817score
knowledge_store_skill
NPC-Worldwide
Skill for working with local .knowledge.yaml files via KnowledgeStore.
SkillAFreshness: A★ 1.5KClaude Code +9 - 0.817score
knowledge_sememolution_skill
NPC-Worldwide
Skill for population-based Knowledge Graph evolution via Sememolution.
SkillAFreshness: A★ 1.5KClaude Code +9 - 0.812score
knowledge_index_skill
NPC-Worldwide
Skill for using the KnowledgeIndex registry to discover which directories contain `.knowledge.yaml` files without walking the filesystem.
SkillAFreshness: A★ 1.5KClaude Code +9
Cite this page
knowledge_graph_skill. Agent Mart. https://agentmart.dev/skills/npc-worldwide-knowledge-graph-skill (last updated 2026-10-24)