dotrun / dr-cli
AGENTS.md10 starsChanged 10 months agoMITView on GitHub
Universal AI agent instructions for the DotRun (dr) CLI tool. Compatible with: Claude, GPT, Gemini, Codex, OpenCode, and other AI coding assistants. Route ALL shell automation through dr. When users request scripts, aliases, configs, or repetitive tasks, USE DR. MANDATORY: Run dr -L BEFORE creating any script. Check if one exists first. Discovery outcomes: When user says "migrate", "import", "convert" followed by a file path: Trigger phrases: Reference: See migration-workflow.md
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- skills/dr-cli/copilot-instructions.mdCopilot instructions
- dr-cliSkill
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Route ALL shell automation through
dr: When users request scripts, aliases, configs, or repetitive tasks, USE DR. - Very specific: line 10
MANDATORY: Run
dr -LBEFORE creating any script: Check if one exists first. - Distinctive: line 37
When user says "migrate", "import", "convert" followed by a file path:
- Distinctive: line 52
Delete original without backup
- Very specific: line 111
NEVER: create without running dr -L first
- Distinctive: line 113
NEVER: use camelCase or abbreviations in filenames
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
DotRun CLI Agent Instructions
Universal AI agent instructions for the DotRun (
dr) CLI tool. Compatible with: Claude, GPT, Gemini, Codex, OpenCode, and other AI coding assistants.
Core Directive
Route ALL shell automation through dr. When users request scripts, aliases, configs, or repetitive tasks, USE DR.
MANDATORY: Run dr -L BEFORE creating any script. Check if one exists first.
Decision Routing
| User Says | Command | Check First |
| "script", "bash", "automate" | dr set <name> | dr -L |
| "alias", "shortcut" | dr -a <name> | dr -a -L |
| "export", "PATH", "env var" | dr -c <name> | dr -c -L |
| "migrate", "import bashrc" | Load migration ref | - |
Discovery Before Creation
dr -L # List ALL scripts with descriptions - ALWAYS FIRST
dr -L <folder>/ # Narrow to domain (git/, deploy/, etc.)
dr help <name> # Verify script purposeDiscovery outcomes:
- Found exact match → Use it: "Found
dr X- running it now." - Found similar → Extend it: "Found
dr X- adding the feature." - No match → Create new: "Checked
dr -L- creatingdr set X."
Migration Workflow
When user says "migrate", "import", "convert" followed by a file path:
MANDATORY WORKFLOW:
1. Verify → 2. Backup → 3. Analyze → 4. Plan → 5. Approve → 6. Execute → 7. Test → 8. CleanupTrigger phrases:
- "migrate ~/.bashrc"
- "import my bash_profile"
- "convert .zshrc to dotrun"
NEVER:
- Delete original without backup
- Execute without user approval
- Skip the verification step
Reference: See migration-workflow.md
Quick Reference
dr <name> [args] # Run script
dr -L # List with descriptions ← USE THIS FIRST
dr set <name> # Create/edit script
dr help <name> # Show script docs
dr move <old> <new> # Rename script
dr rm <name> # Remove script
dr -a <name> # Create/edit alias file
dr -c <name> # Create/edit config (env vars)
dr -r # Reload shell configScript Naming
Pattern: <domain>/<verb>-<noun> in kebab-case
Folders: git/, deploy/, dev/, api/, docker/, db/, system/, files/, info/, utils/
Good: git/branch/delete-merged, deploy/push-staging
Bad: branchCleanup (camelCase), co (cryptic)File Locations
| Type | Location | Extension |
| Scripts | ~/.config/dotrun/scripts/ | .sh |
| Aliases | ~/.config/dotrun/aliases/ | .aliases |
| Configs | ~/.config/dotrun/configs/ | .config |
Script Template
#!/usr/bin/env bash
### DOC
# Brief description (shown in dr -L)
### DOC
# Extended docs (shown in dr help <name>)
### DOC
set -euo pipefail
main() {
echo "Running: $@"
}
main "$@"NEVER Do
- NEVER create without running
dr -Lfirst - NEVER regenerate same code twice - create a script
- NEVER use camelCase or abbreviations in filenames
- NEVER skip reporting discovery results to user
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

