# How to Enable the i-have-adhd Always-On Hook in Claude Code

> Enable the i-have-adhd always-on hook in Claude Code by creating a flag file at ~/.claude/.i-have-adhd-always. This automatically injects ADHD rulesets into every session for enhanced productivity.

- Repository: [Ayoub Ghriss/i-have-adhd](https://github.com/ayghri/i-have-adhd)
- Tags: how-to-guide
- Published: 2026-08-25

---

**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`](https://github.com/ayghri/i-have-adhd/blob/main/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`](https://github.com/ayghri/i-have-adhd/blob/main/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)](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)](https://github.com/ayghri/i-have-adhd/blob/main/hooks/always-on.sh), which performs the following checks:

1. **Flag File Detection** - The script searches for a file at `$HOME/.claude/.i-have-adhd-always` (path configurable via the `CLAUDE_CONFIG_DIR` environment variable)
2. **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)](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
3. **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:

```bash
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)](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:

```bash
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:

```text
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:

```bash
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`](https://github.com/ayghri/i-have-adhd/blob/main/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.json`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json) to execute [`hooks/always-on.sh`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/always-on.sh) at startup
- Enable permanently by running `touch ~/.claude/.i-have-adhd-always` to create the required flag file
- The script loads rules from [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) and displays a confirmation banner when active
- Disable temporarily by typing `stop adhd mode` or permanently by removing the flag file with `rm ~/.claude/.i-have-adhd-always`
- Customize the flag file location using the `CLAUDE_CONFIG_DIR` environment 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`](https://github.com/ayghri/i-have-adhd/blob/main/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`](https://github.com/ayghri/i-have-adhd/blob/main/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.