Cortexdb
liliang-cn/cortexdb
Use CortexDB for local-first AI memory, vector search, RAG, knowledge graphs, SPARQL/RDFS/SHACL, corpus-to-graph workflows, and MCP/tool calling.
Set up and maintain a lightweight, file-based knowledge graph of the repo — entities, typed relations, decisions, gotchas — so agents load context fast instead of re-exploring the codebase every…
$ npx skills add gnomeria/usbtree --skill knowledge-graph -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install gnomeria/usbtree knowledge-graph --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/gnomeria/usbtree.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/knowledge-graph .claude/skills/knowledge-graph && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "knowledge-graph" agent skill from https://github.com/gnomeria/usbtree/tree/main/.agents/skills/knowledge-graph into .claude/skills/knowledge-graph/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "knowledge-graph", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/gnomeria/usbtree/tree/main/.agents/skills/knowledge-graphType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add gnomeria/usbtree --skill knowledge-graph -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install gnomeria/usbtree knowledge-graph --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/gnomeria/usbtree.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/knowledge-graph .agents/skills/knowledge-graph && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "knowledge-graph" agent skill from https://github.com/gnomeria/usbtree/tree/main/.agents/skills/knowledge-graph into .agents/skills/knowledge-graph/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "knowledge-graph", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add gnomeria/usbtree --skill knowledge-graph -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install gnomeria/usbtree knowledge-graph --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/gnomeria/usbtree.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/knowledge-graph .cursor/skills/knowledge-graph && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "knowledge-graph" agent skill from https://github.com/gnomeria/usbtree/tree/main/.agents/skills/knowledge-graph into .cursor/skills/knowledge-graph/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "knowledge-graph", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/gnomeria/usbtree.git --path .agents/skills/knowledge-graph--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add gnomeria/usbtree --skill knowledge-graph -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install gnomeria/usbtree knowledge-graph --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/gnomeria/usbtree.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/knowledge-graph .gemini/skills/knowledge-graph && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "knowledge-graph" agent skill from https://github.com/gnomeria/usbtree/tree/main/.agents/skills/knowledge-graph into .gemini/skills/knowledge-graph/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "knowledge-graph", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install gnomeria/usbtree knowledge-graphInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add gnomeria/usbtree --skill knowledge-graph -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/gnomeria/usbtree.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/knowledge-graph .github/skills/knowledge-graph && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "knowledge-graph" agent skill from https://github.com/gnomeria/usbtree/tree/main/.agents/skills/knowledge-graph into .github/skills/knowledge-graph/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "knowledge-graph", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add gnomeria/usbtree --skill knowledge-graph -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install gnomeria/usbtree knowledge-graph --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/gnomeria/usbtree.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/knowledge-graph .opencode/skills/knowledge-graph && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "knowledge-graph" agent skill from https://github.com/gnomeria/usbtree/tree/main/.agents/skills/knowledge-graph into .opencode/skills/knowledge-graph/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "knowledge-graph", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
knowledge-graphSet up and maintain a lightweight, file-based knowledge graph of the repo — entities, typed relations, decisions, gotchas — so agents load context fast instead of re-exploring the codebase every…
Knowledge Graph is an agent skill from gnomeria/usbtree. Set up and maintain a lightweight, file-based knowledge graph of the repo — entities, typed relations, decisions, gotchas — so agents load context fast instead of re-exploring the codebase every session. Use when the user says "knowledge graph", "remember this", "codebase memory", "the agent keeps re-discovering things", or a .knowledge/ directory exists in the repo.
Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts and reference files (for example `references/formats.md`, `references/session-memory.md` and `scripts/kg.sh`).
It sits in Knowledge Management, covering Knowledge graphs. It works with SQLite. The repository describes itself as: Live USB device tree in your terminal. Rust TUI, no root, no libusb. Full activity metrics on Linux; device tree on macOS/Windows. The licence is MIT.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 8ba6a5e. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/ (Shell), which the agent can run.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Knowledge Graph loads about 1.5k tokens when it runs, and up to ~4.4k if it reads all its reference files. Until then it costs about 97 tokens; SKILL.md has 786 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from gnomeria/usbtree at commit 8ba6a5e, republished under its MIT licence (© gnomeria). 786 words, ~1,534 tokens.
.claude/skills/knowledge-graph/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.Agents forget everything between sessions and re-derive the architecture by reading code — slow, token-hungry, and lossy for things code can't say (why a decision was made, which subsystem bites). The fix is a small, committed knowledge graph the agent reads first and updates as it works. Plain files by default: greppable by any agent, reviewable in PRs, no dependencies. A database only when scale genuinely demands it.
CLAUDE.md / AGENTS.md with architecture notes. If the repo's durable knowledge fits in ~100 lines, stop here; a graph would be ceremony..knowledge/ with one markdown file per entity and typed relation lines. Right for most real projects. Everything below describes this tier; exact format in references/formats.md.sqlite3 file. Escalate only past ~200 entities or when you need real traversal (transitive impact, shortest path). Schema + recursive-CTE queries and a file→SQLite migration in references/formats.md..knowledge/
README.md # 5 lines: what this is, how to query, the update rule
entities/<id>.md # id = <type>-<name>: service-orders, decision-auth-jwt, gotcha-sqlite-walEntity types that earn their keep: service/module (code units), store (DBs, queues), decision (what + why + alternatives rejected), gotcha (traps that cost someone an hour), flow (cross-module paths: "checkout touches these five things"). Skip entities for things one ls reveals.
Each entity: frontmatter (id, type, anchors: — real file paths it describes), 3–8 lines of prose an agent can't get faster from the code, and typed relation lines (- depends_on: service-users). Relations are the payoff — backlinks service-users answers "what breaks if I change users?" without reading a line of code.
scripts/kg.sh bundles the common queries: list, show <id>, links <id> (outgoing), backlinks <id> (who points here — reverse edges are the high-value query), stale (anchors pointing at deleted files), orphans (unlinked entities), anchored <path> (entities whose anchors cover a file — the read-protocol query), new <type> <name>. No script available? Plain grep does everything: grep -l 'depends_on: service-users' .knowledge/entities/*.md.
A stale graph is worse than none — the agent trusts it and acts on lies. Two rules, stated in .knowledge/README.md so every agent sees them:
Read protocol (session start / task start). Before exploring code for a task, run kg.sh anchored <path> for the files in scope; read the hits and their 1-hop neighbors first. Then explore only what the graph doesn't cover.
Write protocol (same commit as the code).
decision-* entity — what, why, what was rejected.gotcha-*. That's the highest-ROI entity type.kg.sh stale in CI or pre-commit so renames/deletions can't silently rot anchors.Keep it small: prune entities whose knowledge became obvious from the code; a 40-entity graph that's true beats a 400-entity graph nobody trusts.
The .knowledge/ graph is semantic memory — deliberate, reviewed, committed. Its complement is episodic memory: observations captured automatically from sessions (what was tried, decided, discovered), stored locally and gitignored, with the good parts promoted into the graph instead of rotting in a log. When a repo needs that layer — "the agent keeps re-learning what it did last week" — see references/session-memory.md: the capture/consolidate/retrieve pipeline distilled from mem0, claude-mem, and Letta, plus a single-binary Go blueprint (SQLite + FTS5, lifecycle hooks, progressive-disclosure retrieval, promote bridging into .knowledge/). No Python, no servers, works with any agent.
orchestrate skill: the planner reads the graph during analysis and points each task brief at the relevant entity files; worker Discovered notes in results reports get merged into the graph during integration — parallel work becomes a knowledge harvest.debug skill: a confirmed root cause that was expensive to find is a gotcha-* entity..knowledge/README.md first" in their brief or agents file..knowledge/README.md (query + update rules, 5 lines) and entities/.kg.sh into the repo (scripts/ or keep calling it from the installed skill) and wire kg.sh stale into CI.CLAUDE.md/AGENTS.md: "Read .knowledge/README.md before exploring; follow its update rule."Formats, relation vocabulary, SQLite schema and migration: references/formats.md. Episodic session memory (auto-capture, hooks, Go blueprint): references/session-memory.md.
© gnomeria, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 3 other files (scripts, references) in .agents/skills/knowledge-graph of gnomeria/usbtree.
Open the folder on GitHubat commit 8ba6a5e
Knowledge Graph next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Knowledge Graph this skillgnomeria/usbtree | 688 | — | ~1.5k | Automated safety check: Pass | MIT | |
| Cortexdbliliang-cn/cortexdb | 273 | — | ~5.7k | Automated safety check: Warn | MIT | |
| Graph Buildathola/claude-night-market | 342 | — | ~609 | Automated safety check: Pass | MIT | |
| Cortexdb Memory Hermesliliang-cn/cortexdb | 273 | — | ~1.7k | Automated safety check: Pass | MIT | |
| Cortexdb Memory Openclawliliang-cn/cortexdb | 273 | — | ~1.6k | Automated safety check: Pass | MIT | |
| Cortexdbliliang-cn/cortexdb | 273 | — | ~18k | Automated safety check: Warn | MIT |
liliang-cn/cortexdb
Use CortexDB for local-first AI memory, vector search, RAG, knowledge graphs, SPARQL/RDFS/SHACL, corpus-to-graph workflows, and MCP/tool calling.
athola/claude-night-market
Builds or updates the code knowledge graph via tree-sitter AST and SQLite.
liliang-cn/cortexdb
Give a Python agent (such as Hermes Agent by Nous Research) durable, local-first memory plus a queryable SPARQL knowledge graph, backed by CortexDB through its gRPC sidecar and the cortexdb-client…
liliang-cn/cortexdb
Give a Node.js agent (such as OpenClaw) durable, local-first memory plus a queryable SPARQL knowledge graph, backed by CortexDB through its gRPC sidecar and the cortexdb-client npm package.
liliang-cn/cortexdb
Use CortexDB for local-first AI memory, vector search, RAG, knowledge graphs, SPARQL/RDFS/SHACL, corpus-to-graph workflows, external structured-data import (CSV / SQL dumps), and MCP/tool calling.
Egonex-AI/Understand-Anything
Detects a Karpathy-pattern LLM wiki and builds an interactive knowledge graph with entities, implicit relationships and topic clusters.
gnomeria/usbtree
GitHub Actions CI pipeline conventions — job shape, caching, permissions, and action pinning.
gnomeria/usbtree
Systematic root-cause debugging — reproduce, isolate, fix at the source, prove the fix.
gnomeria/usbtree
Behavior-preserving restructuring done safely — test net first, small verified steps, no mixed-in feature changes.
gnomeria/usbtree
Author tests that match the repo's stack and existing test style, at the cheapest level that catches the regression.
Works with
Categories
Set up and maintain a lightweight, file-based knowledge graph of the repo — entities, typed relations, decisions, gotchas — so agents load context fast instead of re-exploring the codebase every…. Knowledge Graph is an agent skill from gnomeria/usbtree. Set up and maintain a lightweight, file-based knowledge graph of the repo — entities, typed relations, decisions, gotchas — so agents load context fast instead of re-exploring the codebase every session.
Knowledge Graph fits situations like: the user says knowledge graph; codebase memory; the agent keeps re-discovering things; A .knowledge/ directory exists in the repo.
Run `npx skills add gnomeria/usbtree --skill knowledge-graph -a claude-code`. Or copy the skill folder (.agents/skills/knowledge-graph in gnomeria/usbtree) into .claude/skills/knowledge-graph in your project. Claude Code loads it when a task matches its description.
Run `npx skills add gnomeria/usbtree --skill knowledge-graph -a codex`. Or copy the skill folder (.agents/skills/knowledge-graph in gnomeria/usbtree) into .agents/skills/knowledge-graph in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add gnomeria/usbtree --skill knowledge-graph -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/knowledge-graph, .gemini/skills/knowledge-graph, .github/skills/knowledge-graph and .opencode/skills/knowledge-graph in your project.
Going by SKILL.md and its folder, Knowledge Graph needs a shell for the scripts in its folder. Our summary lists: A Bash shell.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Knowledge Graph is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.9k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Knowledge Graph: Cortexdb (liliang-cn/cortexdb, 273 stars), Graph Build (athola/claude-night-market, 342 stars), Cortexdb Memory Hermes (liliang-cn/cortexdb, 273 stars) and Cortexdb Memory Openclaw (liliang-cn/cortexdb, 273 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
gnomeria (a GitHub user) maintains it in gnomeria/usbtree, which has 688 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on August 20, 2026.
Source: gnomeria/usbtree on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.