How to Add Always-On Behavior to Zed Agent Using AGENTS.md vs Skills Manager
Enable persistent ADHD-friendly rules in Zed Agent by creating a flag file at ~/.config/zed/.i-have-adhd-always and adding the ruleset to an AGENTS.md file, or use the Skills Manager for temporary session-only activation.
The ayghri/i-have-adhd repository provides a curated set of response rules optimized for ADHD workflows, stored in skills/i-have-adhd/SKILL.md. To apply these rules automatically to every Zed Agent interaction, you must choose between a permanent file-based configuration or a temporary UI-based approach.
Understanding the Always-On Architecture
Zed Agent processes Agent Skills defined in markdown files. The canonical skill definition resides in skills/i-have-adhd/SKILL.md, which contains the 10 ADHD-friendly response rules [1†L29-L33]. The always-on mechanism relies on a flag file that signals Zed to inject the full ruleset into the system prompt on each turn.
When the flag file ~/.config/zed/.i-have-adhd-always exists, Zed prepends the ADHD rules to every model call. This behavior mirrors the logic found in the repository's hooks/always-on.* scripts [2†L143-L144], which generate the activation banner and handle flag detection.
Method 1: Enable Persistent Always-On Mode with AGENTS.md
For permanent activation across all projects, configure a global or project-local AGENTS.md file as documented in INSTALL.md [2†L674-L676][2†L710-L713].
Step 1: Create the Flag File
Create a zero-byte marker file to enable the always-on state:
touch ~/.config/zed/.i-have-adhd-always
This file acts as a persistent toggle. Delete it to disable the behavior permanently without modifying your configuration files.
Step 2: Add the Ruleset to AGENTS.md
Create or edit your AGENTS.md file. Zed checks two locations:
- Global:
~/.config/zed/AGENTS.md(recommended for personal use) - Project-local:
AGENTS.mdin the project root (loaded automatically when the project opens)
Insert the following snippet, replacing the placeholder with the full contents of skills/i-have-adhd/SKILL.md:
ADHD MODE ACTIVE (always-on). The ruleset below applies to every response.
Delete ~/.config/zed/.i-have-adhd-always to turn always-on off for good.
<contents of skills/i-have-adhd/SKILL.md>
Step 3: Restart Zed
Reload Zed or reopen your project. The console output will display "ADHD MODE ACTIVE (always-on)", confirming that the hooks are injecting the rules into every system prompt [2†L143-L144].
Method 2: Temporary Activation via Skills Manager
For short-term testing or single-session use, use Zed's built-in Skills Manager:
- Open Zed and navigate to the Sidebar → Skills Manager.
- Click "Add New Skill" and paste the entire contents of
skills/i-have-adhd/SKILL.md. - Save the skill to activate it immediately.
Important limitation: The Skills Manager stores skills only in session memory. The rules disappear when you restart Zed, making this method unsuitable for persistent always-on behavior.
AGENTS.md vs Skills Manager: Which to Choose?
| Aspect | AGENTS.md | Skills Manager |
|---|---|---|
| Persistence | Persistent across sessions (controlled by flag file) | Ephemeral (session-only) |
| Setup | Requires editing a text file and creating a flag file | Simple UI-based paste and save |
| Visibility | Shows "ADHD MODE ACTIVE" banner in console output | No visible indicator in output |
| Scope | Global or per-project via file location | Limited to current window |
Many users maintain the snippet in their global AGENTS.md for permanent activation while keeping a copy in the Skills Manager for quick ad-hoc testing on unfamiliar machines.
Summary
- Persistent always-on: Create
~/.config/zed/.i-have-adhd-alwaysand add the ruleset to~/.config/zed/AGENTS.mdor a project-localAGENTS.mdfile. - Temporary activation: Paste
skills/i-have-adhd/SKILL.mdinto the Skills Manager for the current session only. - The flag file mechanism ensures rules inject automatically into every model call, while the Skills Manager offers UI convenience without persistence.
Frequently Asked Questions
Where does Zed look for AGENTS.md files?
Zed reads AGENTS.md from two locations: the global configuration directory at ~/.config/zed/AGENTS.md (applied to all projects), or a file named AGENTS.md in the root of the currently opened project [2†L674-L676][2†L710-L713].
Why doesn't the Skills Manager persist my ADHD rules?
The Skills Manager stores skills in volatile session memory rather than on disk. When you close Zed, the skill state resets. This design prioritizes quick experimentation over permanent configuration, making the AGENTS.md approach necessary for true always-on behavior.
What happens if I delete the flag file?
Removing ~/.config/zed/.i-have-adhd-always immediately disables the always-on injection. Zed will stop prepending the ADHD ruleset to subsequent prompts, though the AGENTS.md snippet remains in place for easy reactivation.
Can I use both AGENTS.md and Skills Manager simultaneously?
Yes. You can maintain persistent rules via AGENTS.md while loading additional temporary skills through the Skills Manager. Both rule sets will apply to your conversations, though the Skills Manager version will vanish on restart while the AGENTS.md configuration persists.
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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →