How to Enable the i-have-adhd Always-On Hook in Claude Code
Create an empty flag file at ~/.claude/.i-have-adhd-always to automatically inject the ADHD ruleset into every Claude Code session via the SessionStart hook defined in hooks/hooks.json.
The ayghri/i-have-adhd repository extends Claude Code with specialized behavioral rules designed for ADHD users. Enabling the always-on hook ensures these rules persist across all sessions without requiring manual activation, leveraging Claude Code's SessionStart hook system to preload the skill's ruleset from SKILL.md at startup.
How the Always-On Hook Works
Claude Code executes a series of SessionStart hooks defined in [hooks/hooks.json](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json) whenever a new session begins. One of these hooks triggers [hooks/always-on.sh](https://github.com/ayghri/i-have-adhd/blob/main/hooks/always-on.sh), which performs the following checks:
- Flag File Detection - The script searches for a file at
$HOME/.claude/.i-have-adhd-always(path configurable via theCLAUDE_CONFIG_DIRenvironment variable) - Ruleset Injection - If the flag exists, the script reads [
skills/i-have-adhd/SKILL.md](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md), strips any YAML front-matter, and injects the content into the session - Banner Display - A confirmation banner prints to the terminal indicating that ADHD mode is active
If the flag file is absent, the script exits silently and the session starts normally without the ADHD ruleset.
Enabling the i-have-adhd Always-On Mode
To activate persistent ADHD mode across all Claude Code sessions, you must create the flag file that the startup script monitors.
Creating the Flag File
Run the following command in your terminal:
touch ~/.claude/.i-have-adhd-always
This creates an empty sentinel file at the default location. According to the repository's [README.md](https://github.com/ayghri/i-have-adhd/blob/main/README.md), this is the officially documented method for enabling always-on behavior.
Verifying Activation
Start a new Claude Code session:
claude code
Upon initialization, you will see a banner similar to:
ADHD MODE ACTIVE (always-on). The ruleset below applies to every response. "stop adhd mode" turns it off for this session; delete /home/youruser/.claude/.i-have-adhd-always to turn always‑on off for good.
<rules from SKILL.md>
This confirms that the SessionStart hook successfully loaded the skill's behavioral constraints.
Disabling ADHD Mode
You can disable the always-on behavior either temporarily for the current session or permanently by removing the flag file.
Stop for Current Session
To disable ADHD mode for a single session without deleting the flag file, type:
stop adhd mode
This command suppresses the ruleset for the current conversation only. The next time you launch Claude Code, the always-on hook will reactivate automatically.
Remove Permanently
To disable the always-on hook permanently, delete the flag file:
rm ~/.claude/.i-have-adhd-always
After removal, future Claude Code sessions will start normally without automatically loading the ADHD ruleset. You can still manually invoke the skill when needed.
Configuration Options
The default flag file location is $HOME/.claude/.i-have-adhd-always. However, as implemented in hooks/always-on.sh, you can override the base directory by setting the CLAUDE_CONFIG_DIR environment variable before launching Claude Code. If this variable is present, the script checks for .i-have-adhd-always within that directory instead.
Summary
- The always-on feature uses Claude Code's SessionStart hook system defined in
hooks/hooks.jsonto executehooks/always-on.shat startup - Enable permanently by running
touch ~/.claude/.i-have-adhd-alwaysto create the required flag file - The script loads rules from
skills/i-have-adhd/SKILL.mdand displays a confirmation banner when active - Disable temporarily by typing
stop adhd modeor permanently by removing the flag file withrm ~/.claude/.i-have-adhd-always - Customize the flag file location using the
CLAUDE_CONFIG_DIRenvironment variable
Frequently Asked Questions
How do I know if the i-have-adhd always-on hook is working?
When the hook is active, every new Claude Code session displays a banner stating "ADHD MODE ACTIVE (always-on)" followed by the injected ruleset from SKILL.md. If you do not see this banner upon starting Claude Code, the flag file is likely missing or located in the wrong directory.
Can I use a custom location for the always-on flag file?
Yes. While the default path is $HOME/.claude/.i-have-adhd-always, you can override the base configuration directory by setting the CLAUDE_CONFIG_DIR environment variable. The startup script checks for .i-have-adhd-always within whatever directory this variable specifies.
What happens if I delete the flag file while Claude Code is running?
Deleting the flag file only affects future sessions. The current session maintains its existing state. If ADHD mode was active when you started the session, it remains active until you type stop adhd mode or restart Claude Code without the flag file present.
Is the always-on hook available in all Claude Code versions?
The always-on functionality depends on Claude Code's SessionStart hook system, which executes scripts registered in hooks/hooks.json. As long as your Claude Code installation supports SessionStart hooks and the ayghri/i-have-adhd repository is properly installed in your hooks directory, the always-on feature will function as documented in the source code.
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 →