/closedloop-core:erd-diagram [canvas-sidebar|schema-explorer] [path/to/existing-erd.html]from closedloop-core
Generates or updates an interactive ERD as a single offline HTML file from Postgres schema code (Prisma schema, SQL dump, or SQL migrations). Supports two styles: canvas-sidebar and schema-explorer.
Ships in closedloop-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Builds a self-contained, offline HTML ERD from schema code, or updates one this skill made earlier.
Code only. Never connect to, query, or test against any database, local or remote, and never start one (no psql, no Docker Postgres). Every fact in the diagram comes from files in the repository.
Arguments: $ARGUMENTS
The tool is scripts/dist/erd.mjs in this skill's directory. It needs only Node 18 or later, with no install step; the layout engine (elkjs) is bundled into it. Run it as node <skill-dir>/scripts/dist/erd.mjs <command>, where <skill-dir> is the absolute path of the directory you read this SKILL.md from, not the repository you are diagramming.
Split $ARGUMENTS into words.
canvas-sidebar or schema-explorer is the style.~.Then choose the mode:
AskUserQuestion, one question, header "Style", options:
canvas-sidebar: "Every table on one pannable, zoomable canvas, with a searchable table list grouped by domain on the left and a detail panel."schema-explorer: "Overview of domains, a focused table view (its references on the left, what references it on the right), and a pannable diagram per domain."--repo <dir>.erd.mjs detect. It lists Prisma schemas, SQL dumps (structure.sql, schema.sql) and SQL migration folders, each with its database.
database is postgres or unknown; never one marked sqlite, mysql or another engine.AskUserQuestion.schema.rb, Django models, TypeORM or Sequelize entities, SQLAlchemy, Drizzle TypeScript without generated SQL, and so on). Read that code and write the model JSON yourself, in the shape described in the model format. Save it as ~/.claude/erd-diagram/models/<repo-name>.json, check it with erd.mjs validate-model <file>, fix every problem it reports, and use --source json:<that path>. Name each model after its table; record a column's database name in column and doc comments in doc.erd.mjs draft-domains --source <spec> --out <scratch>/domains.json and erd.mjs extract --source <spec> --out <scratch>/model.json. The draft is a clustering of the foreign-key graph and its names are placeholders. Read the table names, docs and relations in model.json and rewrite the draft into roughly 6 to 15 domains named for what they hold ("Billing", "Auth & sessions"), each table in exactly one domain, ids in lowercase-with-dashes. Hub tables that nearly everything references (the build reports them as hubs) go with the domain they belong to by meaning, usually accounts or organizations.~/Desktop/<repo-name>-erd-<style>.html unless the user named one. If that file already exists, ask whether to update it or write a different name. Never pass --force without the user saying to replace it.erd.mjs build --style <style> --out <path> --source <spec> [--domains <file>] [--repo <dir>]. It refuses an existing --out (exit code 3), rejects a domain map that names unknown tables or lists a table twice, and puts any table the map leaves out under "Unsorted".node <skill-dir>/scripts/dist/verify.mjs <path> renders the file headlessly (no window). It checks for script errors, that every table renders, that each domain diagram draws, and that search lands on a column. It prints ok; fix any failure before reporting. If it prints skipped (no puppeteer installed), say the render check was skipped.unsorted tables, and note that the diagram reflects the schema code at that commit, not any running database.erd.mjs inspect <path> shows the file's style, title, source and domains.
source (legacy: true) is a diagram made before this skill. update finds its source automatically. If it reports several candidates, ask the user which one and pass --source.json: source means the model was written by an agent. Regenerate that JSON from the current code first (section 2, step 3, last bullet), then pass --source json:<path>.erd.mjs update <path>, adding --style <style> only if the user passed a style different from the file's (that converts it).
unsorted tables, they are new. Run erd.mjs export-domains <path> --out <scratch>/domains.json, add each new table to the domain it fits (a new domain only if none fits), and run erd.mjs update <path> --domains <scratch>/domains.json.newTables, removedTables, the source commit, and any style conversion._prisma_migrations and schema_migrations (the full list is in the model format). Pass build --exclude <regex> to replace that list.down files and folders. The tool understands CREATE/ALTER/DROP TABLE, columns, constraints, indexes, enums, renames and COMMENT ON, and ignores everything else (functions, triggers, data changes).public are named schema:table.tools/erd-diagram/ in the plugin repository; edit the sources there, not scripts/dist/.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub closedloop-ai/claude-plugins --plugin closedloop-core12 skills in this plugin
/closedloop-intelClosedLoop ticket + codebase intelligence over a shared remote instance. Use PROACTIVELY for questions about ticket scope overlap or duplicate work ("do these tickets overlap", "is someone already doing this", "is this a duplicate"), blast radius ("if I change this file or symbol, what breaks", "which tickets touch this code", "what depends on this module"), ticket lookup by keyword or slug, ticket lineage (which plan produced which issue, branches and PRs for a ticket), and aggregate rollups ("what shipped last week", "what is in progress per project", "what is stale"). Answers with cited evidence (ticket slugs, file paths, graph facts) using the closedloop-graph MCP server. Read-only./decision-tableUse when the user wants a code-grounded decision table for current behavior, wants to compare current behavior against a plan or work item, or needs a control-flow artifact for recovery, retry, finalization, validation, state-machine, or review-heavy edge cases./gh-monitor-prStart a detached GitHub pull-request monitor that wakes the exact launching Codex Desktop or CLI root through the managed Codex App Server when review, CI, conflict, merge-queue, closure, readiness, or merge events need attention. Use when the user asks Codex to watch, monitor, babysit, or wait on a PR or merge queue without keeping the current turn alive.Other plugins' skills for the same job