How to Enable i-have-adhd Always-On Mode for Claude Code, OpenCode, and Other Runtimes
Create a flag file named .i-have-adhd-always in your runtime's configuration directory to automatically inject ADHD-friendly rules into every AI response.
The ayghri/i-have-adhd repository provides a skill system that adapts AI interactions for ADHD users by restructuring responses for clarity and focus. Enabling always-on mode ensures the ruleset prepends every conversation without manual activation commands. This guide covers the exact file paths, shell commands, and hook mechanisms needed for Claude Code, Codex, OpenCode, Pi, and OMP runtimes.
How the Always-On Flag Works
All supported runtimes share a session-start hook that checks for the presence of a flag file at startup. When the runtime initializes, the hook looks for .i-have-adhd-always in the configuration directory.
If the flag file exists, the hook executes the following sequence:
- Locates
skills/i-have-adhd/SKILL.mdin the repository - Strips any YAML front-matter from the skill definition
- Writes the banner
ADHD MODE ACTIVE (always‑on). The ruleset below applies to every response.to stdout - Appends the full ruleset to the system prompt for that session
If the flag file is absent, the hook exits silently and the skill remains disabled.
The repository provides two hook implementations with identical logic. The Node.js version in hooks/always-on.mjs serves as the primary path for Claude Code, Codex, and modern environments. The POSIX shell fallback in hooks/always-on.sh handles systems without Node.js available.
Runtime-Specific Activation Steps
Each runtime expects the flag file in a specific configuration directory. The hook invocation method varies by platform.
Claude Code and Codex
Claude Code and Codex use the ~/.claude directory by default, or $CLAUDE_CONFIG_DIR if the environment variable is set. The Node hook referenced in hooks/hooks.json executes automatically on every session start.
Enable always-on mode with these commands:
# Determine the config directory
CLAUDE_DIR="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
# Create the empty flag file
touch "$CLAUDE_DIR/.i-have-adhd-always"
Once created, the hook fires on every session initialization, injecting the ruleset before the model generates responses.
OpenCode
OpenCode stores its configuration in ~/.config/opencode by default. The platform uses a dedicated plugin at .opencode/plugins/i-have-adhd.mjs that mirrors the Node hook logic but checks the OpenCode-specific flag location.
Activate the skill with:
OPENCODE_DIR="${OPENCODE_CONFIG_DIR:-$HOME/.config/opencode}"
touch "$OPENCODE_DIR/.i-have-adhd-always"
The plugin automatically reads this flag and prepends the ADHD ruleset to the system prompt for every interaction.
Pi and OMP
Pi and OMP reuse Claude's configuration structure. Both runtimes load the hook through their respective extension manifests—Pi via package.json and OMP through extensions/i-have-adhd.ts.
Since these platforms share the ~/.claude directory, use the same command as Claude Code:
touch "$HOME/.claude/.i-have-adhd-always"
The TypeScript entry point in extensions/i-have-adhd.ts imports the hook logic and respects the identical flag path.
Disabling Always-On Mode
You can suspend the skill using two methods:
- Temporary disablement: Issue the command "stop adhd mode" or "normal mode" during a conversation. The hook respects these instructions and skips injection for that specific turn.
- Permanent disablement: Delete the flag file:
rm "$HOME/.claude/.i-have-adhd-always"
# Or for OpenCode:
rm "$HOME/.config/opencode/.i-have-adhd-always"
Custom Implementation for Unsupported Runtimes
Certain runtimes—including Gemini, Qwen, and Kimi—do not ship with built-in hooks. These platforms expose the skill only as an on-demand command rather than an always-on feature.
To achieve persistent injection on unsupported runtimes, create a wrapper script that mimics the hook behavior:
# Create the wrapper script in your runtime's config directory
cat <<'EOF' > "$HOME/.config/<runtime>/i-have-adhd-always"
#!/usr/bin/env sh
FLAG="$HOME/.config/<runtime>/.i-have-adhd-always"
if [ -f "$FLAG" ]; then
cat "$(dirname "$0")/../skills/i-have-adhd/SKILL.md"
fi
EOF
chmod +x "$HOME/.config/<runtime>/i-have-adhd-always"
Configure your runtime to prepend the output of this script to its system prompt. The principle remains consistent: check for the flag file, dump the skill content, and expose it to the model every turn.
Key Source Files Reference
Understanding the codebase helps with debugging and customization:
hooks/always-on.mjs: Node-based SessionStart hook that reads the flag and loadsSKILL.mdhooks/always-on.sh: POSIX fallback implementation for environments lacking Node.jshooks/hooks.json: Declares the startup command that Claude Code and Codex executeskills/i-have-adhd/SKILL.md: The authoritative 10-rule skill definition file.opencode/plugins/i-have-adhd.mjs: OpenCode-specific plugin implementing the same flag-check logicextensions/i-have-adhd.ts: TypeScript entry point for Pi and OMP extensions
Summary
- Create
.i-have-adhd-alwaysin your runtime's config directory to enable persistent injection - Claude Code, Codex, Pi, and OMP use
~/.claude/.i-have-adhd-always - OpenCode uses
~/.config/opencode/.i-have-adhd-always - The Node hook (
hooks/always-on.mjs) handles modern runtimes while the shell script (hooks/always-on.sh) provides legacy support - Remove the flag file to disable always-on mode permanently, or use voice commands to pause it temporarily
Frequently Asked Questions
What happens if I create the flag file while a session is already running?
The hook executes at session start. If you create .i-have-adhd-always during an active session, the skill will not activate until you start a new conversation or restart the runtime. The change does not apply retroactively to existing contexts.
Can I use different rule sets for different runtimes?
Yes. While the flag mechanism is standardized, each runtime loads SKILL.md from its own installation path. You can maintain separate clones of the repository with modified SKILL.md files, or use symbolic links to point different runtimes to different skill definitions while keeping the flag files in their respective config directories.
Why doesn't the skill activate in Gemini, Qwen, or Kimi?
These runtimes lack the session-start hook infrastructure present in Claude Code and OpenCode. They expose i-have-adhd only as a manual command or snippet. To enable always-on behavior, you must implement the custom wrapper script described in the unsupported runtimes section and configure your system prompt manually.
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 →