From code-atlas
Query the semantic dependency graph stored in .code-atlas/graph-schema.json. Accepts a JSON query object with one of four operations — dependencies_of, dependents_of, filter, transitive_dependents — and returns a filtered subgraph (matched nodes + relevant edges) with a plain-text summary. Use for impact analysis, architecture exploration, and risk identification. Triggers on: query code atlas, find dependencies, who imports, blast radius, impact analysis, find critical modules, query graph.
How this skill is triggered — by the user, by Claude, or both
Slash command
/code-atlas:query <optional: paste your JSON query here, or leave blank to describe what you want in plain English><optional: paste your JSON query here, or leave blank to describe what you want in plain English>The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are executing a Code Atlas graph query. Your goal is to read `.code-atlas/graph-schema.json`, execute the requested query operation, and return a structured subgraph result with a plain-text summary.
You are executing a Code Atlas graph query. Your goal is to read .code-atlas/graph-schema.json, execute the requested query operation, and return a structured subgraph result with a plain-text summary.
Arguments: "{$ARGUMENTS}"
Reference: plugins/code-atlas/docs/query-language-reference.md is the complete specification for all operations, response format, node properties, and edge properties.
.code-atlas/graph-schema.json exists using Bash: test -f .code-atlas/graph-schema.json && echo yes.No graph-schema.json found in .code-atlas/.
Run /code-atlas:map to generate the architecture index and semantic dependency graph first.
Then STOP..code-atlas/graph-schema.json using the Read tool._header.schema_version equals 2. If not:
graph-schema.json schema version {N} is not supported. Expected version 2.
Run /code-atlas:map to regenerate with the current schema.
Then STOP.Determine the query to execute:
{$ARGUMENTS} contains a JSON object:Parse it directly as the query. Validate that operation is present and is one of:
dependencies_ofdependents_offiltertransitive_dependents{$ARGUMENTS} is plain English or empty:Interpret the user's intent and construct the appropriate JSON query. Common mappings:
dependencies_of with module: "X"dependents_of with module: "X"transitive_dependents with module: "X"filter with inferred conditionsShow the interpreted query to the user before executing:
Interpreted query:
{json block}
Executing...
If the query cannot be parsed or is missing required fields, print:
Invalid query. Supported operations:
dependencies_of — modules that a given node imports
dependents_of — modules that import a given node
filter — nodes matching attribute conditions
transitive_dependents — full transitive upstream consumer set
Required fields by operation:
dependencies_of: { "operation": "dependencies_of", "module": "<path>" }
dependents_of: { "operation": "dependents_of", "module": "<path>" }
filter: { "operation": "filter", "conditions": { ... } }
transitive_dependents: { "operation": "transitive_dependents", "module": "<path>" }
Optional: "max_depth": <1-5> (default: 2) for traversal operations.
Prefer the deterministic script runtime. scripts/query.js (in this plugin) implements all four operations with exact BFS semantics, schema validation, and the response envelope — no manual traversal needed.
.code-atlas/last-query.json using the Write tool (this avoids shell-quoting problems with inline JSON on Windows).node "${CLAUDE_PLUGIN_ROOT}/scripts/query.js" --query-file .code-atlas/last-query.json
Fall back to in-model execution ONLY if node is not on PATH or the script file does not exist. In that case, execute the operation manually against the loaded graph using the logic below, then format the result yourself per Step 4.
dependencies_ofmodule in graph.nodes. If absent:
Module "{module}" is not in the graph. It may be outside the key set, an external package, or a test/build file.
Return empty result.max_depth (default: 2; clamp to range [1, 5]).module:
edge.source === current_node.edge.target nodes (only if present in graph.nodes).max_depth hops.matched_nodes = all visited nodes (excluding the query module itself unless it appears as a dependency of itself).matched_edges = all edges whose source and target are both in matched_nodes union {module}.dependents_ofmodule in graph.nodes. If absent, return empty result with the same message as above.max_depth (default: 2; clamp to [1, 5]).module:
edge.target === current_node.edge.source nodes (only if present in graph.nodes).max_depth hops.matched_nodes = all visited source nodes.matched_edges = all edges in the traversal subgraph.filterconditions is a non-null object with at least one key.conditions is empty {}, return all nodes with a note: "No conditions specified — returning all nodes."graph.nodes. Include a node if ALL of the following hold for each condition field:
role: node.role === conditions.rolecriticality: node.criticality === conditions.criticalitystability: node.stability === conditions.stabilitytest_coverage: node.test_coverage === conditions.test_coveragetype: node.type === conditions.typematched_nodes = all nodes passing all conditions.matched_edges = all edges where BOTH source AND target are in matched_nodes.transitive_dependentsmodule in graph.nodes. If absent, return empty result.max_depth (default: 2; clamp to [1, 5]).dependents_of). Visited nodes tracked to handle cycles safely.matched_nodes = all visited nodes.matched_edges = all edges traversed between visited nodes.(When the script runtime executed the query, it already produced this format — just relay its output. This section specifies the format for the in-model fallback.)
Return the result as a JSON block followed by a plain-text explanation.
{
"query": { "<echo of original query>" },
"matched_nodes": [
{
"id": "<repo-relative path>",
"type": "module|file",
"role": "<role>",
"criticality": "<criticality>",
"stability": "<stability>",
"test_coverage": "<test_coverage>",
"description": "<one-line description>"
}
],
"matched_edges": [
{
"source": "<repo-relative path>",
"target": "<repo-relative path>",
"type": "<edge type>",
"strength": "<strength>",
"directionality": "<directionality>",
"impact": "<impact or empty string>"
}
],
"summary": "<human-readable one-line summary>"
}
| Operation | Example summary |
|---|---|
dependencies_of | "Found 4 dependencies of src/auth (depth 2), 6 edges total" |
dependents_of | "Found 3 modules depending on src/utils/logger (depth 1), 3 edges total" |
filter | "Found 2 nodes matching { criticality: critical, test_coverage: untested }" |
transitive_dependents | "Found 7 transitive dependents of src/config (depth 3), 9 edges total" |
Query: {operation} {module or conditions}
Graph: {total_nodes} nodes, {total_edges} edges available
Results: {N} nodes matched, {N} edges
Matched modules:
- {id} [{role}] [{criticality}] [{stability}] — {description}
...
Key edges:
- {source} → {target} [{type}] [{strength}] {impact if non-empty}
...
{Any warnings, e.g. max_depth clamped, module not in key set, etc.}
If matched_nodes is empty:
No results found.
{Reason: no nodes match the conditions / module not in key set / graph has no edges for this node}
Tip: Run /code-atlas:map to regenerate the graph if the codebase has changed significantly.
role| Value | Meaning |
|---|---|
entry_point | Application entry — process starts here |
core_module | Central business logic with high fan-in |
utility | Generic helpers with low criticality |
config | Configuration or environment management |
middleware | Request/response pipeline layer |
model | Data structure or domain entity |
public_api | Exported interface layer |
route_definition | HTTP/API route declarations |
internal | Internal implementation detail |
criticality| Value | Threshold | Meaning |
|---|---|---|
critical | importer_count >= 10 | Changing this risks breaking many things |
high | importer_count >= 5 | Significant downstream impact |
medium | importer_count >= 2 | Moderate downstream impact |
low | importer_count < 2 | Limited downstream impact |
stability| Value | Meaning |
|---|---|
stable | API unlikely to change; safe to depend on |
evolving | In flux; downstream consumers may need updates |
experimental | May be removed or redesigned; avoid hard dependencies |
test_coverage| Value | Meaning |
|---|---|
well_tested | Both *.test.* and *.spec.* siblings found |
partial | Only one test file type found |
untested | No colocated test files detected |
type| Value | Meaning |
|---|---|
direct_import | Static import or require statement |
dynamic_import | Runtime import() or require() inside a function |
inheritance | Class extends another class in target |
composition | Module uses target's types/classes as fields or constructor params |
configuration | Source reads or depends on a config/settings module |
sideeffect | Import for side effects only (e.g. import 'reflect-metadata') |
strength| Value | Meaning |
|---|---|
core | Removing this edge would break the source's primary purpose |
utility | Convenient helper — source can function without it |
optional | Conditionally used; source can operate without it in some cases |
directionality| Value | Meaning |
|---|---|
required | Source needs target; unidirectional |
circular | Source and target mutually depend on each other |
conditional | Source only imports target under certain conditions |
impact| Value | Meaning |
|---|---|
breaking_change_risk | Target API shift would likely break source |
ripple_effect_magnitude | Source change propagates to many downstream consumers |
"" | No special impact annotation — standard dependency |
{
"operation": "filter",
"conditions": {
"criticality": "critical"
}
}
{
"operation": "dependencies_of",
"module": "src/api",
"max_depth": 2
}
{
"operation": "dependents_of",
"module": "src/utils/logger",
"max_depth": 1
}
{
"operation": "transitive_dependents",
"module": "src/config",
"max_depth": 4
}
{
"operation": "filter",
"conditions": {
"criticality": "critical",
"test_coverage": "untested"
}
}
{
"operation": "filter",
"conditions": {
"criticality": "high",
"stability": "evolving"
}
}
{
"operation": "filter",
"conditions": {
"role": "entry_point"
}
}
{
"operation": "dependents_of",
"module": "src/experimental/feature-x",
"max_depth": 3
}
{
"operation": "dependencies_of",
"module": "src/middleware",
"max_depth": 3
}
| Situation | Behavior |
|---|---|
graph-schema.json not found | Print message suggesting /code-atlas:map, then STOP |
| Schema version mismatch | Print version mismatch message suggesting re-map, then STOP |
| Malformed JSON query | Print schema hint with valid operations and required fields |
Unknown operation value | Print valid operation names |
module not found in graph | Return empty result with explanatory note |
conditions object is empty | Return all nodes with a note |
max_depth exceeds 5 | Clamp to 5; include note in response summary |
| Circular dependency in traversal | Track visited nodes; continue BFS without revisiting |
npx claudepluginhub mistervitopro/qa-claude-market --plugin code-atlasGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.