How to Install i-have-adhd for OpenCode: Complete Setup Guide

Install i-have-adhd for OpenCode by cloning the repository, registering the plugin in opencode.json, and invoking the /i-have-adhd slash command to activate ADHD-friendly formatting rules on demand.

The ayghri/i-have-adhd repository provides a specialized OpenCode plugin that injects structured markdown rules designed for ADHD-friendly communication. This server plugin registers the skill's ruleset and exposes both an on-demand slash command and an optional always-on mode for continuous assistance.

How the i-have-adhd Plugin Works

The plugin operates from .opencode/plugins/i-have-adhd.mjs and functions as a bridge between OpenCode and the skill definitions stored in skills/i-have-adhd/SKILL.md. When activated, the plugin reads the canonical ruleset, strips the frontmatter, and injects the body into your session context.

The implementation supports two distinct operational modes:

  • On-demand mode: The plugin updates config.skills.paths to include the skills directory and registers the /i-have-adhd command via commandDefinition(). When invoked, the ruleset remains active until you type stop adhd mode or normal mode.
  • Always-on mode: If the flag file ~/.config/opencode/.i-have-adhd-always exists, the plugin's experimental.chat.system.transform hook automatically prepends the ruleset to every system prompt without requiring manual activation.

Installation Prerequisites

  • OpenCode installed and accessible in your environment
  • Git for cloning the repository
  • Write access to ~/.config/opencode/ for global configuration

Step-by-Step Installation

Clone the Repository

First, clone the i-have-adhd repository to your preferred location. The standard location is within the OpenCode configuration directory:

git clone https://github.com/ayghri/i-have-adhd ~/.config/opencode/vendor/i-have-adhd

Register the Plugin in OpenCode Configuration

Create or edit your global OpenCode configuration file at ~/.config/opencode/opencode.json to include the plugin path:

{
  "plugin": [
    "/home/$(whoami)/.config/opencode/vendor/i-have-adhd/.opencode/plugins/i-have-adhd.mjs"
  ]
}

Note: If you run OpenCode directly from the cloned repository, the included root opencode.json already contains the plugin configuration, eliminating the need for manual edits.

Activate the Skill (On-Demand Mode)

Start a new OpenCode session and enable the skill manually:

opencode

Once the session begins, type:


/i-have-adhd

The ADHD formatting rules immediately take effect for the remainder of the session. To deactivate, enter either stop adhd mode or normal mode.

Enable Always-On Mode (Optional)

For persistent activation across all sessions without manual invocation, create the flag file:

touch ~/.config/opencode/.i-have-adhd-always

This triggers the plugin's transform hook to automatically inject the ruleset into every system prompt. To disable always-on mode, simply remove the flag:

rm ~/.config/opencode/.i-have-adhd-always

Verification Steps

Confirm successful installation by starting a fresh OpenCode session and typing / to list available commands. Verify that i-have-adhd appears in the command list. Test functionality by invoking /i-have-adhd and checking that the system acknowledges the mode change.

Key Files and Architecture

Understanding the plugin architecture helps with troubleshooting and customization:

  • .opencode/plugins/i-have-adhd.mjs: The core plugin logic that handles flag detection, config.skills.paths updates, and the experimental.chat.system.transform hook implementation.
  • skills/i-have-adhd/SKILL.md: The single source of truth containing all markdown rules. The plugin reads this file at runtime and injects its contents after stripping frontmatter.
  • ~/.config/opencode/.i-have-adhd-always: A sentinel file that toggles the always-on behavior when present.
  • opencode.json: The configuration file declaring the plugin path for OpenCode's startup sequence.

Summary

  • Clone the repository to ~/.config/opencode/vendor/i-have-adhd or your preferred location.
  • Register the plugin in ~/.config/opencode/opencode.json by adding the absolute path to .opencode/plugins/i-have-adhd.mjs.
  • Activate on demand by running /i-have-adhd in any OpenCode session, or enable permanently by creating ~/.config/opencode/.i-have-adhd-always.
  • Deactivate on-demand mode by typing stop adhd mode, or disable always-on by deleting the flag file.
  • Verify installation by checking for the /i-have-adhd command in the slash command menu.

Frequently Asked Questions

What does the i-have-adhd plugin actually modify in OpenCode?

The plugin modifies the session's skill paths and optionally transforms system prompts. According to the source code in .opencode/plugins/i-have-adhd.mjs, it updates config.skills.paths to include the skill directory and registers a commandDefinition() for the slash command. In always-on mode, it uses experimental.chat.system.transform to prepend the ruleset from skills/i-have-adhd/SKILL.md to every system prompt.

Can I use the skill without enabling always-on mode?

Yes. The default on-demand mode requires no persistent files beyond the initial plugin registration. Simply type /i-have-adhd when you need ADHD-friendly formatting, and type stop adhd mode to revert to standard behavior for that session only.

Where are the actual formatting rules stored?

All formatting rules live in skills/i-have-adhd/SKILL.md. The plugin reads this file dynamically at runtime, removes the YAML frontmatter, and injects the markdown body into your conversation context. This centralized location ensures consistency across all runtimes and update mechanisms.

Is the plugin compatible with other OpenCode plugins?

Yes. The plugin architecture in OpenCode supports multiple simultaneous plugins. The i-have-adhd plugin specifically adds its skill path to the existing config.skills.paths array rather than overwriting it, ensuring compatibility with other skill-based plugins you may have installed.

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:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →