Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Arena - Claude Code Configuration

Personal Claude Code configuration for infrastructure and DevOps workflows. This repository contains rules, agents, commands (skills), hooks, and reference documentation optimized for SRE/DevOps work with Kubernetes, DigitalOcean, and GitOps workflows.

Directory Structure

ai-arena/
├── CLAUDE.md              # Global Claude Code instructions
├── settings.template.json # Template for ~/.claude/settings.json
├── rules/                 # Behavioral rules and constraints
│   ├── kubernetes.md      # K8s security and best practices
│   ├── sre-practices.md   # SRE standards (SLOs, observability)
│   └── doctl-safety.md    # DigitalOcean CLI safety guardrails
├── agents/                # Specialized agent prompts
│   ├── infra-reviewer.md  # K8s manifest reviewer
│   ├── security-scanner.md # Security assessment
│   ├── cost-analyzer.md   # Cloud cost optimization
│   ├── incident-responder.md # Incident guidance
│   └── observability-engineer.md # Metrics/logs setup
├── commands/              # Slash commands (skills)
│   ├── cost-check.md      # /cost-check - Analyze infrastructure costs
│   ├── requirement-gathering.md # /requirement-gathering - Interview for requirements
│   ├── runbook.md         # /runbook - Generate operational runbooks
│   ├── system-design.md   # /system-design - Architecture design
│   ├── log-detective.md   # /log-detective - Log analysis
│   ├── db-runbook.md      # /db-runbook - Database operations guide
│   └── setup-slos.md      # /setup-slos - Define SLOs and alerts
├── hooks/                 # Event-triggered scripts
│   ├── hooks.json         # Hook configuration
│   └── scripts/
│       ├── gemini-architecture-bridge.py # Dual-model (Claude + Gemini) for architecture
│       ├── pre-deploy-safety.sh          # Production deployment checks
│       ├── secret-scanner.sh             # Detect secrets in code
│       ├── yaml-validator.sh             # YAML syntax validation
│       └── session-memory.sh             # Session context persistence
└── reference/             # Quick reference docs
    ├── kubectl-quick.md   # Common kubectl commands
    └── db-commands.md     # Database health checks

Installation

  1. Clone to your Claude directory:

    git clone https://github.com/brixial/ai-arena.git ~/.claude/ai-arena
  2. Symlink or copy configurations:

    # Copy rules
    cp -r ~/.claude/ai-arena/rules/* ~/.claude/rules/
    
    # Copy agents
    cp -r ~/.claude/ai-arena/agents/* ~/.claude/agents/
    
    # Copy commands (skills)
    cp -r ~/.claude/ai-arena/commands/* ~/.claude/commands/
    
    # Copy hooks
    mkdir -p ~/.claude/hooks/scripts
    cp ~/.claude/ai-arena/hooks/scripts/* ~/.claude/hooks/scripts/
    chmod +x ~/.claude/hooks/scripts/*.sh
    
    # Copy reference
    cp -r ~/.claude/ai-arena/reference/* ~/.claude/reference/
    
    # Copy global CLAUDE.md
    cp ~/.claude/ai-arena/CLAUDE.md ~/.claude/CLAUDE.md
  3. Configure settings: Review settings.template.json and merge relevant sections into your ~/.claude/settings.json.

  4. Install plugins (optional):

    claude plugins install claude-hud@claude-hud
    claude plugins install explanatory-output-style@claude-plugins-official
    claude plugins install code-simplifier@claude-plugins-official
    claude plugins install terraform-skill@antonbabenko

Components

Rules

Rules are always-on behavioral constraints that guide Claude's responses:

Rule Purpose
kubernetes.md Enforces K8s best practices (resource limits, security context, probes, labels)
sre-practices.md SRE standards for SLOs, observability (RED/USE), alerting, change management
doctl-safety.md Prevents accidental DigitalOcean infrastructure deletion

Agents

Specialized personas for specific tasks:

Agent Use Case
infra-reviewer Review K8s manifests and Helm charts for production readiness
security-scanner Infrastructure and code security assessment
cost-analyzer Cloud cost analysis and optimization recommendations
incident-responder Incident triage and mitigation guidance
observability-engineer Metrics, logs, and traces setup assessment

Commands (Skills)

Invoke with /command-name:

Command Description
/cost-check Analyze DigitalOcean/K8s costs and find optimization opportunities
/requirement-gathering Interview-based requirements elicitation
/runbook Generate operational runbook from code and configs
/system-design Design system architecture with diagrams and IaC structure
/log-detective Analyze logs to find root cause with correlation
/db-runbook Generate database operations runbook
/setup-slos Define SLOs, SLIs, and generate Prometheus alerts

Hooks

Event-triggered automation:

Hook Trigger Purpose
gemini-architecture-bridge.py Task|Glob|Grep Routes architecture/design tasks to Gemini for large-scale analysis
pre-deploy-safety.sh Bash Warns on production deployments and dangerous operations
secret-scanner.sh Write|Edit Detects potential secrets (API keys, tokens, passwords)
yaml-validator.sh Write|Edit Validates YAML syntax before writing
session-memory.sh SessionStart Loads previous session context

Customization

Personalize the doctl-safety rule

Edit rules/doctl-safety.md and replace <YOUR_NAME> with your name for the authorization phrase.

Add new commands

Create a new .md file in commands/ with frontmatter:

---
allowed-tools: Read, Bash, Grep, Glob, Write
argument-hint: [description of arguments]
description: Brief description of what this command does
---

# Command Name

Instructions for Claude...

Configure Gemini integration

Set environment variables to control the Gemini bridge hook:

export GEMINI_ENABLED=true      # Enable/disable (default: true)
export GEMINI_MIN_FILES=5       # Minimum files to trigger Gemini
export GEMINI_TIMEOUT=90        # Timeout in seconds
export GEMINI_DEBUG=true        # Enable debug logging

Tech Stack

This configuration is optimized for:

  • Cloud: DigitalOcean (DOKS, Managed DBs, Spaces)
  • Edge: Cloudflare (CDN, WAF, DNS)
  • IaC: Terraform
  • Config Management: Ansible
  • Orchestration: Kubernetes + Helm
  • Backend: Rust (Axum), Go
  • Frontend: Next.js (App Router)

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages