# How API Routes Are Structured in the i-have-adhd Project

> Explore the unique command-based API routes in the i-have-adhd project. Learn how it uses skill plugin interfaces and specific prefixes for Claude Code and Codex.

- Repository: [Ayoub Ghriss/i-have-adhd](https://github.com/ayghri/i-have-adhd)
- Tags: api-reference
- Published: 2026-07-30

---

**The i-have-adhd repository implements command-based API routes through skill plugin interfaces rather than traditional HTTP endpoints, using `/i-have-adhd` for Claude Code and `$i-have-adhd` for Codex.**

The i-have-adhd project by ayghri is not a conventional web service with REST API routes defined in directories like `pages/api` or `routes`. Instead, it functions as a **skill plugin** that integrates with coding assistant platforms, exposing its functionality through **command-style entry points** that the host applications recognize and execute.

## Command-Based API Architecture

Unlike standard web applications that expose API routes via HTTP verbs and URL paths, this repository defines its interface through **chat and terminal commands**. The "API routes" are literally the commands you type to invoke the skill.

### Claude Code Integration

When using **Claude Code**, the entry point is triggered by typing the command in the chat interface:

```text
/i-have-adhd

```

The host application captures this command and routes the user's prompt to the skill logic defined in the configuration files.

### Codex Integration

For **Codex**, the invocation follows a terminal-like syntax:

```text
$i-have-adhd

```

This command-style route signals the Codex environment to load the skill and process the request according to the rules specified in the plugin configuration.

## Core Configuration Files

The API route behavior is defined in three key files that register and configure the skill:

### Skill Definition

The file **[`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md)** contains the core rule set that shapes all outputs. This markdown file defines the **action-first formatting**, **numbered steps**, and **no-tangents policy** that characterize the skill's responses.

### Platform Registration

Two JSON files handle the plugin registration for their respective platforms:

- **[`.codex-plugin/plugin.json`](https://github.com/ayghri/i-have-adhd/blob/main/.codex-plugin/plugin.json)** – Registers the skill with the Codex environment, mapping the `$i-have-adhd` command to the skill execution logic.

- **[`.claude-plugin/marketplace.json`](https://github.com/ayghri/i-have-adhd/blob/main/.claude-plugin/marketplace.json)** – Registers the skill with Claude Code, enabling recognition of the `/i-have-adhd` chat command.

## How the Skill Interface Works

When you invoke either command, the host agent (Claude Code or Codex) loads the skill and passes your prompt to the execution logic. The skill then returns a formatted response based on the rules in [`SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/SKILL.md) rather than returning JSON over HTTP.

This architecture means:

- **No HTTP verbs** are used (no GET, POST, or DELETE).
- **No request parameters** exist in a URL structure.
- **No route files** are present in traditional backend directories.
- **Execution happens inside the host agent**, not on a remote server.

## Summary

- The i-have-adhd project uses **command-based API routes** instead of HTTP endpoints.
- **Claude Code** users trigger the skill with `/i-have-adhd` in the chat interface.
- **Codex** users invoke the skill with `$i-have-adhd` in the terminal interface.
- Configuration resides in **[`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md)**, **[`.codex-plugin/plugin.json`](https://github.com/ayghri/i-have-adhd/blob/main/.codex-plugin/plugin.json)**, and **[`.claude-plugin/marketplace.json`](https://github.com/ayghri/i-have-adhd/blob/main/.claude-plugin/marketplace.json)**.
- The skill executes within the host coding assistant, eliminating the need for traditional web server routing.

## Frequently Asked Questions

### Does i-have-adhd expose REST API routes?

No, the repository does not expose REST API routes. According to the source code analysis, it contains no `pages/api` or `routes` directories. Instead, it exposes functionality through command-style invocations (`/i-have-adhd` or `$i-have-adhd`) that are processed internally by the host coding assistant platforms.

### How do I call the i-have-adhd API in Claude Code?

Type `/i-have-adhd` directly in the Claude Code chat interface. This command acts as the API endpoint, triggering the skill to process your request and return formatted output based on the rules defined in [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md).

### What file determines how the i-have-adhd API responds?

The **[`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md)** file contains the behavioral rules that govern all API responses. It specifies action-first formatting, numbered step structures, and prohibition of tangents, effectively serving as the API contract for how the skill formats its output.

### Is i-have-adhd a standalone web service?

No, i-have-adhd is not a standalone web service. It is a **skill plugin** designed to be loaded by coding assistant platforms like Claude Code and Codex. It executes inside the host agent's environment and does not run an independent HTTP server or expose network-accessible endpoints.