# How to Use the i-have-adhd Pre-Send Check Feature in Cursor

> Learn how to use the i-have-adhd pre-send check feature in Cursor. Ensure ADHD-friendly communication by automatically intercepting AI responses and enforcing length limits.

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

---

**The i-have-adhd pre-send check automatically intercepts AI-generated responses before they reach the chat, enforcing length limits and rewriting content that contains distraction keywords to ensure ADHD-friendly communication.**

The **i-have-adhd** skill is a Cursor-compatible extension designed to help users maintain focus during AI-assisted workflows. According to the ayghri/i-have-adhd repository, the **pre-send check** serves as a gatekeeper that evaluates every draft response against neurodiversity-friendly style rules before delivery.

## What the Pre-Send Check Does

The **pre-send check** hook performs three critical validation steps on every generated response:

1. **Analyzes draft output** – Scans text for overly long sentences, dense jargon, or irrelevant tangents that might overwhelm users with ADHD.
2. **Applies ADHD-friendly style rules** – Automatically breaks complex ideas into bullet points, inserts short summaries, or restructures paragraphs for better cognitive load management.
3. **Blocks or rewrites** – Aborts the send operation if content exceeds configurable thresholds (such as character limits or distraction keyword density) and requests a revised, more focused reply from the LLM.

## Architecture and Key Files

The pre-send check functionality is distributed across several specific files in the repository:

- **[`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md)** – The skill manifest that registers the `pre_send_check` hook with the Cursor runtime.
- **[`skills/i-have-adhd/agents/openai.yaml`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/agents/openai.yaml)** – Contains the prompt template and hook wiring for OpenAI backend implementations.
- **[`skills/i-have-adhd/agents/gemini.toml`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/agents/gemini.toml)** – Houses the equivalent prompt template for the Gemini LLM backend.
- **[`hooks/hooks.json`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json)** – Stores runtime configuration including toggle switches, length limits, and keyword filters.
- **[`scripts/run_evals.py`](https://github.com/ayghri/i-have-adhd/blob/main/scripts/run_evals.py)** – Command-line utility that executes the skill and automatically triggers the pre-send check during evaluation.

When a response is generated, the Cursor runtime invokes the `pre_send_check` hook defined in the skill manifest, which reads its rules from [`hooks/hooks.json`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json) and applies the logic specified in the respective agent configuration file.

## Configuring the Pre-Send Check

You can customize the validation behavior by editing the JSON configuration at [`hooks/hooks.json`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json). The following settings control how strictly the hook filters content:

- **`enabled`** – Boolean flag that turns the pre-send check on or off (default: `true`).
- **`max_length`** – Maximum character count allowed for a single response (default: approximately 500 characters).
- **`bullet_threshold`** – Minimum number of distinct points the hook identifies before forcing a bullet-list conversion.
- **`distraction_keywords`** – Array of trigger words (such as `"actually"`, `"maybe"`, or `"basically"`) that, when detected, prompt an automatic rewrite.

Changes to this file take effect immediately on the next invocation without requiring a restart.

## Practical Implementation Examples

### Running the Skill from the Command Line

To execute the skill manually and observe the pre-send check in action, run the evaluation script from the repository root:

```bash
python -m scripts.run_evals --skill i-have-adhd

```

This command loads the skill, generates a response through the configured LLM, and automatically applies the `pre_send_check` validation before displaying any output to the terminal.

### Integrating with the Cursor Client

When using the skill within a Cursor environment, the pre-send check runs transparently during the `ask` method call:

```python
from cursor import CursorClient

client = CursorClient()
response = client.ask(
    "Explain the concept of neurodiversity in three sentences.",
    skill="i-have-adhd"
)

print(response)  # Output has already passed the pre-send check filters

```

### Modifying Hook Configuration

To customize validation parameters, edit [`hooks/hooks.json`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json) with your preferred constraints:

```json
{
  "pre_send_check": {
    "enabled": true,
    "max_length": 400,
    "bullet_threshold": 2,
    "distraction_keywords": ["actually", "maybe", "basically"]
  }
}

```

### Disabling the Check Temporarily

For queries requiring detailed technical responses, you can bypass the hook by passing an options flag:

```python
response = client.ask(
    "Give me a long technical description of quantum computing.",
    skill="i-have-adhd",
    options={"pre_send_check": false}
)

```

## Summary

- The **i-have-adhd** skill provides a `pre_send_check` hook that validates AI responses before they reach the user interface.
- Configuration resides in **[`hooks/hooks.json`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json)**, supporting custom length limits, keyword filters, and enable/disable toggles.
- Implementation logic is split between **[`agents/openai.yaml`](https://github.com/ayghri/i-have-adhd/blob/main/agents/openai.yaml)** and **[`agents/gemini.toml`](https://github.com/ayghri/i-have-adhd/blob/main/agents/gemini.toml)** depending on your LLM backend.
- You can invoke the check automatically via **[`scripts/run_evals.py`](https://github.com/ayghri/i-have-adhd/blob/main/scripts/run_evals.py)** or programmatically through the **CursorClient** interface.

## Frequently Asked Questions

### What triggers the pre-send check to rewrite a response?

The hook triggers a rewrite when content exceeds the `max_length` threshold, contains words listed in `distraction_keywords`, or fails the structural complexity analysis defined in the agent prompt templates.

### Can I disable the pre-send check for specific queries?

Yes. Pass `options={"pre_send_check": false}` in the `client.ask()` method call, or set `"enabled": false` in [`hooks/hooks.json`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json) to disable it globally.

### Where is the pre-send check logic defined?

The primary logic resides in **[`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md)** where the hook is registered, with backend-specific implementations in **[`skills/i-have-adhd/agents/openai.yaml`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/agents/openai.yaml)** and **[`skills/i-have-adhd/agents/gemini.toml`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/agents/gemini.toml)**.

### How do I adjust the length limits for ADHD-friendly outputs?

Edit the `max_length` value in **[`hooks/hooks.json`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/hooks.json)** to set your preferred character limit. The default configuration limits responses to approximately 500 characters, but you can reduce this to 300 or 400 for more concise interactions.