/x-ray
Deep codebase exploration using semantic search and relationship mapping. Use when you need to understand the current codebase.
Claude Code
$ npx -y skills add bartolli/codanna --skill x-ray --agent claude-code
Codex
$ npx skills add bartolli/codanna --skill x-ray -a codex -y
Cursor
$ npx skills add bartolli/codanna --skill x-ray -a cursor -y
Gemini CLI
$ npx skills add bartolli/codanna --skill x-ray -a gemini-cli -y
GitHub Copilot
$ npx skills add bartolli/codanna --skill x-ray -a github-copilot -y
OpenCode
$ npx skills add bartolli/codanna --skill x-ray -a opencode -y
Windsurf
$ npx skills add bartolli/codanna --skill x-ray -a windsurf -y
SKILL.md
x-ray.SKILL.mdname: x-ray
description: Deep codebase exploration using semantic search and relationship mapping. Use when you need to understand the current codebase.
allowed-tools: Bash(codanna:*), Bash(sed:*), Bash(rg:*), Bash(node:*), Read, Grep, Glob
Reframe
LITERAL: "$ARGUMENTS"
Definitions
- LITERAL — what the user typed
- INTENT — what they mean, given SESSION_CONTEXT
- SESSION_CONTEXT — recent work; held by you, not by the index
- BRIDGE — your job: LITERAL + SESSION_CONTEXT → INTENT → query
Rules
- Search INTENT, not LITERAL.
- Context disambiguates → NARROW.
- Context insufficient → BROAD. Vague beats confidently-wrong-narrow.
Transforms (LITERAL → INTENT)
- VAGUE → specify ("that parsing thing" → "language parser implementation")
- QUESTION → keywords ("how does parsing work?" → "parsing implementation process")
- CONVERSATIONAL → technical ("stuff that handles languages" → "language handler processor")
- BROAD → contextualize ("errors" → "error handling exception management")
- CONTEXTUAL → reconstruct ("the logging" → "prompt eval logging", when SESSION_CONTEXT = prompt eval work)
OptimizedQuery: _{written against INTENT}_
---
Loop
Definitions
- SEARCH — `codanna mcp semantic_search_with_context query:"<q>" limit:5`
- INSPECT — read source at a LOCATION (Read tool or `sed -n 'A,Bp' file`)
- TRAVERSE — `codanna retrieve describe <name|symbol_id:N>` on a RELATIONSHIP
- REFINE — return to SEARCH with a new OptimizedQuery
- RESULT — one hit from SEARCH; carries SCORE, signature, doc, LOCATION, RELATIONSHIPS
- SCORE — relevance ∈ [0,1]; focus on SCORE > 0.6
- LOCATION — `file_path:start_line-end_line`
- RELATIONSHIPS — calls, called_by, implements, defines
Default flow
1. SEARCH(OptimizedQuery) 2. For each RESULT with SCORE > 0.6:
- INSPECT if signature/doc is insufficient
- TRAVERSE 1–2 RELATIONSHIPS that look load-bearing
3. Picture incomplete → REFINE with what you learned 4. INTENT answered → stop
INSPECT mechanics
LOCATION `src/io/exit_code.rs:108-120` →
- Read tool: `file_path=<env.cwd>/src/io/exit_code.rs, offset=108, limit=13`
- limit formula: `end_line - start_line + 1`
- sed (Unix only): `sed -n '108,120p' src/io/exit_code.rs`
TRAVERSE heuristics
- RELATIONSHIPS appearing across multiple RESULTs are load-bearing — follow first
- 1–2 per RESULT is usually enough
- Prefer `symbol_id:N` over name when shown — avoids ambiguity
---
Mode
This skill is EXPLORE, not ACT.
- EXPLORE: build understanding, surface patterns, identify integration points
- ACT: modify code, refactor, implement
INTENT answered → present findings → await user direction. Do not transition to ACT inside this skill.
---
Graph
EXPLORE-legal: derives a read-only view, does not modify source.
When TRAVERSE reveals dense, multi-directional RELATIONSHIPS, visualize. All pages share the design tokens with the sibling `graph` skill: dark by default, light/dark toggle top-right, `--light` opens light.
# codanna >= 0.14 (has `codanna dump`): one index read, then the neighborhood in memory
node ${CLAUDE_SKILL_DIR}/visualize-dump.js <symbol_id:ID | name> [depth]
# older binaries: one `retrieve describe` per node (3D force view only)
node ${CLAUDE_SKILL_DIR}/visualize-graph.js <symbol_id:ID> [depth]- Default view: a 2D layered call DAG -- callers above, callees below, labels at
rest, deterministic; hover a name to light incoming (accent) / outgoing (red) edges; dashed edges are cycle edges; click a node to open its file
- `--3d` keeps the 3D force view (the 5-second gestalt of a tangled
neighbourhood; `--layout force|td|lr|radialout` implies it); `--all` renders the whole index and is always 3D (`--bake` / `--no-bake` control the server-side pinned layout, on by default above 2000 nodes)
- Flags: depth default 2 (positional), `--cap N` per-level cap (default 5, 0 =
none), `--from graph.jsonl` reuses a saved dump, `--binary PATH`, `--no-open`, `--relation calls|defines|uses|implements|extends` filters `--all`, `--self-contained` inlines the 3D vendor libs (the DAG page always is)
- Output: `.codanna/visualizations/graph-{name}-{timestamp}.html`
Structure and flow over the same dump:
# structure: collapsible left-to-right tree (drill-down); --radial for the poster IMAGE
node ${CLAUDE_SKILL_DIR}/visualize-tree.js [--root crate::indexing] [--depth N] [--kinds Function,Method,...] [--radial]
# dependencies on the structure: hierarchical edge bundling (Calls by default)
node ${CLAUDE_SKILL_DIR}/visualize-bundle.js [--root crate::indexing] [--depth N] [--relation calls|uses|implements|extends]- Pick by question: "what depends on this symbol / what breaks if I change it"
-> `visualize-dump.js` (call DAG); "how is this module organized / let me explore" -> `visualize-tree.js` (expand/collapse like a file explorer -- the NAVIGATION surface for structure); "which modules call which, inside one scope, on a printable page" -> `visualize-bundle.js --depth N` (arcs aggregate to collapsed leaves, width ~ log count; hover: callers blue, callees red)
- `--radial` is a POSTER, not a navigation surface: one all-at-once image of a
scope's containment shape for docs, slides, and side-by-side scope comparison. Without an explicit `--depth` it auto-collapses deep levels into counted ancestors (<= ~1200 rendered leaves). Never reach for it when the user wants to explore -- that is the collapsible tree's job
- Every 2D view opens the same detail panel on click (signature, kind chips,
file:span, relation groups with go-navigation where the view supports it); opening the source is the explicit Open-file action inside the panel, never the click itself -- file:// opens in the browser, not the editor
- "what is the shape of the WHOLE codebase -- module shares, hubs, which
modules talk, history over time" -> the siblin
Read more
name: x-ray description: Deep codebase exploration using semantic search and relationship mapping. Use when you need to understand the current codebase. allowed-tools: Bash(codanna:*), Bash(sed:*), Bash(rg:*), Bash(node:*), Read, Grep, Glob
Reframe
LITERAL: "$ARGUMENTS"
Definitions
- LITERAL — what the user typed
- INTENT — what they mean, given SESSION_CONTEXT
- SESSION_CONTEXT — recent work; held by you, not by the index
- BRIDGE — your job: LITERAL + SESSION_CONTEXT → INTENT → query
Rules
- Search INTENT, not LITERAL.
- Context disambiguates → NARROW.
- Context insufficient → BROAD. Vague beats confidently-wrong-narrow.
Transforms (LITERAL → INTENT)
- VAGUE → specify ("that parsing thing" → "language parser implementation")
- QUESTION → keywords ("how does parsing work?" → "parsing implementation process")
- CONVERSATIONAL → technical ("stuff that handles languages" → "language handler processor")
- BROAD → contextualize ("errors" → "error handling exception management")
- CONTEXTUAL → reconstruct ("the logging" → "prompt eval logging", when SESSION_CONTEXT = prompt eval work)
OptimizedQuery: _{written against INTENT}_
---
Loop
Definitions
- SEARCH — `codanna mcp semantic_search_with_context query:"<q>" limit:5`
- INSPECT — read source at a LOCATION (Read tool or `sed -n 'A,Bp' file`)
- TRAVERSE — `codanna retrieve describe <name|symbol_id:N>` on a RELATIONSHIP
- REFINE — return to SEARCH with a new OptimizedQuery
- RESULT — one hit from SEARCH; carries SCORE, signature, doc, LOCATION, RELATIONSHIPS
- SCORE — relevance ∈ [0,1]; focus on SCORE > 0.6
- LOCATION — `file_path:start_line-end_line`
- RELATIONSHIPS — calls, called_by, implements, defines
Default flow
1. SEARCH(OptimizedQuery) 2. For each RESULT with SCORE > 0.6:
- INSPECT if signature/doc is insufficient
- TRAVERSE 1–2 RELATIONSHIPS that look load-bearing
3. Picture incomplete → REFINE with what you learned 4. INTENT answered → stop
INSPECT mechanics
LOCATION `src/io/exit_code.rs:108-120` →
- Read tool: `file_path=<env.cwd>/src/io/exit_code.rs, offset=108, limit=13`
- limit formula: `end_line - start_line + 1`
- sed (Unix only): `sed -n '108,120p' src/io/exit_code.rs`
TRAVERSE heuristics
- RELATIONSHIPS appearing across multiple RESULTs are load-bearing — follow first
- 1–2 per RESULT is usually enough
- Prefer `symbol_id:N` over name when shown — avoids ambiguity
---
Mode
This skill is EXPLORE, not ACT.
- EXPLORE: build understanding, surface patterns, identify integration points
- ACT: modify code, refactor, implement
INTENT answered → present findings → await user direction. Do not transition to ACT inside this skill.
---
Graph
EXPLORE-legal: derives a read-only view, does not modify source.
When TRAVERSE reveals dense, multi-directional RELATIONSHIPS, visualize. All pages share the design tokens with the sibling `graph` skill: dark by default, light/dark toggle top-right, `--light` opens light.
# codanna >= 0.14 (has `codanna dump`): one index read, then the neighborhood in memory
node ${CLAUDE_SKILL_DIR}/visualize-dump.js <symbol_id:ID | name> [depth]
# older binaries: one `retrieve describe` per node (3D force view only)
node ${CLAUDE_SKILL_DIR}/visualize-graph.js <symbol_id:ID> [depth]- Default view: a 2D layered call DAG -- callers above, callees below, labels at
rest, deterministic; hover a name to light incoming (accent) / outgoing (red) edges; dashed edges are cycle edges; click a node to open its file
- `--3d` keeps the 3D force view (the 5-second gestalt of a tangled
neighbourhood; `--layout force|td|lr|radialout` implies it); `--all` renders the whole index and is always 3D (`--bake` / `--no-bake` control the server-side pinned layout, on by default above 2000 nodes)
- Flags: depth default 2 (positional), `--cap N` per-level cap (default 5, 0 =
none), `--from graph.jsonl` reuses a saved dump, `--binary PATH`, `--no-open`, `--relation calls|defines|uses|implements|extends` filters `--all`, `--self-contained` inlines the 3D vendor libs (the DAG page always is)
- Output: `.codanna/visualizations/graph-{name}-{timestamp}.html`
Structure and flow over the same dump:
# structure: collapsible left-to-right tree (drill-down); --radial for the poster IMAGE
node ${CLAUDE_SKILL_DIR}/visualize-tree.js [--root crate::indexing] [--depth N] [--kinds Function,Method,...] [--radial]
# dependencies on the structure: hierarchical edge bundling (Calls by default)
node ${CLAUDE_SKILL_DIR}/visualize-bundle.js [--root crate::indexing] [--depth N] [--relation calls|uses|implements|extends]- Pick by question: "what depends on this symbol / what breaks if I change it"
-> `visualize-dump.js` (call DAG); "how is this module organized / let me explore" -> `visualize-tree.js` (expand/collapse like a file explorer -- the NAVIGATION surface for structure); "which modules call which, inside one scope, on a printable page" -> `visualize-bundle.js --depth N` (arcs aggregate to collapsed leaves, width ~ log count; hover: callers blue, callees red)
- `--radial` is a POSTER, not a navigation surface: one all-at-once image of a
scope's containment shape for docs, slides, and side-by-side scope comparison. Without an explicit `--depth` it auto-collapses deep levels into counted ancestors (<= ~1200 rendered leaves). Never reach for it when the user wants to explore -- that is the collapsible tree's job
- Every 2D view opens the same detail panel on click (signature, kind chips,
file:span, relation groups with go-navigation where the view supports it); opening the source is the explicit Open-file action inside the panel, never the click itself -- file:// opens in the browser, not the editor
- "what is the shape of the WHOLE codebase -- module shares, hubs, which
modules talk, history over time" -> the siblin
Other skills on codanna.
More skills from other plugins.
gitnexus-cli
Use when the user needs to run GitNexus CLI commands like analyze/index a repo, check status, clean the index, generate a wiki,…
fastmcp-client-cli
Query and invoke tools on MCP servers using fastmcp list and fastmcp call. Use when you need to discover what tools a server…
n8n-agents
Design n8n AI agents the right way. Use when building or editing any @n8n/n8n-nodes-langchain.* AI node — an AI Agent, LLM chain,…
post-to-xhs
小红书内容发布技能。支持两种发布模式:(1) 上传图文模式 - 图片+短文;(2) 写长文模式 - 长篇文章+排版模板。 支持两种输入方式:用户提供完整内容和图片/图片URL,直接发布;或提供网页URL,自动提取内容和图片。…
Questions about x-ray.
- Which coding agents can use x-ray?
- x-ray installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

