How to Enable Always-On Mode for i-have-adhd in Gemini CLI

Create a flag file named .i-have-adhd-always in your Gemini agent configuration directory (default ~/.pi/agent) to inject the ADHD-focused ruleset at the start of every session.

The i-have-adhd repository by ayghri provides a specialized skill for managing ADHD-related workflows in AI coding assistants. For Gemini CLI users, the always-on mode ensures the complete ruleset from SKILL.md is automatically prepended to every conversation without manual activation, since Gemini lacks a native plugin marketplace.

How the Always-On Mechanism Works

The always-on functionality relies on a filesystem-based toggle rather than a settings menu. According to the source code in extensions/i-have-adhd.ts, the extension checks for the presence of a hidden flag file in the agent's configuration directory. When detected, the extension reads the skill rules and injects them into every request context.

This approach mirrors the SessionStart hook logic found in hooks/always-on.mjs, which handles similar functionality for Claude Code, but is adapted for Gemini's extension architecture through the TypeScript implementation.

Step-by-Step Installation

Locate Your Agent Configuration Directory

By default, Gemini CLI stores agent configuration in ~/.pi/agent. If you use a custom location, ensure the PI_CODING_AGENT_DIR environment variable points to your preferred directory before creating the flag file.

Create the Flag File

Execute the following commands to enable always-on mode for the i-have-adhd skill:


# Create the directory if it doesn't exist

mkdir -p ~/.pi/agent

# Create the flag file to enable always-on mode

touch ~/.pi/agent/.i-have-adhd-always

For custom agent directories:

export PI_CODING_AGENT_DIR=$HOME/.my-custom-agent
mkdir -p "$PI_CODING_AGENT_DIR"
touch "$PI_CODING_AGENT_DIR/.i-have-adhd-always"

Reload Gemini CLI

After creating the flag file, reload the CLI to pick up the new extension state:

/gemini reload

You should see a confirmation banner indicating "ADHD MODE ACTIVE (always-on)" at the start of your next interaction, confirming that the ruleset from skills/i-have-adhd/SKILL.md is now active for every response.

Disabling Always-On Mode

To deactivate the always-on behavior, remove the flag file and reload the session:

rm ~/.pi/agent/.i-have-adhd-always
/gemini reload

Once deleted, the extension in extensions/i-have-adhd.ts will no longer inject the rules automatically, and you can manually invoke the skill only when needed.

Technical Implementation Details

The Extension Logic

The file extensions/i-have-adhd.ts contains the Gemini-specific implementation that handles the always-on check. When the extension initializes, it looks for the .i-have-adhd-always flag file in the configuration directory. If present, it loads the skill manifest from GEMINI.md and prepends the full ruleset to the system prompt for every request.

The Flag File Convention

The flag file naming convention (.i-have-adhd-always) is consistent across both the Gemini extension and the Claude Code hook in hooks/always-on.mjs. This standardization allows the same repository to support multiple AI coding assistants while maintaining a unified activation mechanism. The INSTALL.md file documents this approach specifically for the Gemini CLI section, providing the canonical path requirements and environment variable options.

Summary

  • Create the flag file: Run touch ~/.pi/agent/.i-have-adhd-always (or in your custom PI_CODING_AGENT_DIR) to enable always-on mode.
  • Reload required: Execute /gemini reload after creating or deleting the flag file to apply changes to the extension state.
  • Automatic injection: Once enabled, the skill rules are automatically prepended to every Gemini session via the logic in extensions/i-have-adhd.ts.
  • Global application: The always-on setting affects all Gemini CLI sessions on your machine until the flag file is removed.

Frequently Asked Questions

What is the default location for the always-on flag file?

The extension looks for .i-have-adhd-always in ~/.pi/agent by default. If you have customized your agent directory via the PI_CODING_AGENT_DIR environment variable, place the flag file in that location instead.

Why does Gemini CLI use a flag file instead of a configuration setting?

Since Gemini CLI does not currently support a plugin marketplace or native skill registry, the i-have-adhd repository implements always-on mode through filesystem detection. The extensions/i-have-adhd.ts file watches for this flag as a lightweight, cross-platform toggle that doesn't require modifying Gemini's core configuration files.

Do I need to restart the entire terminal session to apply changes?

No, you only need to run /gemini reload within the Gemini CLI interface. This command refreshes the extension state and picks up the presence or absence of the flag file without closing your terminal window.

Will the always-on mode affect all my Gemini projects?

Yes, when enabled via the flag file, the ADHD ruleset applies globally to every Gemini session on your machine. To disable it for specific projects, you must remove the flag file or use the manual skill invocation method documented in INSTALL.md instead of always-on mode.

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 →