Agent development rules for AI coding assistants.
Drop these into your project — your AI assistant will understand OpenClaw conventions,
SOUL.md structure, agent architecture, and deployment patterns.
One-line install (auto-detects your editor):
curl -fsSL https://raw.githubusercontent.com/mergisi/openclaw-rules/main/install.sh | bashManual install
# Claude Code
git clone --depth 1 https://github.com/mergisi/openclaw-rules.git .rules-tmp
mkdir -p .claude/rules && cp .rules-tmp/project-rules/*.mdc .claude/rules/
rm -rf .rules-tmp
# Cursor
mkdir -p .cursor/rules && cp .rules-tmp/project-rules/*.mdc .cursor/rules/
# Windsurf
mkdir -p .windsurf/rules && cp .rules-tmp/project-rules/*.mdc .windsurf/rules/| Editor | Rules Directory | Status |
|---|---|---|
| Claude Code | .claude/rules/ |
Fully supported |
| Cursor | .cursor/rules/ |
Fully supported |
| Windsurf | .windsurf/rules/ |
Fully supported |
| Any LLM | Paste into system prompt | Works everywhere |
Rules that apply per-project. Drop into your agent's repo.
| # | Rule | What it teaches your AI |
|---|---|---|
| 1 | soul-md-guide.mdc |
How to write effective SOUL.md identity files |
| 2 | agent-architecture.mdc |
Directory structure, config.json, naming conventions |
| 3 | heartbeat-config.mdc |
Cron scheduling, intervals, offset patterns |
| 4 | tool-scripts.mdc |
Zero-dep Node.js scripts (GA4, Stripe, Reddit, etc.) |
| 5 | telegram-bot.mdc |
Telegram bot integration, message formatting |
| 6 | deploy.mdc |
Deploy to Mac, Raspberry Pi, VPS, Docker |
| 7 | multi-agent.mdc |
Team patterns: Reporter, Scout-Writer, Monitor-Alert |
| 8 | memory-system.mdc |
MEMORY.md, USER.md, context loading order |
Rules that apply across all your projects.
| # | Rule | What it teaches your AI |
|---|---|---|
| 9 | openclaw-conventions.mdc |
General coding conventions for OpenClaw projects |
Ready-to-use agent setups you can copy into your project:
3 files — the smallest working agent.
examples/minimal-agent/
├── SOUL.md # Agent identity and rules
├── config.json # Metadata and capabilities
└── MEMORY.md # Persistent memory template
Business intelligence agent with GA4 + Stripe tools.
examples/metrics-agent/
├── SOUL.md # Data-driven analyst personality
└── config.json # GA4, Stripe, Mixpanel capabilities
Rules use .mdc (Markdown with Context) — plain markdown that AI coding assistants parse natively:
# Rule Title
Description of when and how to apply this rule.
## Key Points
- Convention or pattern
- Do this, not that
## Examples
code examples, templates, patternsNo special tooling needed. It's just markdown.
Every time you start a new agent project, your AI assistant asks the same questions:
- "What's a SOUL.md?"
- "How should I structure the config?"
- "How do heartbeats work?"
- "How do I write a tool script?"
These rules answer those questions before they're asked. Your AI assistant reads the rules and writes correct OpenClaw code from the start.
Before: "Can you explain what SOUL.md is?" → explain → fix → explain again
After: AI already knows. Just builds.
PRs welcome. If you've found a pattern that makes agent development better, add a rule.
- Fork the repo
- Add your rule to
project-rules/orglobal-rules/ - Follow the
.mdcformat above - Open a PR
| Project | Description |
|---|---|
| awesome-openclaw-agents | 53 ready-to-use agent templates |
| CrewClaw | Generate and deploy OpenClaw agents in 5 minutes |
| OpenClaw Docs | Official documentation |
MIT License © 2026 Mustafa Ergisi