Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/npc-worldwide/npcpy/knowledge_graph_skillnpx skills add NPC-Worldwide/npcpy --skill knowledge_graph_skillgit clone --depth 1 https://github.com/NPC-Worldwide/npcpyWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00474 | $0.01301 |
| Opus 5 | $0.00237 | $0.00651 |
| Sonnet 5 | $0.00095 | $0.00260 |
| Haiku 4.5 | $0.00047 | $0.00130 |
Grade A, and why
knowledge_graph_skill scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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):
-
Keyword search — fast substring match over fact statements.
kg_search_facts(engine_or_kg, "keyword")→ List[str] -
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' -
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' -
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
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 80 lines · 474 tokens per session scan A c7e4d0a292f7
knowledge_graph_skill is a skill published in the GitHub repository NPC-Worldwide/npcpy (1,494 stars, last pushed 7d ago), licensed MIT. It adds 474 tokens to every session and 1,301 once invoked, about $0.0024 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
cdc
Change Data Capture - architecture, entrypoints, bytecode emission, sync engine integration, tests.
differential-fuzzer
Information about the differential fuzzer tool, how to run it and use it catch bugs in Turso. Always load this skill when running this tool.
storage-format
SQLite file format, B-trees, pages, cells, overflow, freelist that is used in tursodb.
transaction-correctness
How WAL mechanics, checkpointing, concurrency rules, recovery work in tursodb.
bigquery-ai-ml
Skill for BigQuery AI and Machine Learning queries using standard SQL and AI. functions (preferred over dedicated tools).
migration-review
Review database migration files when a change adds or modifies paths under migrations/. Use it before merge to collect forward, rollback, locking, and data-safety evidence.