本文へスキップ
Skillpedia
エージェント7.6k · #13149

context-xray

できること

このスキルは、エージェントの現在のチャットのコンテキストの各部分を、それぞれがどれだけの場所を使っているかとともに示します。あなたやエージェントが、重要な部分を残し、古い部分を隠せます。長いチャットが遅くなったり混乱したりしている人向けです。

使う場面

  • ✓長いチャットが大きくなり、何が場所を取っているかを見たいとき。
  • ✓古いツールの結果やファイルが、もう関係なく、除外すべきとき。
  • ✓重要なタスクの仕様や制約を、チャット全体で保つ必要があるとき。

スキルのリンク

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

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/context-xray/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“このチャットがとても長くなりました。何が一番場所を取っているかを見せて、私のプロジェクトの要件を残してもらえますか?”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、チャットの各部分をそのサイズとともに一覧にします。あなたやエージェントは、部分を固定して残すか、今後の返信から隠せます。非表示にしてもチャットの履歴が削除されることはありません。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

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.
よくある質問

部分を隠すとチャットは削除されますか?

いいえ。非表示は元に戻せ、チャットの履歴は決して削除されません。

固定すると何が起きますか?

チャットがまとめられても落ちないように、その部分を後の返信を通して保持します。

変更を取り消せますか?

はい。セグメントを復元すると、固定、非表示、要約の変更が取り消されます。

詳細

作者による元の説明

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.

repo: BuilderIO/agent-native

人気

GitHubのスター
7.6k
ランキング
#13149
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル