# How to Install UditAkhourii/adhd: Three Methods for Agents, CLI, and Library

> Install UditAkhourii adhd using three easy methods: npx for agents, npm for CLI, or npm import for library integration. Get started now.

- Repository: [Udit Akhouri/adhd](https://github.com/UditAkhourii/adhd)
- Tags: getting-started
- Published: 2026-07-30

---

**Run `npx skills add UditAkhourii/adhd` to register the ADHD skill with your agent, `npm install -g adhd-agent` for standalone CLI usage, or import `{ run } from "adhd-agent"` to embed the divergent-convergent ideation engine directly in your Node.js application.**

The **UditAkhourii/adhd** repository provides a reusable skill that implements a two-phase divergent-then-convergent ideation algorithm for Claude-Code compatible agents. Learning how to install UditAkhourii/adhd allows you to access this brainstorming framework as a skill, command-line tool, or TypeScript library depending on your workflow.

## Method 1: Install as a Universal Agent Skill

The simplest way to install UditAkhourii/adhd uses the universal skill registry. This method copies the [`SKILL.md`](https://github.com/UditAkhourii/adhd/blob/main/SKILL.md) definition from [`skills/adhd/SKILL.md`](https://github.com/UditAkhourii/adhd/blob/main/skills/adhd/SKILL.md) into your agent’s skill directory and registers the command `/adhd`.

Run the following command to install automatically:

```bash
npx skills add UditAkhourii/adhd

```

This command detects your current agent—whether Claude Code, Cursor, Antigravity, Codex, Cline, Gemini CLI, Windsurf, or others—and places the skill file in the appropriate location. For example, Codex stores skills in `~/.codex/skills/adhd`.

If automatic detection fails, specify the agent explicitly:

```bash
npx skills add UditAkhourii/adhd -a codex -g

```

Alternatively, install manually by downloading the skill definition directly:

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

```

After installation, restart your agent and invoke the skill with `/adhd "your prompt here"`.

## Method 2: Install the ADHD CLI Tool

For terminal-based usage without an agent runtime, install the `adhd-agent` npm package globally. This provides the `adhd` command defined in [`src/cli.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/cli.ts) and exported via the `bin` field in [`package.json`](https://github.com/UditAkhourii/adhd/blob/main/package.json).

Install globally with:

```bash
npm install -g adhd-agent

```

Or install locally within a project:

```bash
npm install adhd-agent

```

The CLI forwards arguments to the library’s `run()` function, executing the full two-phase loop including frame generation, scoring, clustering, and deepening. Usage looks like:

```bash
adhd "design a rate limiter for a distributed system"
adhd "optimize cache eviction policy" --frames 4 --ideas 10 --top 3

```

## Method 3: Install as a Programmatic Library

To embed the algorithm directly into your application, install the package as a dependency and import the public API from [`src/api.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/api.ts).

First, install the package:

```bash
npm install adhd-agent

```

Then import the `run` and `renderText` functions:

```typescript
import { run, renderText } from "adhd-agent";

async function generateIdeas() {
  const result = await run({
    problem: "Create a zero-downtime deployment strategy",
    framesPerRun: 6,
    topK: 2,
  });

  console.log(renderText(result));
  console.log("Best pick:", result.nonObviousPick);
}

```

The `run()` function returns a structured result object containing:

- `shortlist`: Raw ideas from each frame
- `nonObviousPick`: The top-scoring novel idea
- `traps`: Flagged risky ideas with explanations
- `deepened`: Expanded plan for the chosen idea
- `clusters`: Grouping of related concepts

This implementation exposes the generator-critic architecture that powers the divergent-then-convergent loop according to the repository’s [`SOURCE-SPEC.md`](https://github.com/UditAkhourii/adhd/blob/main/SOURCE-SPEC.md).

## Summary

- **Universal skill registration** uses `npx skills add UditAkhourii/adhd` to install [`skills/adhd/SKILL.md`](https://github.com/UditAkhourii/adhd/blob/main/skills/adhd/SKILL.md) into your agent’s directory, enabling `/adhd` commands.
- **CLI installation** via `npm install -g adhd-agent` provides the `adhd` binary that wraps [`src/cli.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/cli.ts) for terminal-based execution.
- **Library integration** through `npm install adhd-agent` exposes the `run()` and `renderText()` functions from [`src/api.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/api.ts) for custom Node.js applications.

## Frequently Asked Questions

### Which agents support the UditAkhourii/adhd skill?

The skill works with any Claude-Code compatible agent, including Claude Code, Cursor, Antigravity, Codex, Cline, Gemini CLI, and Windsurf. The `npx skills add` command automatically detects the host environment and installs to the appropriate skill directory.

### Can I run the ADHD tool without installing an agent?

Yes. Install the `adhd-agent` package globally using `npm install -g adhd-agent` to use the `adhd` command directly from your terminal. This CLI implementation requires no agent runtime and executes the same algorithm defined in [`src/api.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/api.ts).

### Where is the skill definition file located?

The skill definition resides at [`skills/adhd/SKILL.md`](https://github.com/UditAkhourii/adhd/blob/main/skills/adhd/SKILL.md) in the repository. This YAML-style file contains the runnable skill definition that agents load when you register the tool using the universal installer.

### What parameters does the run() function accept?

According to [`src/api.ts`](https://github.com/UditAkhourii/adhd/blob/main/src/api.ts), the `run()` function accepts an options object including `problem` (string), `framesPerRun` (number), and `topK` (number). These control the ideation frames generated and how many top ideas survive the convergent phase.