/cortexdb:cortexdb-resolve-entitiesfrom cortexdb
Merges duplicate or alias entities in a CortexDB knowledge graph into canonical nodes, scoring pairs by similarity and linking uncertain matches for review.
Ships in cortexdb. Installing the plugin adds it to Claude Code.
Clean up the knowledge graph by resolving duplicate entities — the same thing recorded under different names. Each candidate pair (case / spacing / punctuation variants like Cortex DB ↔ CortexDB, near spellings like Postgres ↔ PostgreSQL, and — when CORTEXDB_LLM_* is set — acronyms and synonyms like K8s ↔ Kubernetes) is scored on name similarity, shared neighbours and type agreement:
merged).possiblySame edge is written between the two, carrying the evidence and graded held, so contract_needs_attention lists it. Setting that edge's _grade to verified merges the pair on the next run; refused keeps them apart for good.--merge-all restores the old behaviour (merge every normalized-key group and every model group, no scoring). Run in a shell:
bin=$(ls -t ~/.claude/plugins/data/cortexdb-cortexdb/bin/cortexdb-mcp-* 2>/dev/null | head -1)
[ -n "$bin" ] || bin="${CORTEXDB_MCP_BIN:-cortexdb-mcp}"
"$bin" --resolve-entities --dry-run # preview the merges first
"$bin" --resolve-entities # apply them
Always preview with --dry-run first and show the user the proposed merges (canonical ← [aliases]) and links (a ~ b score …); apply only if they look right. Applying repoints edges to the canonical node, records the merged names as aliases on it, and dedupes edges — the pre-merge rows stay in history, but the merge is not automatically reversed, so a dry run is the safe default. Re-running is safe (already-merged names simply don't reappear, answered links are not reopened). Afterwards, walk the user through the possiblySame links from contract_needs_attention.
$ARGUMENTS
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
13 commands in this plugin
/cortexdb-export-memoryCortexdb Export MemoryExport all CortexDB memories to Markdown files (Claude Code memory-file layout)/cortexdb-facts-asofCortexdb Facts AsofShow CortexDB knowledge-graph facts valid at a point in time (as-of / bitemporal query)/cortexdb-global-searchCortexdb Global SearchAnswer a whole-corpus question over the CortexDB brain using GraphRAG global search/cortexdb-graphLive 3D (default)Open the brain's knowledge graph — a live 3D view, or a static file to send/cortexdb-graph-update1. ALWAYS preview first — see the proposed edits without touching the graphReconcile new text against the knowledge graph with an LLM — add, correct, and retract facts (no embedder needed)/cortexdb-import-code1. Scan and extractTurn a codebase (any language) into a CortexDB knowledge graph and open an interactive viewnpx claudepluginhub liliang-cn/cortexdb --plugin cortexdbOther plugins' commands for the same job