https://github.com/block/ai-rules
Manage AI rules, commands, and skills across multiple coding agents from one place.
https://github.com/block/ai-rules
ai-coding-tools ai-rules
Last synced: 2 months ago
JSON representation
Manage AI rules, commands, and skills across multiple coding agents from one place.
- Host: GitHub
- URL: https://github.com/block/ai-rules
- Owner: block
- License: apache-2.0
- Created: 2025-11-24T23:50:22.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-03-26T22:12:12.000Z (2 months ago)
- Last Synced: 2026-03-26T22:21:04.224Z (2 months ago)
- Topics: ai-coding-tools, ai-rules
- Language: Rust
- Homepage:
- Size: 257 KB
- Stars: 83
- Watchers: 1
- Forks: 20
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Governance: GOVERNANCE.md
- Agents: AGENTS.md
Awesome Lists containing this project
README
# AI Rules Tool
CLI tool to manage AI rules across different AI coding agents. Standardize and distribute your coding guidelines across AMP, Claude, Cline, Codex, Copilot, Cursor, Firebender, Gemini, Goose, Kilocode, and Roo.
## Features
- **Multi-Agent Support** - Generate rules for 11 AI coding agents from a single source
- **Sync Management** - Track and maintain consistency across all generated rule files
- **Selective Generation** - Generate rules for specific agents only
- **MCP Support** - Generate Model Context Protocol configurations for compatible agents
## Installation
```bash
curl -fsSL https://raw.githubusercontent.com/block/ai-rules/main/scripts/install.sh | bash
```
Installs to `~/.local/bin/ai-rules`. Verify with `ai-rules --version`.
More installation options
**Specific version:**
```bash
curl -fsSL https://raw.githubusercontent.com/block/ai-rules/main/scripts/install.sh | VERSION=v1.0.0 bash
```
**Custom directory:**
```bash
curl -fsSL https://raw.githubusercontent.com/block/ai-rules/main/scripts/install.sh | INSTALL_DIR=/usr/local/bin bash
```
## Quick Start
1. **Initialize** your AI rules directory:
```bash
ai-rules init
```
Creates an `ai-rules/` directory with example rule files. Rule files are markdown files containing coding guidelines, conventions, and instructions that get distributed to your AI coding agents.
2. **Edit your rules** in `ai-rules/*.md` files to define your project's coding standards
3. **Generate** agent-specific files:
```bash
ai-rules generate # All agents
ai-rules generate --agents claude,cursor # Specific agents
```
Creates `CLAUDE.md`, `AGENTS.md`, and other agent-specific files. Cursor uses `AGENTS.md`.
4. **Check status** to ensure everything is in sync:
```bash
ai-rules status
```
## Commands
| Command | Description |
|---------|-------------|
| `ai-rules init` | Initialize AI rules in the current directory |
| `ai-rules generate` | Generate rules for AI coding agents |
| `ai-rules status` | Show sync status of AI rules |
| `ai-rules clean` | Remove all generated files |
| `ai-rules list-agents` | List all supported agents |
### Common Options
```bash
ai-rules generate --agents claude,cursor # Generate for specific agents
ai-rules generate --nested-depth 2 # Process subdirectories
ai-rules generate --gitignore # Add generated files to .gitignore
```
## Configuration
Create `ai-rules/ai-rules-config.yaml` to set defaults:
```yaml
agents: [claude, cursor, cline]
nested_depth: 2
gitignore: true
```
See [Configuration Guide](docs/configuration.md) for all options.
## Supported Agents
AMP, Claude Code, Cline, Codex, Copilot, Cursor, Firebender, Gemini, Goose, Kilocode, Roo
See [Supported Agents](docs/agents.md) for detailed compatibility information.
## Documentation
- [Configuration](docs/configuration.md) - Config file options and precedence
- [Rule Format](docs/rule-format.md) - Standard mode and symlink mode formats
- [Supported Agents](docs/agents.md) - Agent compatibility and generated files
- [MCP Configuration](docs/mcp.md) - Model Context Protocol setup
- [Commands and Skills](docs/commands-and-skills.md) - Custom commands and skills
- [Project Structure](docs/project-structure.md) - Example project layouts
## Development
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.