How to Integrate ADHD into Claude Code, Cursor, or Other Agents via Skill Installation
ADHD integrates into Claude Code, Cursor, and other LLM agents as a portable skill installed via npx skills add UditAkhourii/adhd, which auto-detects your environment and deploys the divergent-convergent reasoning prompt to the appropriate directory.
The ADHD repository (UditAkhourii/adhd) ships a universal skill that implements a two-phase reasoning architecture—parallel divergent generation followed by a critic-based convergence pass. By installing this skill, agents gain the ability to break anchoring bias and explore multiple cognitive frames before settling on solutions for complex ideation tasks.
What is the ADHD Skill?
The skill lives in skills/adhd/SKILL.md and contains the full orchestration prompt that implements isolated generation frames followed by a separate critic pass. According to the source code, the skill launches N parallel LLM calls, each seeded with a distinct cognitive frame to explore different angles of a problem simultaneously. After generation, a separate critic call scores ideas for novelty, viability, and trap detection, then clusters and deepens the top-K survivors.
This architecture eliminates the single-shot chain-of-thought limitations and provides richer, more novel outputs than standard prompting approaches.
Installation Methods
Universal Auto-Detection
The fastest way to integrate ADHD is using the universal skills CLI, which inspects your current environment and picks the appropriate target directory automatically:
npx skills add UditAkhourii/adhd
The CLI detects supported agents—including Claude Code, Cursor, Antigravity, Codex, Cline, Continue, Aider, Gemini CLI, and Windsurf—and drops the SKILL.md file into the correct location (e.g., ~/.claude/skills/adhd for Claude Code or ~/.codex/skills/adhd for Codex).
Agent-Specific Targeting
If the universal command cannot auto-detect your agent, or you need to force a specific target, use the -a flag:
npx skills add UditAkhourii/adhd -a claude-code -g
The -g flag installs globally to ~/.claude/skills/adhd, while omitting it installs to the local project directory (.claude/skills/adhd). You can target multiple agents simultaneously: -a claude-code -a cursor.
Manual Installation
As a fallback, you can manually fetch the raw skill file and place it in your agent's skill directory:
mkdir -p .claude/skills/adhd
curl -fsSL https://raw.githubusercontent.com/UditAkhourii/adhd/main/skills/adhd/SKILL.md \
-o .claude/skills/adhd/SKILL.md
Common target paths include:
- Claude Code:
~/.claude/skills/adhd/or./.claude/skills/adhd/ - Codex:
~/.codex/skills/adhd/ - Cursor:
.cursor/skills/adhd/
After placing the file, restart your agent to load the new skill.
How the Skill Works
Once installed, the skill auto-triggers on ideation-type intents (brainstorm, design, naming, refactor, etc.) or can be invoked manually with a slash command:
/adhd "design a rate limiter that survives a leader election"
The implementation in skills/adhd/SKILL.md orchestrates a divergent-then-convergent loop:
- Divergent Phase: Launches parallel generation calls with distinct cognitive frames to explore the solution space without cross-contamination
- Critic Phase: A separate pass evaluates outputs for novelty, viability, and potential traps, then clusters similar ideas and selects the top-K candidates for deepening
This separation prevents early anchoring and ensures comprehensive coverage of the problem space.
Programmatic Integration
Claude Agent SDK
For custom agents built with the Claude Agent SDK, read the skill file and append it to the system prompt:
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"],
},
})) {
console.log(m);
}
Node/TS Library
Install the package directly to run the divergence-focus loop in your own code without an agent:
npm install adhd-agent
Then import the engine:
import { run, renderText } from "adhd-agent";
const result = await run({
problem: "How should we shard this queue under bursty load?",
framesPerRun: 5,
topK: 3,
});
console.log(renderText(result));
The core implementation resides in src/index.ts and src/engine.ts, exposing the same framing and critic logic used by the skill version.
Standalone CLI
You can also use ADHD as a standalone CLI tool without any agent:
npm install -g adhd-agent
adhd "design a rate limiter that survives a leader election"
Summary
- ADHD installs as a skill via
npx skills add UditAkhourii/adhd, auto-detecting Claude Code, Cursor, and other agents - The skill file at
skills/adhd/SKILL.mdimplements a two-phase divergent-then-convergent reasoning loop with parallel cognitive frames - Target specific agents using
-aflags (e.g.,-a claude-code) or install manually viacurlto the agent's skill directory - Programmatic access is available through the Claude Agent SDK (appending to
systemPrompt), the Node/TS library (adhd-agent), or the global CLI - Invoke manually with
/adhd "<problem>"or let it auto-trigger on ideation intents after restarting your agent
Frequently Asked Questions
Where is the actual skill prompt located in the repository?
The skill prompt is located at skills/adhd/SKILL.md in the UditAkhourii/adhd repository. This file contains the complete orchestration logic for the divergent generation frames and the critic-based convergence pass.
Can I use ADHD without installing it as a skill in an agent?
Yes. You can install adhd-agent as a global CLI (npm install -g adhd-agent) or as a Node.js library (npm install adhd-agent) to run the divergence-focus loop directly in your own applications without any agent integration.
How does ADHD prevent anchoring bias compared to standard chain-of-thought?
ADHD prevents anchoring by using isolated generation frames—parallel LLM calls seeded with distinct cognitive perspectives that cannot see each other's outputs during the initial generation phase. Only after all frames complete does a separate critic pass evaluate and cluster the results, eliminating the sequential bias inherent in single-shot CoT approaches.
What agents are supported by the universal npx skills installer?
The universal installer supports Claude Code, Cursor, Antigravity, Codex, Cline, Continue, Aider, Gemini CLI, and Windsurf. If your agent is not auto-detected, use the -a flag to specify it explicitly or perform a manual installation by copying SKILL.md to the agent's skill directory.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →