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

# Installation

> Every way to install ADHD — agent skill, CLI, library, Agent SDK, and per-platform paths.

ADHD ships three ways: as an **agent skill** (works in Claude Code, Cursor, Antigravity, Codex, and \~50 more), as a **CLI**, and as a **Node/TS library**.

## One command, every agent

```bash theme={null}
npx skills add UditAkhourii/adhd
```

The [`skills`](https://github.com/vercel-labs/skills) CLI detects which agent you are using and drops `skills/adhd/SKILL.md` into the right place. Supports **Claude Code, Claude.ai, Antigravity, Cursor, Codex, Cline, Continue, Aider, Gemini CLI, Windsurf, Cody, Roo, Augment, OpenCode, Kilo, Kimi, Qwen, Trae, Replit, Warp**, and \~40 more.

Restart your agent. The skill auto-triggers on brainstorm, ideate, design, naming, refactor, and "give me a few ways to" intents. Or invoke it explicitly:

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

Useful flags:

```bash theme={null}
npx skills add UditAkhourii/adhd -g                         # install globally instead of per-project
npx skills add UditAkhourii/adhd -a claude-code -a cursor   # target specific agents
npx skills add UditAkhourii/adhd --copy                     # copy files instead of symlinking
npx skills add UditAkhourii/adhd --list                     # see what skills the repo offers
```

## Codex (OpenAI)

If the universal command auto-detects Codex correctly, you are done. Some Codex builds have stricter skill-discovery rules — force the target and install globally if you hit trouble:

```bash theme={null}
npx skills add UditAkhourii/adhd -a codex -g
```

Or install manually into Codex's skills directory:

```bash theme={null}
mkdir -p ~/.codex/skills/adhd
curl -fsSL https://raw.githubusercontent.com/UditAkhourii/adhd/main/skills/adhd/SKILL.md \
  -o ~/.codex/skills/adhd/SKILL.md
```

Restart Codex. Invoke with `/adhd "your problem"`.

<Note>
  **On description length:** the ADHD `SKILL.md` ships with a single-line description (≤600 chars) specifically because some Codex builds truncate or fail on multi-line YAML block-scalar descriptions. The full pre-flight gate logic lives in the body of the skill rather than the frontmatter for this reason. If you ever author your own skill and Codex refuses to load it, this is the first thing to check.
</Note>

## Manual install (no npx)

The skill file is at [`skills/adhd/SKILL.md`](https://github.com/UditAkhourii/adhd/blob/main/skills/adhd/SKILL.md). Curl it into your agent's skill directory:

<CodeGroup>
  ```bash Claude Code (global) theme={null}
  mkdir -p ~/.claude/skills/adhd
  curl -fsSL https://raw.githubusercontent.com/UditAkhourii/adhd/main/skills/adhd/SKILL.md \
    -o ~/.claude/skills/adhd/SKILL.md
  ```

  ```bash Claude Code (per-project) theme={null}
  mkdir -p .claude/skills/adhd
  curl -fsSL https://raw.githubusercontent.com/UditAkhourii/adhd/main/skills/adhd/SKILL.md \
    -o .claude/skills/adhd/SKILL.md
  ```

  ```bash Cursor (project rules) theme={null}
  curl -fsSL https://raw.githubusercontent.com/UditAkhourii/adhd/main/skills/adhd/SKILL.md >> .cursorrules
  ```
</CodeGroup>

**Claude.ai web/desktop:** open project settings → **Skills** → **Add skill** → upload `skills/adhd/SKILL.md`.

**Cline, Continue, Aider, Roo Code, and other agents:** paste the body of `SKILL.md` (skip the YAML frontmatter) into your agent's system prompt or rules field.

## Programmatic install (Agent SDK)

```ts theme={null}
import { query } from "@anthropic-ai/claude-agent-sdk";
import { readFileSync } from "node:fs";

const skill = readFileSync("./skills/adhd/SKILL.md", "utf8");

for await (const m of query({
  prompt: "design a retry strategy for a CLI whose LLM hangs for 90s",
  options: {
    systemPrompt: { type: "preset", preset: "claude_code", append: skill },
    allowedTools: ["Task"],
  },
})) {
  // …
}
```

## As a CLI (terminal usage, no agent needed)

```bash theme={null}
npm install -g adhd-agent
adhd "design a rate limiter that survives a leader election"
```

Auth: picks up `ANTHROPIC_API_KEY` from the environment, or inherits auth from a local Claude Code install.

## As a library (inside your own agent)

```bash theme={null}
npm install adhd-agent
```

```ts theme={null}
import { run } from "adhd-agent";
const result = await run({ problem: "...", framesPerRun: 5, topK: 3 });
```

See the [Library reference](/usage/library) for the full API.

## From source

```bash theme={null}
git clone https://github.com/UditAkhourii/adhd.git
cd adhd && npm install && npm run build
```
