> ## Documentation Index
> Fetch the complete documentation index at: https://adhd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# The Agent Skill

> How the runnable SKILL.md behaves inside your agent — the pre-flight gate, the loop, the output shape, and calibration.

The skill (`skills/adhd/SKILL.md`) gives you the full diverge → score → cluster → deepen loop **inside your agent, with no install beyond the skill file** — the agent itself runs the frames via parallel Agent/Task tool calls.

Install it with `npx skills add UditAkhourii/adhd` (see [Installation](/installation)), then invoke:

```text theme={null}
/adhd "design a rate limiter that survives a leader election"
```

## The pre-flight gate

The skill is expensive — about 10 Agent calls, 30 to 90 seconds wall clock, 5 to 10× a single answer. So it runs a gate before doing anything:

<Steps>
  <Step title="Explicit invocation check">
    If you typed `/adhd`, asked for "ADHD mode", or said "run ADHD on this", the gate is **skipped entirely**. You opted in; the skill does not second-guess you.
  </Step>

  <Step title="Self-judge (auto-trigger only)">
    Otherwise the agent asks itself three questions, and aborts to a direct answer if any is "no":

    1. **Open-ended?** Would a senior engineer give multiple viable answers, or is there one canonical answer?
    2. **High-stakes?** Is the cost of the obvious answer being wrong actually high? Architecture decisions, public API surfaces, naming a real product, fuzzy bugs, schema design = yes. Side project at 11pm = no.
    3. **Open phrasing?** Words like *"quick"*, *"standard"*, *"canonical"*, *"textbook"*, *"just"*, or *"one-line"* signal you want the direct answer — the skill steps aside.
  </Step>
</Steps>

When the gate aborts, the agent answers directly and may append one sentence pointing you at `/adhd <your problem>` if you want the wider exploration.

## What the skill does

Two strict phases — see [How it works](/concepts/how-it-works) for the full mechanism:

1. **Diverge.** Picks 5 frames from the [frame library](/concepts/frames) (biased toward engineering tags for code-shaped problems, always at least one wild frame), then spawns 5 **parallel, isolated** Agent calls. Each generator is told: generate 6 short distinct ideas under this frame, the first three obvious answers are banned, do not evaluate or rank, JSON array only.
2. **Focus.** Scores every idea on `novelty / viability / fit`, flags traps with one-line reasons, clusters by underlying angle, and deepens the top 3 by weighted score (novelty 0.35 + viability 0.40 + fit 0.25, traps excluded).

<Warning>
  The Agent calls must be **parallel and isolated** — never serialized, never passing one branch's output as context to another. Branches that see each other anchor each other, and the whole method collapses to a wider single thought.
</Warning>

## Output shape

The skill renders results in a fixed order — the structure is the point:

1. **Brief.** One or two lines confirming the problem and any reframe used.
2. **Wide set.** The full pool grouped by cluster, each cluster labeled by underlying angle, each idea one short phrase with score chips like `[N7 V8 F9]`.
3. **Converge.** A 2–4 idea shortlist with reasons, the non-obvious-but-viable pick marked with ★, and traps listed separately with one-line reasons.
4. **Focus.** The 3 deepened branches: sketch, load-bearing risk, first concrete step, child ideas.
5. **Provocation.** One wildcard question or idea that opens a new direction if nothing landed.

## Calibration

* **How many ideas?** Scale to stakes. Quick "name this function" = 3 frames × 4 ideas. "How should I position this product" = 5 frames × 8 ideas. Default is 5 × 6 = 30.
* **How weird?** Read the room. Serious strategy work: wild cards are flagged clearly so they don't read as unserious. Open brainstorming: it runs loose. Absurd ideas earn their place by seeding viable ones.
* **When to stop diverging?** When new candidates start repeating the shape of existing ones, the space is mapped — no padding to hit a number.

## Cost

5 diverge + 1 score + 1 cluster + 3 deepen ≈ **10 Agent calls per run** — about 5 to 10× a single-shot answer, and higher inside a heavy Claude Code session because every branch re-loads your base context (see [the honest cost formula](/concepts/when-to-use#cost--speed)). Not for every keystroke. For decision points where the cost of the obvious answer is high.

## Companion library and CLI

A Node/TS implementation does the same loop with structured JSON parsing, score weighting, and a CLI — use it outside your agent or in batch:

```bash theme={null}
npm install -g adhd-agent
adhd "your problem here"
```

See the [CLI reference](/usage/cli) and [Library reference](/usage/library).
