How to Set Up the OpenCode Plugin for i-have-adhd: Complete Installation Guide
To set up the OpenCode plugin for i-have-adhd, clone the repository to your OpenCode vendor directory, add the plugin path to your opencode.json configuration, and activate it with the /i-have-adhd command.
The i-have-adhd repository provides an OpenCode plugin that integrates ADHD-friendly response formatting directly into your AI coding assistant. This plugin, located at .opencode/plugins/i-have-adhd.mjs, registers a skill that shapes OpenCode's output to be more accessible for neurodivergent users. The setup process involves repository placement, configuration file updates, and optional persistent activation.
Install the i-have-adhd Plugin
The plugin requires cloning the repository to a location where OpenCode can reference it across all projects. The recommended location is within your OpenCode configuration directory.
Step 1: Clone the Repository
Use git clone to download the plugin to your OpenCode vendor directory:
git clone https://github.com/ayghri/i-have-adhd \
~/.config/opencode/vendor/i-have-adhd
This places the plugin source and associated files in a centralized location that survives individual project changes.
Step 2: Configure OpenCode to Load the Plugin
OpenCode loads plugins through the plugin array in your configuration file. Edit your global opencode.json at ~/.config/opencode/opencode.json to include the absolute path to the plugin module:
{
"plugin": [
"/home/you/.config/opencode/vendor/i-have-adhd/.opencode/plugins/i-have-adhd.mjs"
]
}
Replace /home/you with your actual home directory path. The plugin file .opencode/plugins/i-have-adhd.mjs handles three responsibilities:
- Registers
skills/i-have-adhd/as a skill path inconfig.skills.paths - Adds the
/i-have-adhdcommand for session-level activation - Implements an always-on transform that conditionally injects the ruleset
Alternatively, the repository root contains an opencode.json file pre-configured with the plugin reference. You can launch OpenCode directly from the checkout if you prefer not to modify your global configuration.
Activate and Use the i-have-adhd Skill
Once configured, start a fresh OpenCode session to load the new plugin.
Session-Level Activation
Type the command to enable ADHD-friendly formatting for the current session:
/i-have-adhd
The skill remains active until you enter "stop adhd mode" or "normal mode". During active sessions, OpenCode processes your prompts according to the rules defined in skills/i-have-adhd/SKILL.md, which the plugin reads and injects into the system prompt.
Enable Always-On Mode
To automatically apply ADHD-friendly formatting at the start of every OpenCode session, create a flag file in your configuration directory:
touch ~/.config/opencode/.i-have-adhd-always
The plugin checks for this flag on initialization. When present, it appends the full ruleset from SKILL.md to the system prompt on every turn, functioning similarly to Claude Code's SessionStart hook. The flag location follows XDG Base Directory standards:
$XDG_CONFIG_HOME/opencode/.i-have-adhd-always(if set)~/.config/opencode/.i-have-adhd-always(default)
Disable always-on mode by removing the flag:
rm ~/.config/opencode/.i-have-adhd-always
Verify Your i-have-adhd Plugin Setup
Confirm successful installation through OpenCode's command interface:
- Start a new OpenCode session
- Type
/to trigger command autocomplete - Verify
i-have-adhdappears in the command list - Execute
/i-have-adhdand observe formatting changes in subsequent responses
If the command appears but produces no effect, verify the SKILL.md file exists at skills/i-have-adhd/SKILL.md relative to your plugin installation path.
Key Files and Their Functions
Understanding the plugin architecture helps with troubleshooting and customization:
.opencode/plugins/i-have-adhd.mjs— Core plugin implementing skill registration, command binding, and the always-on transform systemskills/i-have-adhd/SKILL.md— Ruleset source file containing the ADHD-friendly output guidelines that get injected into prompts.opencode/command/i-have-adhd.md— Command documentation displayed in OpenCode's autocomplete interfaceopencode.json(repository root) — Example configuration demonstrating proper plugin path structureINSTALL.md— Complete maintenance instructions including update and uninstall procedures
The plugin's transform logic in i-have-adhd.mjs specifically handles two activation paths: the explicit /i-have-adhd command for temporary sessions and the file-system flag check for persistent behavior.
Summary
- Install the i-have-adhd OpenCode plugin by cloning to
~/.config/opencode/vendor/i-have-adhd - Configure by adding the absolute path to
.opencode/plugins/i-have-adhd.mjsin youropencode.jsonpluginarray - Activate per-session with
/i-have-adhdor permanently withtouch ~/.config/opencode/.i-have-adhd-always - Deactivate session mode with "stop adhd mode" or always-on mode by deleting the flag file
- Verify through command autocomplete (
/) and observable response formatting changes
Frequently Asked Questions
Where does the i-have-adhd plugin store its configuration?
The plugin uses OpenCode's standard configuration directory at ~/.config/opencode/. The always-on flag lives directly in this directory as .i-have-adhd-always, while the skill definition is read from skills/i-have-adhd/SKILL.md relative to the plugin installation path. No additional configuration files are required.
Can I use the i-have-adhd plugin without modifying my global OpenCode config?
Yes. The repository includes a root-level opencode.json that already references the plugin using a relative path. Navigate to the cloned directory and launch OpenCode from there to use the pre-configured setup without touching your global configuration.
What happens if both the flag file and the session command are active?
The plugin deduplicates ruleset injection. If the always-on flag exists when you run /i-have-adhd, the skill activates normally without duplicate content. Disabling via "stop adhd mode" only affects the session override—the flag file persists for future sessions.
How do I update the i-have-adhd plugin to the latest version?
Run git pull in your installation directory (typically ~/.config/opencode/vendor/i-have-adhd). The plugin loads fresh from source on each OpenCode start, so no restart or rebuild is required. Check INSTALL.md in the repository for version-specific migration notes.
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 →