Skip to content
Skills Library
AI & agents · Review & audit

context-xray

/context-xray

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.

Licence
MIT
Last repository change
27.10.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

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.

Original author 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.

How it works

  1. Actions
  2. System Sections
  3. Rules
  4. Typical Flow
Original SKILL.md headings · 64 lines, 518 words
SKILL.md preview
---
name: context-xray
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.
metadata:
  internal: true
---

# 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:

- `required` — framework/enterprise policy; can never be altered by the user.
- `inherited` — template/org/workspace instructions; managed elsewhere,
  visible here.
- `user` — personal instructions and memory; editable through Files.

System sections are display-only provenance: they cannot be pinned, evicted,
or summarized. The persisted manifest stores source refs, scope, content
hashes, token counts, and bounded previews (~200 chars) — never raw prompt
bodies; full content stays behind the resource/access model. The in-chat
X-Ray panel groups these under "System", and the Agent page Context tab
renders the full breakdown (via `context-preview-get`) with a
system-vs-conversation split meter. Manifests are the latest snapshot per
thread; there is no per-iteration history.

## Rules

- Never evict or summarize protected segments. The manifest marks active-turn
  user/tool/thinking context as `protected`.
- System sections are never evictable; required/inherited tiers are locked by
  design — do not present controls that imply otherwise.
- Prefer pinning the user's task, requirements, and decisions before evicting
  large stale tool results.
- Eviction excludes content from future model calls; it does not delete the
  canonical transcript or files.
- In external/advisory mode, be honest: recorded directives are intent for the
  host except for Agent-Native-originated content we can actually withhold.
- If token counts are estimated, describe reclaim as approximate.

## Typical Flow

1. Call `context-manifest-get` with the active `threadId`.
2. Sort segments by `tokenCount` and inspect large stale `Tool results` or
   `Files read` entries.
3. Call `context-pin` for essential specs or user instructions.
4. Call `context-evict` for large irrelevant segments.
5. Offer `context-restore` if the user wants undo.

Versions

The database has no other skills named context-xray.

Database snapshot: 13.11.2026 · package version 11421a8afd43 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100filesystem-context
    This skill should be used when the user asks to "offload context to files", "implement dynamic context discovery", "use filesystem for agent memory", "reduce context window bloat", or mentions file-based context management, tool output persistence, agent scratch pads, or…
  • 90context-engineering
    Engineer what enters the model's context window for reliability and cost using Write, Select, Compress, and Isolate. Use when: context engineering, context window budget, context rot, prompt caching, just-in-time retrieval, context compaction, sub-agent context isolation, tool output distillation.
  • 100check-context
    Accurately check current context window and token usage. Use when the user asks about context usage, token consumption, or when monitoring context levels.
  • 100bounded-output-design
    Cap every response so one tool call cannot fill an agent's context window. Use when a tool can return an unbounded list, a full file or a large body
  • 86context-watcher
    Inspects and compacts the active LLM context window, KV cache prefix, stale file reads, and noisy tool outputs via contextWatcher (`cw`). Use when context exceeds 80k tokens, health score drops, or the user asks to optimize/compact context.
  • 100context-window-management
    Decide what goes into an LLM's context window and what gets evicted - per-section token budgets, priority ordering and placement, trimming of tool outputs, rolling and structured summaries, retrieval-based long-term memory, and tests that compression keeps task-critical facts.…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.