knowledge_index_skill

knowledge_index_skill is a skill for Claude Code, Codex from NPC-Worldwide/npcpy. It costs 272 tokens per session (766 once invoked), scanned A, original, MIT.

A skill for using KnowledgeIndex, a small SQLite registry that tracks directories containing .knowledge.yaml files and their metadata.

In plain words
What is it for?
Use it to scan or refresh a project tree, list known knowledge directories, remove stale entries, and locate directories for loading their stored knowledge.
Why use it?
It finds relevant knowledge directories without scanning the entire filesystem, while making clear that the registry is only a cache.

Skill for Claude CodeCodex

About the project

npcpy is a Python library for building applications with multimodal language models, agent-based AI, and knowledge graphs. Researchers and developers use it with local or cloud model providers to create agents, multi-agent teams, and AI workflows.

NPC-Worldwide/npcpy · 1,497 stars · on GitHub

Install

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.

agentmods
npx agentmods add skills/npc-worldwide/npcpy/knowledge_index_skill
Any agent
npx skills add NPC-Worldwide/npcpy --skill knowledge_index_skill
Clone the repo
git clone --depth 1 https://github.com/NPC-Worldwide/npcpy

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for knowledge_index_skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/npc-worldwide/npcpy/knowledge_index_skill.svg)](https://agentmods.dev/skills/npc-worldwide/npcpy/knowledge_index_skill)
Your own site
<a href="https://agentmods.dev/skills/npc-worldwide/npcpy/knowledge_index_skill"><img src="https://agentmods.dev/badge/skills/npc-worldwide/npcpy/knowledge_index_skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 272 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 766 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5 $0.00272 $0.00766
Opus 5 $0.00136 $0.00383
Sonnet 5 $0.00054 $0.00153
Haiku 4.5 $0.00027 $0.00077

Measured 5d ago against content hash a05b917f6ab6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

knowledge_index_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 5d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (instruct.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/knowledge_index_skill/SKILL.md · 54 lines

What it actually says

knowledge_index_skill

Skill for using the KnowledgeIndex registry to discover which directories contain .knowledge.yaml files without walking the filesystem. KnowledgeIndex is a lightweight SQLite cache. It maps directory paths to file metadata (mtime, memory_count, link_count). The database path is caller-provided — npcpy does not hardcode a default. Key operations: - Upsert a directory after writing to its YAML: upsert_directory(db_path, directory, memory_count, link_count)

  • List known directories: get_known_directories(db_path, min_mtime=None) - Full rescan of a tree: scan_root(db_path, root, max_depth=5) - Remove a stale directory: remove_directory(db_path, directory) Typical flow: 1. Call scan_root(db_path, root="/home/user/projects", max_depth=5) to populate the index with every .knowledge.yaml found.
  1. Query get_known_directories(db_path) to get a list of directories with memory/link counts.
  2. For each directory of interest, instantiate KnowledgeStore(directory) and call load() or build_context().

The index is a cache, not the source of truth. If a .knowledge.yaml is deleted or modified outside the app, re-run scan_root to refresh.

Inputs

  • name (default: 'action')
  • description (default: 'scan | list | upsert | remove')
  • name (default: 'db_path')
  • description (default: 'Path to the knowledge index SQLite file')
  • name (default: 'root_or_directory')
  • description (default: 'Root to scan or specific directory to upsert/remove')

Steps

Usage

/run_jinx jinx_ref=knowledge_index_skill input_values={"name": "root_or_directory", "description": "Root to scan or specific directory to upsert/remove"}
Files

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.

Changes

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.

  1. 5d ago First seen · 54 lines · 272 tokens per session scan A a05b917f6ab6

Subscribe to this mod's changes

knowledge_index_skill is a skill published in the GitHub repository NPC-Worldwide/npcpy (1,497 stars, last pushed yesterday), licensed MIT. It adds 272 tokens to every session and 766 once invoked, about $0.0014 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.

Related

Other skills, from other repositories

langchain-orchestration

Comprehensive guide for building production-grade LLM applications using LangChain's chains, agents, memory systems, RAG patterns, and advanced orchestration.

manutej/luxor-claude-marketplace · 35 tokens

final-release-review

Perform pre-release planning or a final release-candidate review for openai-agents-python by comparing the target with the previous remote tag, determining the minimum compatible release type, auditing regressions and contract changes, reviewing open documentation PR coverage, drafting minor-release Key Changes, and…

openai/openai-agents-python · 64 tokens

release-candidate-prep

Preflight and prepare an OpenAI Agents Python release candidate in a dedicated worktree from exact origin/main, gate readiness before branch creation, freeze the released API contract, create or replace the local release branch with one release commit, enforce final release review as a checker, and produce…

openai/openai-agents-python · 87 tokens

implementation-strategy

Choose compatibility-aware scope for runtime and API changes in openai-agents-python. Use before initial implementation and each review-feedback batch to decide whether to patch, reset the design, preserve compatibility, or reject unsupported cases.

openai/openai-agents-python · 47 tokens

memory-triage

Persistent long-term memory protocol powered by mem0. Evaluate conversations for durable facts worth storing via memoryadd. Handles identity, preferences, decisions, configurations, rules, projects, and relationships. Loaded by the openclaw-mem0 plugin when skills mode is active.

mem0ai/mem0 · 58 tokens

pr-draft-summary

Create the required PR-ready summary block, branch suggestion, title, and draft description for openai-agents-python. Use before the final response whenever the current task changed runtime code, tests, examples, build/test configuration, or docs with behavior impact, regardless of perceived change size and including…

openai/openai-agents-python · 114 tokens