> ## Documentation Index
> Fetch the complete documentation index at: https://subtext.fullstory.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Subtext Skills: Agent Workflows for Session Review

> Subtext skills are slash commands that teach your agent structured workflows — from reading the event map to explaining what happened in a session.

Subtext skills are slash commands you type in your agent's chat. Each skill injects a structured prompt that teaches your agent what tools exist, in what order to call them, and what constitutes a complete result. Instead of writing out a multi-step investigation request from scratch every time, you invoke a skill and your agent knows exactly what to do.

There are two kinds of skills: **workflow skills** and **atomic skills**. Workflow skills like `/subtext:review` describe an end-to-end task — open a session, zoom to the moments that matter, explain what happened. Atomic skills like `/subtext:shared` and `/subtext:session` are building blocks — they teach the agent a single layer of context (conventions, tool catalog, usage patterns) that workflow skills compose together.

***

## Workflow skills

Workflow skills are the ones you invoke directly to get something done.

### `/subtext:review`

The main session review workflow. When you invoke `/subtext:review`, your agent runs a complete investigation: it lists available sessions, opens the one you care about, reads the event map, zooms to the moments that matter, captures snapshots at key timestamps, and produces a plain-English explanation of what happened.

**How to invoke it:**

Type `/subtext:review` in your agent's chat, followed by enough context to identify the session or the problem. For example:

```
/subtext:review — check the session from the checkout failure this morning
```

The agent will:

1. Call `review-list-sessions` to find recent sessions and match against your description.
2. Call `review-open` on the best match, read the event map, and orient itself.
3. Call `review-summary` for a quick first pass.
4. Call `review-zoom` one or more times, narrowing in on the intervals the event map flagged as significant.
5. Call `review-snapshot` at key timestamps to capture visual evidence.
6. Produce an explanation — what the user did, what the application did in response, where it diverged from expected behavior, and a root-cause hypothesis.
7. Call `review-close` and record its conclusion.

**Sample agent conversation:**

```
You:    /subtext:review — the payment form is throwing a validation error
        that users are hitting, latest session

Agent:  I'll open the most recent session on the checkout page.
        [calls review-list-sessions]
        Found 3 sessions on /checkout from the past 2 hours.
        Opening the most recent one (recorded 14 minutes ago).
        [calls review-open → reads event map]
        The event map shows two payment attempts. The second one fired
        a `form:error` event at 01:02.4. Let me zoom in.
        [calls review-zoom with window 55000–75000ms, high resolution]
        The expiry field emitted a blur event with an empty value at
        01:01.8, 600ms before the error. Taking a snapshot.
        [calls review-snapshot at 62400ms]
        The snapshot shows the CheckoutForm with the expiry field
        highlighted in red and an inline message "Expiry date required."
        
        Root cause: The expiry field's required validation only triggers
        on blur, not on submit. When the user skips the field entirely and
        clicks Pay, blur never fires, the field stays invalid silently,
        and the submit handler produces the error without surfacing it
        until the second attempt.
        
        Suggested fix: add explicit validation in the submit handler for
        all required fields, not just on blur. See CheckoutForm.tsx:88.
        [calls review-close with conclusion]
```

<Tip>
  You don't need to specify a session ID. Describe the problem in natural language — "the error users hit on the pricing page yesterday afternoon" — and the agent will match it against the available sessions.
</Tip>

***

## Atomic skills

Atomic skills are the foundation that workflow skills are built on. You rarely invoke them directly, but understanding what they contain helps when you want to extend a workflow or debug why an agent isn't using tools correctly.

### `/subtext:shared`

The foundation skill. Every other skill depends on it. `/subtext:shared` teaches your agent the MCP conventions Subtext uses: how handles work, how to interpret return values, what error shapes to expect, and the security rules that govern what the agent is and isn't allowed to do with session data.

**When to invoke it directly:** If your agent seems confused about MCP conventions — ignoring return values, passing wrong argument types, or not respecting privacy rules — invoke `/subtext:shared` to re-establish the baseline.

```
/subtext:shared
```

<Accordion title="What /subtext:shared covers">
  * MCP handle lifecycle: how session handles are acquired, used, and released
  * Argument conventions: types, required vs optional parameters, error handling
  * Security rules: what data may be passed to external tools, what must stay local
  * Privacy baseline: form inputs are masked by default; the agent must not attempt to recover masked values
</Accordion>

***

### `/subtext:session`

The session replay atomic skill. `/subtext:session` teaches your agent the complete catalog of `review-*` tools — what each one does, when to reach for it, and usage patterns that keep investigations efficient.

**When to invoke it directly:** If your agent knows MCP conventions but is unsure which review tool to use for a given step, invoke `/subtext:session` to give it the tool-level context it needs.

```
/subtext:session
```

<Accordion title="What /subtext:session covers">
  * Full catalog of `review-*` tools with parameter descriptions and return shapes
  * Recommended call order for a full investigation
  * When to use `review-summary` vs `review-zoom` vs `review-snapshot`
  * Resolution and time-window guidance for `review-zoom`
  * How to interpret the event map returned by `review-open`
  * How sightmap enrichment changes snapshot output
</Accordion>

***

## How workflow and atomic skills relate

The `/subtext:review` workflow skill composes `/subtext:shared` and `/subtext:session`. When you invoke `/subtext:review`, the agent effectively gets all three layers of context at once:

```
/subtext:review
   └── /subtext:shared   (MCP conventions, security rules)
   └── /subtext:session  (review-* tool catalog, usage patterns)
   └── review workflow   (end-to-end investigation steps)
```

You can invoke the atomic skills independently to refresh a specific layer without running the full workflow. This is useful if you're building a custom harness and want to give your agent tool knowledge without prescribing a specific investigation flow.

<Note>
  Skills are delivered as MCP prompts, not system prompt injections. They are scoped to the conversation turn in which you invoke them — they don't persist across sessions automatically. If you start a new chat, invoke the skill again.
</Note>
