# Understanding the `disable-model-invocation` Flag in the i-have-adhd Repository

> Learn how the disable-model-invocation flag in the i-have-adhd repo controls skill rule activation. Discover why runtimes wait for explicit user commands.

- Repository: [Ayoub Ghriss/i-have-adhd](https://github.com/ayghri/i-have-adhd)
- Tags: deep-dive
- Published: 2026-09-10

---

**The `disable-model-invocation` flag is a YAML directive in [`SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/SKILL.md) that prevents automatic activation of skill rules, requiring explicit user invocation (such as `/i-have-adhd`) before the runtime applies any behavioral modifications.**

The `ayghri/i-have-adhd` repository implements a skill system designed to shape AI outputs for readers with ADHD. Within this architecture, the `disable-model-invocation` flag serves as a critical control mechanism that determines when skill behaviors become active across different AI runtimes.

## How the `disable-model-invocation` Flag Works

The flag resides in the YAML front-matter of the skill definition. In [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) at line 4, setting `disable-model-invocation: true` tells compatible runtimes to load the skill description while withholding the actual behavioral rules until explicitly requested.

### Skill Definition Configuration

When authoring a skill, you declare the flag in the metadata header:

```yaml

# skills/i-have-adhd/SKILL.md

---
name: i-have-adhd
description: 'Shape output for a reader with ADHD…'
disable-model-invocation: true   # Prevents automatic activation

license: MIT
---

```

This single line instructs the runtime harness to treat the skill as **inactive by default**, even after installation.

### Runtime-Specific Handling

Different AI runtimes interpret this directive through distinct mechanisms:

- **Claude Code and Qwen Code**: These environments read the flag directly from [`SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/SKILL.md) and maintain a silent state until the user issues the explicit invocation command.
- **Codex**: This runtime ignores the [`SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/SKILL.md) flag entirely. Instead, it respects the `allow_implicit_invocation: false` policy defined in [`skills/i-have-adhd/agents/openai.yaml`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/agents/openai.yaml) at lines 6-7.
- **Third-party plugins**: Some custom runtime hooks, such as those implemented in `hooks/always-on.mjs`, may load skill definitions at startup and activate them automatically regardless of the flag status.

## Why Some Runtimes Stay Silent Until Invoked

When the `disable-model-invocation` flag (or its Codex equivalent) is active, the runtime performs a "silent installation." As documented in [`INSTALL.md`](https://github.com/ayghri/i-have-adhd/blob/main/INSTALL.md) at line 805, the system loads the skill's description into memory but **does not inject any rules into the model's prompt context**. The model behaves as if the skill does not exist, producing standard responses without ADHD-specific formatting or constraints.

This silence persists until the user explicitly invokes the skill (e.g., typing `/i-have-adhd`), at which point the runtime injects the skill's rules into the active context. This behavior was verified in pull request #60, where testing confirmed that Copilot (a Codex-based runtime) applied no skill rules until the explicit command was issued.

## Configuration Examples by Runtime

### Standard Skill Definition

For Claude Code and Qwen Code compatibility, set the flag in the skill metadata:

```yaml

# skills/i-have-adhd/SKILL.md

---
name: i-have-adhd
description: 'Action-first output for ADHD readers'
disable-model-invocation: true
---

```

### Codex Agent Configuration

For OpenAI Codex, configure the equivalent policy in the agent definition:

```yaml

# skills/i-have-adhd/agents/openai.yaml

interface:
  display_name: "I Have ADHD"
  short_description: "Action-first output for ADHD readers"
policy:
  allow_implicit_invocation: false   # Codex uses this instead

```

### Explicit Invocation Flow

**Before invocation:**

```text
User: How do I improve my code style?
Assistant: [Standard response without ADHD-specific formatting]

```

**After invocation:**

```text
User: /i-have-adhd
Assistant: 1. Open `src/main.ts`
           2. Add the configuration line as shown above
           Next: run `npm test` to verify

```

## Summary

- The `disable-model-invocation` flag in [`SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/SKILL.md) controls whether a skill activates automatically or waits for explicit invocation.
- Claude Code and Qwen Code read this flag directly to determine activation behavior.
- Codex ignores the flag and uses `policy.allow_implicit_invocation` in [`agents/openai.yaml`](https://github.com/ayghri/i-have-adhd/blob/main/agents/openai.yaml) instead.
- When active, the runtime loads the skill description but remains silent, applying no rules until the user explicitly invokes the skill (e.g., `/i-have-adhd`).
- This architecture gives skill authors precise control over when behavioral modifications affect model output.

## Frequently Asked Questions

### What is the purpose of the `disable-model-invocation` flag?

The flag gives skill authors control over activation timing. By setting `disable-model-invocation: true` in [`SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/SKILL.md), authors prevent the runtime from automatically applying skill rules to every model response, ensuring the skill only activates when the user explicitly requests it.

### Which runtimes respect the `disable-model-invocation` flag?

Claude Code and Qwen Code read the flag directly from [`SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/SKILL.md). Codex ignores the flag and instead checks `allow_implicit_invocation` in [`agents/openai.yaml`](https://github.com/ayghri/i-have-adhd/blob/main/agents/openai.yaml). Third-party runtime implementations may vary, with some custom hooks loading skills automatically regardless of the flag setting.

### Why does my runtime stay silent after installing the skill?

The runtime remains silent because the flag (or equivalent policy) is active. According to the installation documentation at line 805 of [`INSTALL.md`](https://github.com/ayghri/i-have-adhd/blob/main/INSTALL.md), the system loads the skill description but withholds all behavioral rules until you explicitly invoke the skill using the designated command (such as `/i-have-adhd`).

### How does Codex handle implicit invocation differently than other runtimes?

Unlike Claude Code and Qwen Code, which parse `disable-model-invocation` from [`SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/SKILL.md), Codex references `policy.allow_implicit_invocation` in [`skills/i-have-adhd/agents/openai.yaml`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/agents/openai.yaml). When set to `false` at lines 6-7, Codex maintains the same silent behavior but through a separate configuration mechanism.