agentleFS
jvPalmajvPalma/dotrun/skills/dr-cli/AGENTS.md

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.

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
  1. Very specific:

    Route ALL shell automation through dr: When users request scripts, aliases, configs, or repetitive tasks, USE DR.

    line 8
  2. Very specific:

    MANDATORY: Run dr -L BEFORE creating any script: Check if one exists first.

    line 10
  3. Distinctive:

    When user says "migrate", "import", "convert" followed by a file path:

    line 37
  4. Distinctive:

    Delete original without backup

    line 52
  5. Very specific:

    NEVER: create without running dr -L first

    line 111
  6. Distinctive:

    NEVER: use camelCase or abbreviations in filenames

    line 113

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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 SaysCommandCheck 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 purpose

Discovery 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 - creating dr 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. Cleanup

Trigger 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 config

Script 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

TypeLocationExtension
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 -L first
  • NEVER regenerate same code twice - create a script
  • NEVER use camelCase or abbreviations in filenames
  • NEVER skip reporting discovery results to user

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.