How to Use the ~/.claude/.i-have-adhd-always Flag for Persistent Activation

Creating an empty file at ~/.claude/.i-have-adhd-always automatically enables ADHD-friendly formatting rules on every Claude Code session startup without requiring manual activation commands.

The ayghri/i-have-adhd repository provides a Claude Code skill designed to format responses for ADHD accessibility. While the /i-have-adhd command works for individual sessions, the ~/.claude/.i-have-adhd-always flag enables persistent activation across all future sessions by leveraging the skill's SessionStart hook mechanism.

How the Persistent Activation Flag Works

The persistent activation system operates through a SessionStart hook located at hooks/always-on.sh in the repository. When Claude Code initializes a new session, it automatically executes this hook before processing user input.

According to the source code in hooks/always-on.sh, the implementation follows this logic:

  • Detection (line 14): The hook checks [ -f "$flag_path" ] || exit 0, aborting silently unless $CLAUDE_CONFIG_DIR/.i-have-adhd-always exists.
  • Rule loading (lines 22-27): The script reads skills/i-have-adhd/SKILL.md and strips YAML front-matter to extract the raw ruleset.
  • Injection (lines 29-30): The hook prepends the rendered rules to the system context and announces "ADHD MODE ACTIVE (always-on)".
  • Safety: Any execution failure triggers exit 0, ensuring the hook never blocks or delays Claude Code startup.

Managing the Persistent Activation Flag

You control persistent activation using standard shell commands to create or remove the marker file.

Enable Persistent Activation

Create the empty flag file using the touch command as documented in the repository's README (line 32) and INSTALL guide:

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

This single command activates the SessionStart hook for all future Claude Code sessions.

Disable Persistent Activation

To deactivate automatic rule injection, remove the flag file:

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

Subsequent sessions will start without automatically loading the ADHD-friendly ruleset.

Verify the Flag Status

Confirm persistent mode is configured by listing the file:

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

If the file exists, the hook will execute on the next session initialization and inject the rules from skills/i-have-adhd/SKILL.md.

Manual Activation vs. Persistent Mode

While the ~/.claude/.i-have-adhd-always flag provides seamless automatic activation, you can still manually trigger the skill for individual sessions without creating the flag file:

/i-have-adhd

This command loads the ruleset temporarily for the current session only, useful when you need ADHD-friendly formatting occasionally without committing to persistent activation.

Summary

  • The ~/.claude/.i-have-adhd-always file acts as a persistent activation marker that the SessionStart hook detects automatically.
  • The hooks/always-on.sh script validates the flag's presence and injects content from skills/i-have-adhd/SKILL.md into every response.
  • Use touch ~/.claude/.i-have-adhd-always to enable and rm ~/.claude/.i-have-adhd-always to disable persistent mode.
  • The hook includes fail-safe error handling that exits with code 0 to ensure Claude Code startup never fails due to skill errors.

Frequently Asked Questions

What happens if the flag file contains text instead of being empty?

The hook only checks for file existence using the test [ -f "$flag_path" ] at line 14. The actual content of ~/.claude/.i-have-adhd-always is irrelevant—an empty file functions identically to one containing text. The script reads the ruleset from skills/i-have-adhd/SKILL.md rather than from the flag file itself.

Does the flag work with custom Claude Code configuration directories?

Yes. The hook references the environment variable $CLAUDE_CONFIG_DIR rather than hardcoding the path. If you have moved your Claude Code configuration to a custom location, place the .i-have-adhd-always file in that directory instead of the default ~/.claude/ location.

How can I confirm ADHD mode is active in my current session?

When the SessionStart hook executes successfully, Claude Code displays the announcement "ADHD MODE ACTIVE (always-on)" at the beginning of the session. Seeing this message confirms that the hook detected your flag file and successfully loaded the ruleset from skills/i-have-adhd/SKILL.md.

Will session startup fail if the hook encounters an error?

No. The hooks/always-on.sh script implements defensive programming where any failure results in exit 0. This safety mechanism ensures that permission issues, missing files, or other errors within the skill never prevent Claude Code from starting normally or block your ability to begin coding.

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 →