# Context Xray

Inspect and manage the live agent context window with Context X-Ray.

- Repository: https://github.com/BuilderIO/agent-native (7579 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add BuilderIO/agent-native --skill context-xray -g -a claude-code -y`
Codex: `npx skills add BuilderIO/agent-native --skill context-xray -g -a codex -y`
Cursor: `npx skills add BuilderIO/agent-native --skill context-xray -g -a cursor -y`
Gemini CLI: `npx skills add BuilderIO/agent-native --skill context-xray -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add BuilderIO/agent-native`

## Description

Inspect and manage the live agent context window with Context X-Ray. Use when context is getting large, the user asks what is in context, or stale tool results/files should be pinned, evicted, restored, or reported by an external host.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Context X-Ray

Context X-Ray is the framework's context garbage-collection surface. It shows
the current thread's model-bound context as content-derived segments with token
counts, then lets the user or agent pin, evict, or restore individual segments.

## Actions

| Action | When to use |
| --- | --- |
| `context-manifest-get` | Read the current manifest for a thread. Returns token totals, segment status, source, and whether changes are enforceable. |
| `context-preview-get` | Compose the would-be system context for the current user/org/app without a live thread. Returns labeled system sections with provenance, governance tier, token counts, and bounded previews. Backs the Agent page Context tab. |
| `context-pin` | Preserve a segment across future compaction/model calls. Use for task specs, acceptance criteria, user constraints, and other durable context. |
| `context-evict` | Exclude a stale or irrelevant segment from future model calls. Eviction is reversible and never deletes chat history. |
| `context-restore` | Undo a pin, evict, or summarize directive for a segment. |
| `context-report` | External hosts can report their visible context inventory. These manifests are advisory unless Agent-Native owns the emitted content. |
| `context-compact` | Compact the thread now: fold every not-yet-compacted message into observational memory instead of waiting for the post-turn threshold. Takes effect on the next model call; the transcript is unchanged. |

## System Sections

Manifests now cover the system-prompt half of context, not just conversation
segments. Each system section carries a `provenance` label (framework-core,
actions-prompt, template, enterprise-workspace-core, sql-workspace,
legacy-app-default, organization, personal, memory, db-schema, tools,
model-overlay, runtime-context) and a `governance` tier:

The rest: https://github.com/BuilderIO/agent-native/blob/HEAD/.agents/skills/context-xray/SKILL.md
