knowledge-graph
Skill2 starsChanged 51 days agoMITView on GitHub
Query the fleet knowledge graph before grep for cross-repo questions (what depends on X, where is Y enforced, what did the dependency graph look like on date D, what has any agent learned about Z). Covers the kg_* MCP tool surface, kg_context as the default entry point, point-in-time queries, publishing agent-fact episodes, and the revkg CLI equivalents. GAP-349.
23 other projects use a version of this.
Adopted by
Most recently taken up by
- ddehart/claude-code-pluginstheir own version, first seen Nov 8, 2026
- AsiaOstrich/EngramGraphtheir own version, first seen Nov 8, 2026
- debjan/knowledge-graphtheir own version, first seen Nov 6, 2026
- nikhilw/structured-agentic-workflowtheir own version, first seen Nov 6, 2026
- digitalgym/aipathway-standardstheir own version, first seen Nov 4, 2026
- Happy-Technologies-LLC/happy-platform-skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use metrics, push and 4 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
GoogleSkillmetrics
Expertise in analyzing time-series repository health metrics, investigating root causes, and proposing proactive workflow improvements.
Also in 3 projects that use this
OpenAISkillpush
Also in 3 projects that use this
MicrosoftSkillretrospective
Review how work went and improve the next round. USE WHEN asked for a retro, delays, or process lessons. DO NOT USE for code review or transcript replay.
Also in 3 projects that use this
VercelSkilldeploy
Deploy applications to Vercel. Use when the user says "deploy", "deploy to Vercel", "push to production", "deploy my app", or "go live".
Also in 3 projects that use this
varun29ankuSSkillorchestrate
This skill should be used when the user asks to 'orchestrate a task', 'break down work into parallel agents', 'coordinate subtasks', 'run agents in parallel', or mentions 'multi-agent'. Decomposes complex tasks into tracked subtasks, dispatches parallel subagents, and coordinates until completion.
Also in 3 projects that use this
nicolasestremSkillbrainstorm
Structured idea generation and solution exploration with systematic analysis.
Also in 3 projects that use this
Other versions23 projects use a version of this.
Word for word · 1
- revealui-studio/revskills★ 2100% same
Edited · 0
None found.
Wrote their own version · 22
- llopresto87/Cypress★ 119same name
- AsiaOstrich/universal-dev-standards★ 84same name
- Happy-Technologies-LLC/happy-platform-skills★ 41same name
- iagocavalcante/claude-turbo-search★ 16same name
- iuiaoin/agent-skills★ 16same name
- ariaxhan/kernel-claude★ 15same name
- Alexander-Tyagunov/magician★ 14same name
- nikhilw/structured-agentic-workflow★ 7same name
- cirwel/unitares★ 6same name
- urmzd/saige★ 6same name
12 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository29 other files it gives its agents.
- skills/revealui-design/CLAUDE.mdCLAUDE.md
- drizzle-dbSkill
- electric-syncSkill
- exhaustive-auditSkill
- grok-bot-checkpointSkill
- mcp-serverSkill
- multi-agent-memorySkill
- next-best-practicesSkill
- redundancy-scanSkill
- revealui-checkpointSkill
- revealui-cleanupSkill
- coordinateSkill
- revealui-designSkill
- revealui-design-statusSkill
- revealui-doctorSkill
- revealui-opsSkill
- revealui-pickupSkill
- revealui-recoverSkill
- revealui-rollupSkill
- revealui-skills-testSkill
- revealui-snapshotSkill
- revealui-sync-ltsSkill
- revealui-sync-rulesSkill
- revealui-trackerSkill
- revvault-resolveSkill
- security-hardeningSkill
- tailwind-v4Skill
- vitest-testingSkill
- yjs-collaborationSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 4 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 18 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 84
Before starting nontrivial work on an unfamiliar file, package, or gap, pull its context first instead of grepping around blind:
- Very specific: line 111
Every read tool except kg_get_node accepts an optional at (ISO-8601 timestamp).
- Distinctive: line 139
Use it to durably record an end-of-session discovery instead of letting it die in a handoff doc.
- Very specific: line 189
Do not invent a session-named source to paper over it.
- Distinctive: line 194
Every product-mode JSON body is an envelope:
- Very specific: line 205
If a discovery contradicts an existing edge, still just call kg_add_episode with the corrected fact.
- Very specific: line 215
Every read-side MCP tool has a CLI counterpart for ad-hoc terminal use (connects to Neon via POSTGRES_URL/DATABASE_URL, same as any other …
- Distinctive: line 236
Read tools work with no pgvector extension and no embedding model running: the vector search channel is skipped whenever no query embedding …
“Common” is measured: kept by at least 6 in 10 of the 18 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Fleet Knowledge Graph
Relation to exhaustive audits
For multi-session line-level codebase audits, use the exhaustive-audit
skill first (path inventory + coverage ledger). The graph maps relationships
and history; it does not prove every file body was read. After inventory,
revkg scan / kg_context / kg_neighbors are the right tools for system
maps and blast-radius views.
When to query the graph
The fleet knowledge graph is a bi-temporal, content-addressed graph of every repo, package, file, exported symbol, dependency edge, db table, route, skill, rule, hook, gap, lane, ADR, and agent discovery in RevealFleet. It is searchable by hybrid retrieval (vector + full-text + graph traversal) and every fact carries provenance back to the episode that produced it.
Query-before-grep for cross-repo or "what depends on this" questions:
- "What consumes
coordination_eventsand what breaks if I rename it?" A traversal question.grepfinds string matches; the graph finds edges. - "Where is licensing enforced across the fleet?" A cross-repo hybrid search question. One query, not thirteen repo greps.
- "What did the dependency graph of
@revealui/ailook like on June 1?" A point-in-time questiongrepcannot answer at all. - "What has any agent ever learned about the Electric proxy?" A provenance question over agent-fact episodes.
Plain grep/Read still wins for single-file, single-repo, "show me this
exact function body" lookups. Reach for the graph when the question spans
repos, spans time, or asks about relationships rather than text.
The MCP tool surface
Seven tools, all under @revealui/mcp's kg-server factory
(createKnowledgeGraphServer), wrapping @revealui/knowledge-graph's
search and ingest APIs. Studio attaches them with stdio
revealui-mcp knowledge-graph. Hosted clients use the same names on
governed /api/mcp (no second MCP URL).
| Tool | Use for |
kg_context | Default entry point. Budgeted context assembly from an anchor node (see below). |
kg_search | Open-ended hybrid search (vector + FTS + BFS), returns nodes and facts with provenance. |
kg_get_node | Fetch one node plus its current facts by natural key. |
kg_neighbors | BFS neighbors of a node, current or point-in-time. |
kg_path | Shortest path between two nodes. |
kg_at_time | A node's facts as of a timestamp. |
kg_add_episode | The only write tool. Publish a durable episode (see below). |
Natural keys are the graph's stable node identifiers, e.g.
revealui/packages/ai/src/llm/client.ts#getClient for a symbol, or
npm:zod for an external dependency. kg_search finds a node's natural key
from a free-text query when you don't already know it.
Example calls (arguments shown as the tool's JSON input):
{ "tool": "kg_search", "arguments": { "query": "licensing enforcement", "limit": 10 } }{ "tool": "kg_get_node", "arguments": { "naturalKey": "revealui/packages/paywall/src/index.ts#requireFeature" } }{ "tool": "kg_neighbors", "arguments": { "naturalKey": "revealui/packages/db/src/schema/coordination.ts", "depth": 2 } }kg_context: the default entry point
Before starting nontrivial work on an unfamiliar file, package, or gap, pull its context first instead of grepping around blind:
{
"tool": "kg_context",
"arguments": {
"naturalKey": "revealui/packages/knowledge-graph/src/ingest/engine.ts",
"depth": 2,
"charBudget": 16000
}
}This runs a BFS from the anchor node, reranks by node-distance and
episode-mentions, and packs node summaries plus edge facts (each carrying
its provenance episode ids) into a text block capped at charBudget
characters (default 16000; characters, not tokens). In product mode the
packed string is data.context on the envelope (not the JSON root); the
same payload reports truncated, charsUsed, nodeCount, and
factCount so you know whether the packed block is the whole neighborhood
or a budgeted slice of it. Prefer this over kg_search when the question
is "what do I need to know before touching X." kg_search is for
open-ended queries where you don't yet have an anchor.
Point-in-time query recipes
Every read tool except kg_get_node accepts an optional at (ISO-8601
timestamp). Omit it for the current graph; pass it to see the graph as it
was at that moment. Edges are never deleted, only invalidated, so history
is queryable, not reconstructed.
Recipes:
- "What did X depend on before this refactor landed?"
kg_neighborswithnaturalKeyset to the package/file andatset to a timestamp just before the refactor's merge commit. - "What were the current facts about this node on a given date?"
kg_at_timewith that date. - "Did this edge exist yet when I started this session?"
kg_searchwithatset to the session start time, then check whether the fact appears inresult.facts.
A timestamp with no matching state simply returns fewer or no results.
There is no error for "too early," since validAt/invalidAt windows are
exact.
Publishing agent-fact episodes
kg_add_episode is the only write tool. It is always additive (never a
rescan) and Zod-validates episodeType, every node kind, and every edge
relation against the graph's ontology enums server-side: invalid values
are rejected before anything is written, and there is no path to raw SQL or
table names through this tool.
Use it to durably record an end-of-session discovery instead of letting it
die in a handoff doc. This extends the shared_facts flow from the
multi-agent-memory skill: a shared_facts row is session-scoped and
ephemeral, while a kg_add_episode call with episodeType: "agent-fact"
becomes a permanent, queryable graph fact with full provenance. Product
mode stamps source and actor DID from the session principal — do not
pass "source": "claude-session"; the client field is ignored. See
multi-agent-memory for the session order and the durable vs working vs session table.
Session start names this graph first and does not auto-query it. --memory on
session adapter is the opt-in read.
{
"tool": "kg_add_episode",
"arguments": {
"episodeType": "agent-fact",
"content": "the Electric proxy retries with exponential backoff on 5xx",
"classification": "workspace",
"nodes": [
{
"kind": "concept",
"name": "Electric proxy retry behavior",
"naturalKey": "concept:electric-proxy-retry-backoff"
}
],
"edges": [
{
"source": { "kind": "concept", "naturalKey": "concept:electric-proxy-retry-backoff" },
"target": { "kind": "file", "naturalKey": "revealui/apps/admin/src/lib/api/electric-proxy.ts" },
"relation": "documents",
"fact": "electric-proxy.ts retries with exponential backoff on 5xx"
}
]
}
}Explicit invocation only. Publishing an episode is a deliberate act at
the point a discovery is worth keeping. There is no hook that
auto-publishes on session end or on every tool call. Call kg_add_episode
yourself when you have something durable to say, the same way you would
decide to write a shared_facts row.
Launcher, identity, envelope
Studio stdio: revealui-mcp knowledge-graph. Set REVDEV_AGENT_ID so the
server can load the hook identity
(REVDEV_HOOK_IDENTITY_DIR, default
~/.local/share/revealui/hook-identities). Missing principal → envelope
unavailable / principal-missing, one WARN per process, then proceed.
Do not invent a session-named source to paper over it.
Hosted: same kg_* tools on /api/mcp with a device token. Tenant is the
caller's accountId, not studio-local.
Every product-mode JSON body is an envelope:
status | Meaning |
ok | available: true, enforcement, deniedCount, data |
denied | In-scope result set empty and deniedCount > 0. Not an empty success. |
unavailable | Graph down, timeout, or principal missing. Session continues. |
ok with empty lists and deniedCount: 0 means nothing exists. Treat
unavailable as a WARN, not a silent empty graph.
If a discovery contradicts an existing edge, still just call
kg_add_episode with the corrected fact. The ingest engine's entity
resolution and re-scan diffing are for the deterministic scan path
(revkg scan), not for episode ingestion, so a contradicting agent-fact
episode lands as new provenance alongside the old one rather than silently
overwriting it. Note the contradiction in your content field so a human
or a future Tier-2 LLM pass can reconcile it.
The revkg CLI equivalents
Every read-side MCP tool has a CLI counterpart for ad-hoc terminal use
(connects to Neon via POSTGRES_URL/DATABASE_URL, same as any other
fleet script):
revkg search "licensing enforcement" --limit 10
revkg node revealui/packages/paywall/src/index.ts#requireFeature
revkg neighbors revealui/packages/db/src/schema/coordination.ts --depth 2
revkg at revealui/packages/db/src/schema/coordination.ts 2026-06-01T00:00:00Z
revkg scan --repo revealui # single repo, deterministic Tier-1 extractors
revkg scan --fleet # every repo under the same parent directoryThere is no CLI write path equivalent to kg_add_episode: revkg scan
only ever runs the deterministic re-scan path (applyScan), never additive
episode ingestion. Publishing an agent-fact episode is an MCP-tool-only
(or direct ingestEpisode API) action by design, since it is inherently an
agent (or human) asserting something, not a scan discovering it.
Degradation behavior
Read tools work with no pgvector extension and no embedding model running:
the vector search channel is skipped whenever no query embedding is
available, falling back to full-text search plus BFS traversal. Don't
expect a kg_search failure just because Ollama is down. Expect slightly
lower recall on paraphrased queries, not an error.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

