Skip to content
Productivity
Skill

/xray

Explain what just happened under the hood — the context, MCP tools, and hooks behind Dex's last response — as AI education. Use when the user says 'how did you do that', 'what just happened', 'explain the mechanics'. Not for a system health check; use `dex-doctor`.

From plugin
davekilleen-dex
46191 skills28 agents24 commands
Install
$ npx -y skills add davekilleen/Dex --skill xray --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/xray

Context preview

The summary Claude sees to decide when to auto-load this skill.

Explain what just happened under the hood — the context, MCP tools, and hooks behind Dex's last response — as AI education. Use when the user says 'how did you do that', 'what just happened', 'explain the mechanics'. Not for a system health check; use `dex-doctor`.

SKILL.md

xray.SKILL.md
name: xray
description: "Explain what just happened under the hood — the context, MCP tools, and hooks behind Dex's last response — as AI education. Use when the user says 'how did you do that', 'what just happened', 'explain the mechanics'. Not for a system health check; use `dex-doctor`."

/xray - The AI Education Experience

**Default behavior:** Explain what just happened in THIS conversation — the specific tools, files, and context that were used, with educational explanations of WHY.

**With qualifiers:** Deep dive into specific topics (AI fundamentals, Dex architecture, how to extend).

---

Philosophy

The best way to learn is by examining what just happened, not abstract concepts. When you run `/xray`:

1. **Show the work** - What tools ran, what files were read/written 2. **Explain why** - Why each action was necessary 3. **Connect to concepts** - Link specific actions to how AI/Dex works 4. **Empower extension** - "You could customize this by..."

**The outcome:** Users learn AI by examining their own conversations, then go deeper if curious.

**Tone:** Like a senior engineer doing a code review of what just happened. "Here's what I did and why."

---

Step 1: Determine Mode

Default (no arguments): "This Conversation"

When user just says `/xray` with no qualifier: → **Immediately explain what happened in this conversation** → Don't show a menu, just show the work

With qualifiers: Specific topics

| Command | What it does | |---------|--------------| | `/xray` | (default) Explain what just happened in this chat | | `/xray ai` or `/xray fundamentals` | First principles: context windows, tokens, statelessness | | `/xray dex` or `/xray architecture` | How Dex works: CLAUDE.md, hooks, MCPs, skills | | `/xray boot` or `/xray session start` | The session startup sequence | | `/xray extend` or `/xray customize` | How to customize and build on Dex yourself |

---

DEFAULT MODE: This Conversation (Show Your Work)

**This is the primary mode.** When user runs `/xray`, explain what happened.

Step 1: Analyze the conversation

Look at the current conversation and identify: 1. What files were read 2. What files were written/modified 3. What tools/MCPs were used 4. What context was loaded at session start (check for `<previous_session_memories>` etc.) 5. Key decision points in the AI's reasoning

Step 2: Present as educational walkthrough

Output format:

## 🔬 X-Ray: What Just Happened

Let me explain what happened under the hood in our conversation.

---

### 📖 The Story of This Chat

Here's what I did, step by step:

**1. Session Started**
Before you typed anything, the system loaded:
- `CLAUDE.md` (~X tokens) — My personality, your preferences, available tools
- Session memories from earlier today — [list what was injected]
- [Any other context visible from hooks]

**Why this matters:** Without those session memories, I'd have no idea about 
[specific context]. That came from a **session hook** that runs before you type.

**2. You Asked: "[summarize their first message]"**

To respond, I:
- Read `[file 1]` — Because [reason]
- Read `[file 2]` — To check [what]
- Used [tool/MCP] — To [action]

**Why these files?** Your CLAUDE.md tells me where to look. It says [quote relevant 
instruction]. Without those instructions, I wouldn't know your file structure.

**3. [Continue for each major exchange in the conversation]**

---

### 🔧 Tools Used This Session

| Tool | Times Used | What For |
|------|------------|----------|
| `read` | X | Reading vault files |
| `write` | X | Creating new content |
| `edit` | X | Updating existing files |
| `bash` | X | Running commands |
| [other tools] | X | [purpose] |

**Why tools matter:** Without tools, I can only generate text. Tools let me 
actually DO things — read your files, write new ones, check your calendar, etc.

---

### 💡 Key Insight: The Context Window

Everything I "know" right now is what's in the **context window**:

┌─────────────────────────────────────────────────┐ │ What I can see (the context window) │ ├─────────────────────────────────────────────────┤ │ ✓ CLAUDE.md (loaded at start) │ │ ✓ Session memories (injected by hooks) │ │ ✓ Our full conversation so far │ │ ✓ Every file I've read this session │ │ ✓ Every tool result I've received │ ├─────────────────────────────────────────────────┤ │ ✗ Files I haven't read │ │ ✗ Previous sessions (unless summarized) │ │ ✗ Anything not loaded into context │ └─────────────────────────────────────────────────┘


If something isn't in this window, I literally don't know it exists.

---

### 📁 Files Touched This Session

**Read (loaded into my context):**
- `[file]` — [why it was needed]
- [continue for each file]

**Written/Modified:**
- `[file]` — [what was created/changed]
- [continue for each file]

**Why this matters:** Every file I read uses "tokens" (space in the context 
window). I try to read only what's relevant, not everything.

---

### 🎓 Concepts You Just Saw in Action

| What Happened | The Underlying Concept |
|---------------|------------------------|
| I knew about earlier conversations | **Session hooks** inject context at start |
| I read CLAUDE.md first | **System prompt** loads before anything |
| I created files with tools | **Tools** let AI take action, not just talk |
| I followed your file conventions | **CLAUDE.md instructions** define your structure |
| I didn't know about [X] | **Context limitation** — only know what's loaded |

---

### 🔮 What You Could Customize

Based on what just happened:

**1. Add to CLAUDE.md**
If you want me to always [behavior], add it to your `USER_EXTENSIONS` block.

**2. Create a Skill**
If you do [this workflow] often, create a skill to automate it.

**3. Add a Session Hook**
If you always want [context] loaded at start, write a hook that injects it.

---
Read more
Ships withdavekilleen-dex

A personal operating system powered by Claude. Strategic work management, meeting intelligence, relationship tracking, daily planning — all configured for your specific role. No coding required.

Get the whole plugin

Other skills on davekilleen-dex.