How to Customize the Rules for i-have-adhd: A Complete Guide to Modifying SKILL.md
Yes, you can customize the rules for i-have-adhd by editing the skills/i-have-adhd/SKILL.md file, which the extension loads via the loadRules() function and injects into the conversation as persistent context until explicitly disabled.
The i-have-adhd repository provides a Pi Coding Agent extension that modifies AI interactions to better support ADHD workflows. According to the source code in extensions/i-have-adhd.ts, the rule set is not hardcoded but read dynamically from a Markdown file, allowing you to customize the rules for i-have-adhd to match your specific cognitive preferences. When activated, the extension loads the raw rule text and maintains it as active conversation context until you explicitly turn the mode off.
Where the Rules Are Stored
The extension stores its behavior configuration in skills/i-have-adhd/SKILL.md, referenced by the constant SKILL_PATH. In extensions/i-have-adhd.ts, the loadRules() function (lines 42-60) reads this file and returns the content as a string. Because the rules live in plain Markdown, you can edit them with any text editor without recompiling the TypeScript source.
How Rule Injection Works
The extension manages rule state through four distinct operations defined in the source code:
Load rules: The loadRules() function (lines 42-60) reads SKILL_PATH and pulls raw rule text from SKILL.md.
Inject rules: The syncContext() function sends a custom message of type i-have-adhd-rules when the mode is enabled, making the rules visible to the model for the entire session.
Disable rules: When turning the mode off via the "stop adhd mode" or "normal mode" phrases, or through the /i-have-adhd off command, syncContext() sends a message of type i-have-adhd-disabled to remove the context.
Always-on flag: The restoreState() function (lines 50-55) checks for a file named .i-have-adhd-always in the agent directory (using join(getAgentDir(), ".i-have-adhd-always")) to enable the mode automatically on startup.
Three Ways to Customize Your Rules
Edit SKILL.md Directly
The simplest method to customize the rules for i-have-adhd is to modify skills/i-have-adhd/SKILL.md directly. Any changes take effect the next time the session starts or when context synchronizes.
// Path: skills/i-have-adhd/SKILL.md
// (add or modify any rule section)
// Example: change the time-estimate rule
### 6. Give specific time estimates
Vague estimates fail. Use concrete units like "5 minutes" instead of "soon."
Use a Custom Rule File
For project-specific configurations, copy SKILL.md to a new location and modify the SKILL_PATH variable in extensions/i-have-adhd.ts to point to your custom file. This approach requires restarting the extension but allows different rule sets per workspace without altering the original repository files.
Enable Rules by Default
Place an empty file named .i-have-adhd-always in your agent directory. The restoreState() function detects this flag during initialization and automatically enables the mode without requiring manual activation.
# From the repository root
touch .i-have-adhd-always
Runtime Commands and Toggles
While you cannot dynamically change the rule text without editing the file, you can toggle the mode at runtime using the /i-have-adhd command registered in extensions/i-have-adhd.ts (lines 73-92):
/i-have-adhd on # turn on
/i-have-adhd off # turn off
/i-have-adhd # check current state
The command handler processes these arguments to trigger syncContext() and inject or remove the rule messages.
Summary
- Rules are stored in
skills/i-have-adhd/SKILL.mdand loaded by theloadRules()function (lines 42-60) - Customize rules by editing the Markdown file; changes apply on the next session start or context sync
- Use the
.i-have-adhd-alwaysflag file to enable rules by default viarestoreState()(lines 50-55) - Toggle rules at runtime with
/i-have-adhd onand/i-have-adhd offcommands - The extension does not support API-based rule injection; file modification is required for permanent changes
Frequently Asked Questions
Can I change the rules without restarting the session?
No. The extension reads SKILL.md at session initialization or during context synchronization. While you can toggle the mode on and off at runtime using /i-have-adhd or the phrases "stop adhd mode" and "normal mode," changing the actual rule text requires editing the file and restarting the session for the changes to take effect.
Does i-have-adhd support multiple rule profiles?
Not natively. The extension reads from a single SKILL_PATH constant. To use different rules for different projects, you must modify the SKILL_PATH variable in extensions/i-have-adhd.ts to point to different Markdown files, or maintain separate copies of the extension with different configurations.
How do I make the ADHD mode start automatically?
Create an empty file named .i-have-adhd-always in your agent directory. The restoreState() function detects this file during initialization (lines 50-55) and enables the mode automatically without requiring the /i-have-adhd on command.
Are the rules hardcoded in the TypeScript source?
No. The rules live entirely in skills/i-have-adhd/SKILL.md. The TypeScript code only handles loading via loadRules(), injecting context via syncContext(), and toggling state via the command handler, making customization accessible to anyone who can edit Markdown.
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 →