How to Configure the .i-have-adhd-always Flag File for Claude Code

Create an empty file named .i-have-adhd-always in your Claude configuration directory (default ~/.claude) to enable automatic injection of ADHD-friendly rules at the start of every session.

The ayghri/i-have-adhd repository provides a Claude Code extension designed to optimize AI interactions for users with ADHD. When you configure the .i-have-adhd-always flag file, the system automatically prepends the full rule set from skills/i-have-adhd/SKILL.md to every session, eliminating the need to manually type the /i-have-adhd command.

How the Flag File Works

The always-on mechanism relies on a SessionStart hook located in hooks/always-on.sh. At lines 9-14, the script checks for the existence of .i-have-adhd-always inside the configuration directory. If the file exists, the hook strips any YAML front-matter from skills/i-have-adhd/SKILL.md and prints the rules before the assistant generates its first response.

This opt-in approach ensures that users who want persistent ADHD-friendly formatting receive it automatically, while others can continue using the on-demand /i-have-adhd command.

Default Configuration Location

By default, the hook resolves the configuration directory using the CLAUDE_CONFIG_DIR environment variable. If this variable is unset, the script falls back to $HOME/.claude (as implemented in hooks/always-on.sh, line 9).

The flag file must reside directly in this directory, not in a subdirectory.

Enabling Always-On Mode

To activate persistent mode using the default configuration location, create the empty flag file:

touch ~/.claude/.i-have-adhd-always

Verify the file exists:

ls -l ~/.claude/.i-have-adhd-always

Once created, every new Claude Code session will automatically load the ADHD-friendly rules from skills/i-have-adhd/SKILL.md.

Disabling the Flag

To revert to on-demand behavior and require the /i-have-adhd command for each session, simply remove the flag file:

rm ~/.claude/.i-have-adhd-always

According to the installation documentation in INSTALL.md (lines 99-103), deleting this file immediately restores the default behavior without requiring a restart.

Custom Configuration Directories

If you use a non-standard configuration location, set the CLAUDE_CONFIG_DIR environment variable and place the flag file accordingly:

export CLAUDE_CONFIG_DIR=$HOME/.myClaudeConfig
touch $CLAUDE_CONFIG_DIR/.i-have-adhd-always

For Codex PI agents, the system respects the PI_CODING_AGENT_DIR environment variable instead. The installation script scripts/check_pi_extension.py (line 317) specifically creates the flag at Path(agent_dir, ".i-have-adhd-always") when this variable is defined:

export PI_CODING_AGENT_DIR=$HOME/.myPiAgent
touch $PI_CODING_AGENT_DIR/.i-have-adhd-always

Runtime Session Overrides

Even when the .i-have-adhd-always flag file exists, you can temporarily disable the mode for the current session by issuing the command "stop adhd mode". The hook will still execute, but the assistant respects the runtime override until the session ends.

Summary

  • Create ~/.claude/.i-have-adhd-always (or $CLAUDE_CONFIG_DIR/.i-have-adhd-always) to enable automatic rule injection at session start.
  • Delete the file to return to manual /i-have-adhd command usage.
  • The hook checks CLAUDE_CONFIG_DIR first, falling back to $HOME/.claude for standard installations.
  • For Codex PI agents, use PI_CODING_AGENT_DIR as the target location.
  • Rules are sourced from skills/i-have-adhd/SKILL.md and processed by hooks/always-on.sh.
  • Temporary per-session overrides are available via the "stop adhd mode" command.

Frequently Asked Questions

What if I use a custom Claude Code configuration directory?

Set the CLAUDE_CONFIG_DIR environment variable to your preferred path, then create .i-have-adhd-always inside that directory. The hook in hooks/always-on.sh automatically checks this variable before defaulting to ~/.claude.

Does this flag work with Codex PI agents?

Yes. Codex PI installations use the PI_CODING_AGENT_DIR environment variable. The setup script scripts/check_pi_extension.py handles this at line 317, creating the flag file in the appropriate agent directory when the variable is present.

Can I temporarily disable always-on mode without deleting the file?

Yes. During any session where the flag is active, you can issue the command "stop adhd mode" to disable the rules for that specific conversation. The flag file remains in place for future sessions.

What file contains the actual rules that get injected?

The hook reads skills/i-have-adhd/SKILL.md from the repository, strips its YAML front-matter, and prepends the content to your session context. This file contains the complete ADHD-friendly interaction guidelines.

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 →