{"id":31788068,"url":"https://github.com/roderik/ai-rules","last_synced_at":"2025-10-10T14:14:06.910Z","repository":{"id":309712130,"uuid":"1037257842","full_name":"roderik/ai-rules","owner":"roderik","description":"Professional AI assistant configurations for Claude Code, Codex CLI, OpenCode and Gemini CLI with enterprise-grade defaults for Solidity and TypeScript development.","archived":false,"fork":false,"pushed_at":"2025-10-03T13:24:38.000Z","size":231,"stargazers_count":24,"open_issues_count":0,"forks_count":5,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-03T15:28:53.742Z","etag":null,"topics":["claude-code","codex","cursor"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/roderik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-08-13T09:53:32.000Z","updated_at":"2025-10-03T13:24:41.000Z","dependencies_parsed_at":"2025-08-13T12:32:02.573Z","dependency_job_id":"dae105bf-0692-4f93-a97d-39b1f49acb4d","html_url":"https://github.com/roderik/ai-rules","commit_stats":null,"previous_names":["roderik/ai-rules"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/roderik/ai-rules","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roderik%2Fai-rules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roderik%2Fai-rules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roderik%2Fai-rules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roderik%2Fai-rules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roderik","download_url":"https://codeload.github.com/roderik/ai-rules/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roderik%2Fai-rules/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004178,"owners_count":26083688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["claude-code","codex","cursor"],"created_at":"2025-10-10T14:14:04.261Z","updated_at":"2025-10-10T14:14:06.904Z","avatar_url":"https://github.com/roderik.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI Rules\n\nProfessional AI assistant configurations for Claude Code, Codex CLI, OpenCode and Gemini CLI with enterprise-grade defaults for Solidity and TypeScript development.\n\n## Complete Setup\n\nThis repository is part of a comprehensive development environment setup. For the full experience, check out:\n\n- **[Shell Config](https://github.com/roderik/shell-config)** - Shell configuration and dotfiles\n- **[AI Rules](https://github.com/roderik/ai-rules)** - AI assistant configurations (this repo)\n- **[WT](https://github.com/roderik/wt)** - Windows Terminal configuration\n\n**Author**: [@r0derik](https://x.com/r0derik)\n\n## Features\n\n### 🎯 Smart Configuration\n\n- **Multi-AI Support**: Unified configuration for Claude Code, Codex CLI, and Gemini CLI\n- **Optimized Environment Variables**: Extended timeouts, enhanced output limits, deep thinking tokens\n- **Professional Hooks**: Auto-formatting with Prettier and Forge, security warnings, sensitive file protection\n- **Status Line Integration**: Real-time usage tracking with `ccusage`\n- **MCP Server Support**: Shared MCP servers across all AI assistants\n- **AI Agents**: Automatic code review, test runner, and PR creator agents\n- **Custom Commands**: Unified `/review`, `/test`, and `/pr` commands across platforms\n\n### 🛡️ Security First\n\n- Warns about dangerous commands (`rm -rf`, `sudo`, etc.)\n- Protects sensitive files (`.env`, secrets, SSH configs)\n- Blocks prompts containing passwords or API keys\n- Creates backups before any modifications\n\n### 🎨 Developer Experience\n\n- Beautiful gradient ASCII art banner\n- Colorful terminal output with emoji indicators\n- Dry-run mode for safe testing\n- Selective installation (Code-only or Desktop-only)\n- Intelligent JSON merging preserves your settings\n\n## Quick Install\n\n### Basic One-liner\n\n```bash\n# Default installation\ncurl -fsSL https://raw.githubusercontent.com/roderik/ai-rules/main/install.sh | bash\n```\n\n### One-liner with Options\n\n```bash\n# Preview changes without installing (dry run)\ncurl -fsSL https://raw.githubusercontent.com/roderik/ai-rules/main/install.sh | bash -s -- --dry-run\n\n# Force overwrite existing configurations\ncurl -fsSL https://raw.githubusercontent.com/roderik/ai-rules/main/install.sh | bash -s -- --force\n\n# Using wget instead of curl\nwget -qO- https://raw.githubusercontent.com/roderik/ai-rules/main/install.sh | bash -s -- --dry-run\n```\n\n### Clone and Install\n\n```bash\ngit clone https://github.com/roderik/ai-rules.git\ncd ai-rules\n./install.sh\n```\n\n## Installation Options\n\n```bash\n# Default installation\n./install.sh\n\n# Preview changes without installing\n./install.sh --dry-run\n\n# Force overwrite existing configurations\n./install.sh --force\n```\n\n## Configuration Locations\n\nConfigurations are installed to:\n\n- **Claude Code**: `~/.claude/`\n- **Codex CLI**: `~/.codex/`\n- **Gemini CLI**: `~/.gemini/`\n\n## What Gets Installed\n\n### AI Agents (Claude Code)\n\n- **code-reviewer**: Automatically reviews code changes for quality, security, and best practices\n  - Invoke directly with `@code-reviewer` in Claude Code\n  - Runs automatically after code modifications\n  - Checks for security vulnerabilities\n  - Validates architecture patterns\n  - Suggests improvements\n\n- **test-runner**: Proactive agent for running quality checks\n  - Invoke directly with `@test-runner` in Claude Code\n  - Runs tests, linting, and formatting\n  - Returns focused error list with file:line:function format\n  - Critical requirement - runs after ANY code change\n  - No exceptions for quality enforcement\n\n- **pr-creator**: PR creation and lifecycle management agent\n  - Invoke directly with `@pr-creator` in Claude Code\n  - Creates pull requests when explicitly requested\n  - Handles branch creation, commits, and pushing\n  - Generates PR title and description from changes\n  - Returns PR URL for review\n\n### Custom Commands\n\n#### Claude Code \u0026 Gemini CLI\n\n- **/review**: Manual trigger for comprehensive code review\n  - Claude: Use `@code-reviewer` to invoke the agent directly\n  - Gemini: Scripted behavior matching agent functionality\n  - Reviews unstaged, staged, and branch commits\n  - Provides detailed feedback\n\n- **/test**: Automated test and fix workflow\n  - Claude: Launches test-runner agent to check for issues\n  - Gemini: Scripted test execution and auto-fix\n  - Automatically fixes format, lint, and type errors\n  - Iterates until all checks pass\n  - Returns focused error list with file:line format\n\n- **/pr**: Create pull requests with a single command\n  - Claude: Uses pr-creator agent\n  - Gemini: Scripted PR creation workflow\n  - Handles complete PR workflow automatically\n  - Creates appropriate branch names\n  - Commits uncommitted changes\n  - Generates PR title and description from changes\n  - Supports Linear ticket integration\n  - Returns PR URL for review\n\n### Environment Variables\n\n```json\n{\n  \"ENABLE_BACKGROUND_TASKS\": \"1\",\n  \"FORCE_AUTO_BACKGROUND_TASKS\": \"1\",\n  \"CLAUDE_CODE_ENABLE_UNIFIED_READ_TOOL\": \"1\",\n  \"CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR\": \"1\",\n  \"BASH_MAX_TIMEOUT_MS\": \"600000\",\n  \"BASH_DEFAULT_TIMEOUT_MS\": \"600000\",\n  \"BASH_MAX_OUTPUT_LENGTH\": \"50000\",\n  \"CLAUDE_CODE_MAX_OUTPUT_TOKENS\": \"8192\",\n  \"MAX_THINKING_TOKENS\": \"32768\",\n  \"MCP_TIMEOUT\": \"30000\",\n  \"MCP_TOOL_TIMEOUT\": \"60000\",\n  \"MAX_MCP_OUTPUT_TOKENS\": \"50000\",\n  \"DISABLE_COST_WARNINGS\": \"1\",\n  \"DISABLE_NON_ESSENTIAL_MODEL_CALLS\": \"1\"\n}\n```\n\n### Hooks\n\n- **PostToolUse**: Auto-format with Prettier and Forge for Solidity\n- **PreToolUse**: Security warnings for dangerous operations\n- **SessionStart**: Session logging with timestamp\n- **UserPromptSubmit**: Sensitive data filtering\n\n### Features\n\n- `ccusage` status line for real-time usage tracking\n- Auto-approval for all project MCP servers\n- Co-authorship disabled by default\n\n### Multi-AI Collaboration\n\nThe configuration supports seamless collaboration between AI assistants:\n\n#### Codex CLI\n\n- **AGENTS.md**: Specialized agent instructions for multi-model collaboration\n- **config.toml**: Model selection and prompt customization\n- **Role**: Complex implementation and code generation specialist\n\n#### Gemini CLI\n\n- **AGENTS.md**: Shared agent collaboration instructions\n- **settings.json**: Shared MCP servers with Claude\n- **commands.toml**: Unified command structure (`/pr`, `/review`, `/test`)\n- **Role**: Validation, review, and quality assurance specialist\n\n### MCP Servers\n\nShared MCP (Model Context Protocol) servers across all AI assistants:\n\n#### Shared Across All Platforms\n\n- **linear**: Linear issue tracking integration\n- **context7**: Library documentation and code examples\n- **deepwiki**: GitHub repository documentation\n- **sentry**: Error tracking and monitoring\n- **playwright**: Browser automation and testing\n- **grep**: Code search across GitHub\n- **OpenZeppelinSolidityContracts**: Solidity contract templates\n- **octocode**: GitHub code exploration\n\n## Uninstallation\n\n### Basic One-liner\n\n```bash\n# Default uninstall\ncurl -fsSL https://raw.githubusercontent.com/roderik/ai-rules/main/uninstall.sh | bash\n```\n\n### One-liner with Options\n\n```bash\n# Preview what will be removed (dry run)\ncurl -fsSL https://raw.githubusercontent.com/roderik/ai-rules/main/uninstall.sh | bash -s -- --dry-run\n\n# Skip confirmation prompt\ncurl -fsSL https://raw.githubusercontent.com/roderik/ai-rules/main/uninstall.sh | bash -s -- --force\n\n# Using wget instead of curl\nwget -qO- https://raw.githubusercontent.com/roderik/ai-rules/main/uninstall.sh | bash -s -- --dry-run\n```\n\n### Using Local Script\n\n```bash\n./uninstall.sh           # Interactive uninstall\n./uninstall.sh --dry-run # Preview what will be removed\n./uninstall.sh --force   # Skip confirmation prompt\n```\n\nThe uninstaller:\n\n- Preserves your personal settings\n- Creates timestamped backups\n- Only removes AI Rules specific configurations\n\n## Requirements\n\n- `jq` - JSON processor (required)\n- `git` - Version control (required)\n- `bun` or `npm` - For Prettier formatting\n- `forge` - For Solidity formatting (optional)\n\n### Installing Dependencies\n\n**macOS:**\n\n```bash\nbrew install jq git\n```\n\n**Ubuntu/Debian:**\n\n```bash\nsudo apt-get install jq git\n```\n\n**Fedora/RHEL:**\n\n```bash\nsudo yum install jq git\n```\n\n**Arch Linux:**\n\n```bash\nsudo pacman -S jq git\n```\n\n## Advanced Usage\n\n### Custom Installation Directory\n\n```bash\nexport CLAUDE_CONFIG_ROOT=\"/custom/path\"\n./install.sh\n```\n\n### Backup Files\n\nBoth installer and uninstaller create timestamped backups:\n\n- `settings.json.backup.YYYYMMDD_HHMMSS`\n- Preserves your existing configurations before changes\n\n### JSON Merging\n\nThe installer intelligently merges configurations:\n\n- Preserves existing user settings\n- Appends new hooks without duplicates\n- Merges environment variables\n- Handles nested JSON structures\n\n## Troubleshooting\n\n### Missing Dependencies\n\n```bash\n# Check for required tools\ncommand -v jq \u003e/dev/null || echo \"jq not installed\"\ncommand -v git \u003e/dev/null || echo \"git not installed\"\n```\n\n### Permission Errors\n\n```bash\n# Make scripts executable\nchmod +x install.sh uninstall.sh\n```\n\n### Forge Not Found\n\nForge formatting is optional. To enable Solidity formatting:\n\n```bash\n# Install Foundry\ncurl -L https://foundry.paradigm.xyz | bash\nfoundryup\n```\n\n### Status Line Not Working\n\nInstall ccusage for the status line feature:\n\n```bash\nnpm install -g ccusage\n# or\nbun add -g ccusage\n```\n\n## Project Structure\n\n```\nai-rules/\n├── .claude/                   # Claude Code configuration\n│   ├── agents/\n│   │   ├── code-reviewer.md  # AI code review agent\n│   │   ├── test-runner.md    # Quality checks agent\n│   │   └── pr-creator.md     # PR creation agent\n│   ├── commands/\n│   │   ├── review.md         # Manual review command\n│   │   ├── test.md           # Automated test/fix command\n│   │   └── pr.md             # PR creation command\n│   ├── settings/\n│   │   └── settings.json     # Environment variables and features\n│   ├── hooks/\n│   │   └── hooks.json        # Pre/Post tool hooks\n│   └── mcp/\n│       └── mcp.json          # MCP server configurations\n├── .codex/                    # Codex CLI configuration\n│   ├── config.toml           # Codex settings and model config\n│   └── AGENTS.md             # Agent collaboration instructions\n├── .gemini/                   # Gemini CLI configuration\n│   ├── settings.json         # Gemini settings with MCP servers\n│   └── commands.toml         # Custom command definitions\n├── CLAUDE.md                  # Global Claude instructions\n├── AGENTS.md                  # Global agent instructions\n├── install.sh                 # Installer script\n├── uninstall.sh               # Uninstaller script\n└── README.md                  # This file\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n### Development\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'feat: Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nMIT - See [LICENSE](LICENSE) file for details\n\n## Support\n\n- Issues: [GitHub Issues](https://github.com/roderik/ai-rules/issues)\n- Discussions: [GitHub Discussions](https://github.com/roderik/ai-rules/discussions)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froderik%2Fai-rules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froderik%2Fai-rules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froderik%2Fai-rules/lists"}