Skip to content

About

One md rules file. Every AI tool. Stop letting vendors pollute your repo with branding.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

one-agent-md

One md rules file. Works across AI tools. Keep your repo clean and consistent.


Overview

Many AI coding assistants expect their own configuration file inside your project:

  • .cursorrules (Cursor)
  • .clinerules/rules.md (Cline)
  • CLAUDE.md (Claude Code)
  • .continue/rules.md (Continue.dev)
  • .github/copilot-instructions.md (GitHub Copilot)

While each tool has its own format, the underlying purpose is the same: defining how the assistant should behave.

Maintaining multiple copies of similar rules can quickly become repetitive and error-prone. It also makes switching tools less seamless than it should be.


Solution

Use a single source of truth: AGENTS.md

This script keeps all tool-specific files in sync automatically.

  • Write your rules once
  • Sync them to all supported tools
  • Keep your repository focused and uncluttered

Features

  • Single AGENTS.md file for all tools
  • Automatic syncing to tool-specific formats
  • Zero dependencies (Python standard library only)
  • Cross-platform (Windows, macOS, Linux)
  • Simple, hackable, and easy to extend

Usage

1. Add the script to your project

curl -O https://raw.githubusercontent.com/PhilosopherZero/one_agent_md/main/one_agent_md.py

Or copy the file manually — it’s a single script.


2. Run it

python one_agent_md.py
# or
python3 one_agent_md.py
  • Creates AGENTS.md if it doesn’t exist
  • Watches for changes automatically
  • Keeps all tool-specific files updated

Edit AGENTS.md, save, and the changes propagate instantly.


3. Clean up generated files

python one_agent_md.py clean

Removes tool-specific files and keeps only AGENTS.md.


Generated Files

Tool File
Cursor .cursorrules
Cline .clinerules/rules.md
Claude Code CLAUDE.md
Continue.dev .continue/rules.md
GitHub Copilot .github/copilot-instructions.md

You can enable or disable targets by editing the TARGETS list in the script.


Recommended .gitignore

# Auto-generated AI tool files (from AGENTS.md)
# Edit AGENTS.md instead of these files
.cursorrules
.clinerules/
CLAUDE.md
.continue/
.github/copilot-instructions.md

This keeps your repository focused on source content while treating generated files as ephemeral.


Tool-Specific Overrides

If a tool requires additional behavior, you can define overrides:

mkdir .agents_overrides

Example:

echo "Use composer mode for multi-file edits" > .agents_overrides/_.cursorrules

Overrides are merged with AGENTS.md automatically.


Why Python?

  • No external dependencies
  • Works out of the box on most systems
  • Easy to read and modify
  • Keeps the tool lightweight and portable

Contributing

  • Add support for new tools by extending TARGETS
  • Improve syncing logic or structure
  • Port the tool to other languages if useful

Pull requests are welcome.


License

MIT — free to use, modify, and distribute.

About

One md rules file. Every AI tool. Stop letting vendors pollute your repo with branding.

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages