# context-xray

Visualize local Codex and Claude Code context usage, open a report, flag warnings, and suggest prompt/tooling optimizations.

Skill by Builder.io. Category: Agent craft.

## Install

Project (for this project only):

```sh
npx skills add builderio/agent-native --skill context-xray
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

Global (for every project on this machine):

```sh
npx skills add builderio/agent-native --skill context-xray -g
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

## Tags

- Runs on your computer: It runs as a program on your machine, with your access.

## Security audits

- Gen Agent Trust Hub: Pass
- Socket: Pass
- Snyk: Warn

Installs: 10. Installs counted by skills.sh. [Open on skills.sh](https://www.skills.sh/builderio/agent-native/context-xray)

## Source

[Open the source](https://github.com/builderio/agent-native/tree/HEAD/skills/context-xray). Checked 2026-10-10. This summary may contain AI-generated text, so it can be wrong. Check the source before you rely on it.

## SKILL.md

````markdown
---
name: context-xray
description: >-
  Visualize local Codex and Claude Code context usage, open a report, flag
  warnings, and suggest prompt/tooling optimizations.
metadata:
  visibility: exported
---

# Context X-Ray

Use Context X-Ray when a local coding-agent thread is getting large or the user
wants to understand where context is going.

## Setup

Recommended install path:

```bash
npx @agent-native/core@latest skills add context-xray --client all
```

That installs a local `context-xray` command plus Codex/Claude skills and slash
commands. It does not need hosted auth or a remote MCP connector to read local
transcript files.

Use `--scope project` when you only want project `.agents` skill and command
artifacts added to the current repo.

## Run

Current or most recent local thread:

```bash
context-xray --open
```

Recent thread picker:

```bash
context-xray threads --open
```

Weekly trends:

```bash
context-xray trends --since 7d --open
```

`--open` opens the generated local HTML file directly in the browser; it does
not keep a background server running.

After running, summarize the report link, sessions analyzed, largest context
buckets, warnings, and concrete optimizations.
````

- Previous: [design-exploration](https://syn4pse.dev/terminal/builderio-design-exploration.md)
- Next: [content](https://syn4pse.dev/terminal/builderio-content.md)
- [Terminal](https://syn4pse.dev/terminal.md)
- [Suggest a change](mailto:terminal@syn4pse.dev?subject=Terminal%20suggestion)
