skills/forge-graph-status/SKILL.md
[read-only] Show Neo4j knowledge graph status -- node counts, container health, last build SHA, enrichment coverage. Use when you want to check if the graph is healthy, see what data is indexed, or verify the graph is up to date with the latest code changes.
npx skillsauth add quantumbitcz/dev-pipeline forge-graph-statusInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
See shared/skill-contract.md for the standard exit-code table.
Before any action, verify:
git rev-parse --show-toplevel 2>/dev/null. If fails: report "Not a git repository. Navigate to a project directory." and STOP..claude/forge.local.md exists. If not: report "Forge not initialized. Run /forge-init first." and STOP.You are the graph status reporter. Your job is to display the current state of the Neo4j knowledge graph: container health, node and relationship counts, last build SHA, and enrichment coverage.
Before starting, resolve the Neo4j container name: read graph.neo4j_container_name from .claude/forge.local.md. If not set, use default forge-neo4j. Use the resolved name in ALL docker commands below.
Run the health check script:
"${CLAUDE_PLUGIN_ROOT}/shared/graph/neo4j-health.sh"
Also check the container's running state:
docker ps --filter "name=forge-neo4j" --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
If Docker itself is unavailable, report: "Docker is not available. Cannot check graph status."
Show node counts grouped by project:
MATCH (n) WHERE n.project_id IS NOT NULL
RETURN n.project_id, labels(n)[0] AS label, count(n) AS count
ORDER BY n.project_id, label
If Neo4j is healthy, query node counts by label:
echo "MATCH (n) RETURN labels(n)[0] AS label, count(*) AS count ORDER BY count DESC" | \
docker exec -i forge-neo4j cypher-shell -u neo4j -p forge-local --format plain
Display all results in a table.
Read .forge/graph/.last-build-sha and display its contents.
git rev-parse HEAD and indicate whether the graph is up to date or stale (HEAD has moved since last build).Read .forge/graph/.enriched-files if it exists.
git ls-files | wc -l).If Neo4j is healthy, query relationship counts:
echo "MATCH ()-[r]->() RETURN type(r) AS type, count(*) AS count ORDER BY count DESC" | \
docker exec -i forge-neo4j cypher-shell -u neo4j -p forge-local --format plain
Display all results in a table.
Present a consolidated status summary:
Knowledge Graph Status
Container: HEALTHY (forge-neo4j)
Ports: 7474 (HTTP), 7687 (Bolt)
Last build: abc1234 (up to date)
Node counts:
ProjectFile 142
ProjectClass 38
ProjectFunction 215
ProjectPackage 12
ProjectDependency 27
_SeedMarker 1
Relationship counts:
CONTAINS 180
CALLS 94
IMPORTS 61
DEPENDS_ON 27
Enrichment coverage: 89/142 files (63%)
Run /forge-graph-init to rebuild if stale.
Run /forge-graph-query <cypher> to explore.
If Neo4j is unavailable, show what can be determined from local files (last build SHA, enriched files) and suggest running /forge-graph-init.
| Condition | Action |
|-----------|--------|
| Prerequisites fail | Report specific error message and STOP |
| Docker not available | Report "Docker is not available. Cannot check graph status." Show local file data only |
| Neo4j container not running | Report "Neo4j not running. Run /forge-graph-init first." Show local file data if available |
| Neo4j unhealthy | Report container status as UNAVAILABLE with error output. Show local file data |
| Cypher query fails | Report the error. Suggest checking container logs with docker logs forge-neo4j |
| .last-build-sha missing | Report "No build recorded yet." |
| .enriched-files missing | Report "No enrichment data recorded." |
/forge-graph-init -- Initialize or restart the graph if status shows it is unavailable/forge-graph-rebuild -- Rebuild the graph if status shows stale data/forge-graph-debug -- Diagnose specific graph issues (orphaned nodes, missing enrichments)/forge-graph-query -- Run Cypher queries to explore graph datadevelopment
[writes] Build, fix, deploy, review, or modify code in this project. Universal entry for the forge pipeline. Auto-bootstraps on first run; brainstorms before planning when given a feature description. Use when you want to take any productive action: implementing features, fixing bugs, reviewing branches, deploying, committing, running migrations.
tools
[writes] Manage forge state and configuration: recovery, abort, config edits, session handoff, automations, playbooks, output compression, knowledge graph maintenance. Use when you need to recover from broken pipeline state, edit settings, or manage long-lived state.
development
[writes] Create, list, show, resume, or search forge session handoffs. Use when context is getting heavy and you want to transfer a forge run or conversation into a fresh Claude Code session, or to resume from a prior handoff artefact. Subcommands - no args (write), list, show, resume, search.
development
[writes] Manage the Neo4j knowledge graph. Subcommands: init, rebuild (writes); status, query <cypher>, debug (read-only). Requires Docker. No default — an explicit subcommand is required. Use when setting up the graph for the first time, rebuilding after major refactors, checking graph health, or running ad-hoc Cypher diagnostics.