{"id":29790133,"url":"https://github.com/goldziher/ai-rulez","last_synced_at":"2026-04-25T11:00:45.883Z","repository":{"id":301121252,"uuid":"1007708866","full_name":"Goldziher/ai-rulez","owner":"Goldziher","description":"Directory-based AI governance for Claude, Cursor, Copilot, Windsurf and 14+ tools. Define rules, context, skills and agents in .ai-rulez/ — generate synchronized configs for all your AI assistants.","archived":false,"fork":false,"pushed_at":"2026-04-19T16:11:42.000Z","size":219313,"stargazers_count":105,"open_issues_count":4,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-19T18:39:05.125Z","etag":null,"topics":["ai","ai-agents","ai-governance","ai-skills","claude-code","cli","code-generation","codex","developer-tools","documentation","golang","yaml"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Goldziher.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-24T12:09:42.000Z","updated_at":"2026-04-19T16:11:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"7e7d3d6f-0250-4e51-919e-df17ffef0f0d","html_url":"https://github.com/Goldziher/ai-rulez","commit_stats":null,"previous_names":["goldziher/ai-rulez"],"tags_count":79,"template":false,"template_full_name":null,"purl":"pkg:github/Goldziher/ai-rulez","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Goldziher%2Fai-rulez","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Goldziher%2Fai-rulez/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Goldziher%2Fai-rulez/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Goldziher%2Fai-rulez/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Goldziher","download_url":"https://codeload.github.com/Goldziher/ai-rulez/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Goldziher%2Fai-rulez/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32259472,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-agents","ai-governance","ai-skills","claude-code","cli","code-generation","codex","developer-tools","documentation","golang","yaml"],"created_at":"2025-07-27T23:05:13.744Z","updated_at":"2026-04-25T11:00:45.865Z","avatar_url":"https://github.com/Goldziher.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ai-rulez\n\nDirectory-based AI governance for 18+ tools. Define rules, context, skills, agents and commands once — generate native configs for Claude, Cursor, Copilot, Windsurf, Gemini, Codex, and more.\n\nEvery AI coding tool wants its own config format. Claude needs `CLAUDE.md` + `.claude/skills/` + `.claude/agents/`, Cursor wants `.cursor/rules/`, Copilot expects `.github/copilot-instructions.md`. Keeping them in sync is tedious and error-prone.\n\nai-rulez solves this: organize your AI governance in `.ai-rulez/`, run `generate`, and get native configs for all your tools — with proper frontmatter, tool-specific formatting, and full feature support (skills, agents, MCP servers).\n\n```bash\nnpx ai-rulez@latest init \u0026\u0026 npx ai-rulez@latest generate\n```\n\n**[Documentation](https://goldziher.github.io/ai-rulez/)**\n\n## What You Get\n\n- **18 preset generators**: Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Continue.dev, Amp, Junie, Codex, OpenCode, and custom presets\n- **Commands system**: Define slash commands once, use them across tools that support it\n- **Concise builtins**: Optimized builtin rules for minimal token footprint\n- **Remote includes**: Pull shared rules from git repos (company standards, team configs)\n- **Profile system**: Generate different configs for backend/frontend/QA teams\n- **MCP server**: Let AI assistants manage their own rules via Model Context Protocol\n- **Type-safe schemas**: JSON Schema validation for all config files\n\n## Quick Start\n\n```bash\n# No install required\nnpx ai-rulez@latest init \"My Project\"\nnpx ai-rulez@latest generate\n```\n\nThis creates:\n\n```\n.ai-rulez/\n├── config.yaml       # Which tools to generate for\n├── rules/            # Guidelines AI must follow\n├── context/          # Project background info\n├── skills/           # Specialized AI roles\n├── agents/           # Agent-specific prompts\n└── commands/         # Slash commands\n```\n\nAnd generates native configs for each tool you specify.\n\n## Configuration\n\n```yaml\n# .ai-rulez/config.yaml\nversion: \"3.0\"\nname: \"My Project\"\n\npresets:\n  - claude\n  - cursor\n  - copilot\n  - windsurf\n\n# Optional: team-specific profiles\nprofiles:\n  backend: [backend, database]\n  frontend: [frontend, ui]\n\n# Optional: share rules across repos\nincludes:\n  - name: company-standards\n    source: https://github.com/company/ai-rules.git\n    ref: main\n```\n\n## Content Structure\n\n**Rules** - What AI must do:\n```markdown\n---\npriority: critical\n---\n# Security Standards\n- Never commit credentials\n- Use environment variables for secrets\n- Sanitize all user input\n```\n\n**Context** - What AI should know:\n```markdown\n---\npriority: high\n---\n# Architecture\nThis is a microservices app:\n- API Gateway (Go, port 8080)\n- Auth Service (Go, port 8081)\n- PostgreSQL 15\n```\n\n**Commands** - Slash commands across tools:\n```markdown\n---\nname: review\naliases: [r, pr-review]\ntargets: [claude, cursor, continue-dev]\n---\n# Code Review\nReview the current PR for:\n1. Logic errors\n2. Security issues\n3. Performance problems\n```\n\n## Installation\n\n**No install required:**\n```bash\nnpx ai-rulez@latest \u003ccommand\u003e\n# or\nuvx ai-rulez \u003ccommand\u003e\n```\n\n**Global install:**\n```bash\n# Homebrew\nbrew install goldziher/tap/ai-rulez\n\n# npm\nnpm install -g ai-rulez\n\n# pip\npip install ai-rulez\n\n# Go\ngo install github.com/Goldziher/ai-rulez/cmd@latest\n```\n\n## CLI Reference\n\n```bash\n# Initialize project\nai-rulez init \"Project Name\"\nai-rulez init --domains backend,frontend,qa\n\n# Generate configs\nai-rulez generate\nai-rulez generate --profile backend\nai-rulez generate --dry-run\n\n# Content management\nai-rulez add rule security-standards --priority critical\nai-rulez add context api-docs\nai-rulez add skill database-expert\nai-rulez add command review-pr\n\nai-rulez list rules\nai-rulez remove rule outdated-rule\n\n# Installed skills\nai-rulez skill install kreuzberg --source https://github.com/kreuzberg-dev/kreuzberg\nai-rulez skill list\nai-rulez skill remove kreuzberg\n\n# Validation\nai-rulez validate\n\n# MCP server (for AI assistants)\nnpx ai-rulez@latest mcp\n\n# Migrate from V2\nai-rulez migrate v3\n```\n\n## Remote Includes\n\nShare rules across repositories:\n\n```yaml\nincludes:\n  # HTTPS\n  - name: company-standards\n    source: https://github.com/company/ai-rules.git\n    ref: main\n    include: [rules, context]\n    merge_strategy: local-override\n\n  # SSH\n  - name: shared-configs\n    source: git@github.com:org/shared-ai-rulez.git\n    ref: v2.0.0\n    include: [rules, skills]\n\n  # Local path\n  - name: local-standards\n    source: ../shared-rules\n    include: [rules]\n```\n\nPrivate repos use `AI_RULEZ_GIT_TOKEN` environment variable or `--token` flag.\n\n## Installed Skills\n\nInstall named skills from external repositories — fetched dynamically at generate time:\n\n```yaml\ninstalled_skills:\n  - name: kreuzberg\n    source: https://github.com/kreuzberg-dev/kreuzberg\n  - name: ai-rulez\n    source: https://github.com/Goldziher/ai-rulez\n```\n\n```bash\nai-rulez skill install kreuzberg --source https://github.com/kreuzberg-dev/kreuzberg\nai-rulez skill list\nai-rulez skill remove kreuzberg\n```\n\nSkills live at `skills/\u003cname\u003e/SKILL.md` in the source repo. See [Installed Skills docs](https://goldziher.github.io/ai-rulez/installed-skills/) for details.\n\n## Generated Output\n\nRunning `ai-rulez generate` creates:\n\n| Preset | Output |\n|--------|--------|\n| Claude | `CLAUDE.md` + `.claude/skills/` + `.claude/agents/` |\n| Cursor | `.cursor/rules/*.mdc` |\n| Windsurf | `.windsurf/*.md` |\n| Copilot | `.github/copilot-instructions.md` |\n| Gemini | `GEMINI.md` |\n| Continue.dev | `.continue/prompts/ai_rulez_prompts.yaml` |\n| Cline | `.cline/rules/*.md` |\n| Codex | `AGENTS.md` |\n| Amp | `AMP.md` |\n| Junie | `.junie/guidelines.md` |\n| OpenCode | `OPENCODE.md` |\n| Custom | Any path with markdown, JSON, or directory output |\n\n## Use Cases\n\n**Monorepo**: Generate configs for multiple packages\n```bash\nai-rulez generate --recursive\n```\n\n**Team profiles**: Different rules for different teams\n```bash\nai-rulez generate --profile backend\nai-rulez generate --profile frontend\n```\n\n**CI validation**: Ensure configs stay in sync\n```bash\nai-rulez validate \u0026\u0026 ai-rulez generate --dry-run\n```\n\n**Import existing configs**: Migrate from tool-specific files\n```bash\nai-rulez init --from auto\nai-rulez init --from .cursorrules,CLAUDE.md\n```\n\n## MCP Server\n\nLet AI assistants manage rules directly:\n\n```yaml\n# .ai-rulez/mcp.yaml\nversion: \"3.0\"\nmcp_servers:\n  - name: ai-rulez\n    command: npx\n    args: [\"-y\", \"ai-rulez@latest\", \"mcp\"]\n    transport: stdio\n    enabled: true\n```\n\nThe MCP server exposes CRUD operations, validation, and generation to AI assistants.\n\n## Builtins\n\n27 built-in domains ship embedded in the binary — opinionated conventions ready to use without external includes:\n\n```yaml\nbuiltins:\n  - rust\n  - python\n  - typescript\n  - security\n  - testing\n  - default-commands\n```\n\n- **Universal** (9): `ai-governance`\\*, `agent-delegation`\\*, `security`, `git-workflow`, `code-quality`, `testing`, `token-efficiency`, `documentation`, `default-commands`\n- **Languages** (10): `rust`, `python`, `typescript`, `go`, `java`, `ruby`, `php`, `elixir`, `csharp`, `r`\n- **Bindings** (9): `pyo3`, `napi-rs`, `magnus`, `ext-php-rs`, `rustler`, `wasm`, `jni-rs`, `extendr`, `cgo`\n\n\\* Auto-included by default. Use `builtins: true` for all, or pick specific ones. Exclude auto-includes with `!` prefix (e.g., `!agent-delegation`).\n\n## Documentation\n\n- [Configuration Reference](https://goldziher.github.io/ai-rulez/configuration/)\n- [Domains \u0026 Profiles](https://goldziher.github.io/ai-rulez/domains/)\n- [Remote Includes](https://goldziher.github.io/ai-rulez/includes/)\n- [MCP Server](https://goldziher.github.io/ai-rulez/mcp-server/)\n- [Schema Validation](https://goldziher.github.io/ai-rulez/schema/)\n- [Migration Guide](https://goldziher.github.io/ai-rulez/migration/)\n\n## Contributing\n\nContributions welcome. See [CONTRIBUTING.md](https://github.com/Goldziher/ai-rulez/blob/main/CONTRIBUTING.md).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoldziher%2Fai-rulez","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoldziher%2Fai-rulez","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoldziher%2Fai-rulez/lists"}