x-ray

x-ray is a command for Claude Code from madeinoz67/madeinoz-knowledge-system. It costs 10 tokens per session (1,231 once invoked), scanned A, original, MIT.

A command for exploring a codebase through semantic search, which finds code by meaning, and relationship mapping, which shows how functions and symbols connect.

In plain words
What is it for?
Use it to locate an implementation, understand callers and callees, trace interfaces, and investigate how related code fits together.
Why use it?
It turns a vague question about a codebase into more specific search terms and gathers the most relevant surrounding context.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is Bash(node .claude/scripts/codanna/context-provider.js:*).

Good fit Use it to locate an implementation, understand callers and callees, trace interfaces, and investigate how related code fits together.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/madeinoz67/madeinoz-knowledge-system
agentmods
npx agentmods add commands/madeinoz67/madeinoz-knowledge-system/x-ray

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for x-ray

README.md
[![agentmods](https://agentmods.dev/badge/commands/madeinoz67/madeinoz-knowledge-system/x-ray/github.svg)](https://agentmods.dev/commands/madeinoz67/madeinoz-knowledge-system/x-ray)
Your own site
<a href="https://agentmods.dev/commands/madeinoz67/madeinoz-knowledge-system/x-ray"><img src="https://agentmods.dev/badge/commands/madeinoz67/madeinoz-knowledge-system/x-ray/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for x-ray

Your own site · 80×15
<a href="https://agentmods.dev/commands/madeinoz67/madeinoz-knowledge-system/x-ray"><img src="https://agentmods.dev/badge/commands/madeinoz67/madeinoz-knowledge-system/x-ray.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,231 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00010 $0.01231
Opus 5 $0.00005 $0.00616
Sonnet 5 $0.00002 $0.00246
Haiku 4.5 $0.00001 $0.00123

Measured 10d ago against content hash 54d2e8ab06f2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

x-ray scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/codanna/x-ray.md · 117 lines

How it starts

The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Search Query Analysis

User's Original Query: "$ARGUMENTS"

Query Optimization

Codanna's semantic search works best with technical terms and specific concepts. Analyze the query above and improve it for code search:

  1. If vague (e.g., "that parsing thing") → Make it specific (e.g., "language parser implementation")
  2. If a question (e.g., "how does parsing work?") → Extract keywords (e.g., "parsing implementation process")
  3. If conversational (e.g., "the stuff that handles languages") → Use technical terms (e.g., "language handler processor")
  4. If too broad (e.g., "errors") → Add context (e.g., "error handling exception management")

OptimizedQuery: {Claude: Write your improved query here, then use it below}

Execute this command with your optimized query:

Your Workflow

Gather Context <Step_1 GatherContext>

Use the Bash tool to perform semantic code search:

Execute: node .claude/scripts/codanna/context-provider.js find "$OptimizedQuery" --limit=5

What Codanna returns:

  • Relevance scores (how well each result matches)
  • Symbol signatures and documentation
  • Relationships (calls, called_by, implements, defines)
  • File locations with line ranges

Your Workflow <Step_2 YourWorkflow>

  1. Analyze the results with their relevance scores (focus on results with score > 0.6 (if possible))

  2. To see actual implementation of interesting results:

    • Use the line range from the Location field to read just the relevant code
    • Example: If you see "Location: src/io/exit_code.rs:108-120"
    • Use the Read tool with:
      • file_path: src/io/exit_code.rs (use the working directory from your environment context to construct the absolute path)
      • offset: 108 (start line)
      • limit: 13 (calculated as: 120 - 108 + 1)
    • Formula: limit = end_line - start_line + 1
    • Example: Read(file_path="/full/path/to/src/io/exit_code.rs", offset=108, limit=13)
  3. When relationships are shown (called_by, calls, defines, implements):

    • If a relationship looks relevant to answering the query, investigate it
    • Execute: node .claude/scripts/codanna/context-provider.js describe <relationship_symbol_name|symbol_id:ID>
    • Example: If you see "Called by: initialize_registry [symbol_id:123]", run: node .claude/scripts/codanna/context-provider.js describe initialize_registry or describe symbol_id:123
    • Note: Following 1-2 key relationships per result is typically sufficient

Read the full file on GitHub · 117 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 117 lines · 10 tokens per session scan A 54d2e8ab06f2

Subscribe to this mod's changes

x-ray is a command published in the GitHub repository madeinoz67/madeinoz-knowledge-system (3 stars, last pushed 5mo ago), licensed MIT. It adds 10 tokens to every session and 1,231 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.