by tang-vu
Autonomous AI agent that contributes to open source — discovers repos, analyzes code, generates fixes, and submits PRs
# Add to your Claude Code skills
git clone https://github.com/tang-vu/ContribAIAI Agent that automatically contributes to open source projects on GitHub
ContribAI discovers open source repositories, analyzes them for improvement opportunities, generates high-quality fixes, and submits them as Pull Requests — all autonomously.
.md, .yaml, .json, .toml and meta files (LICENSE, CONTRIBUTING.md)contribai cleanup removes stale forks with no open PRsSigned-off-by to all commitsast.parse fallback:8787asyncio.gather + Semaphore (3 concurrent repos)security-focused, docs-focused, full-scan, gentle Middleware Chain
Discovery → [RateLimit → Validation → Retry → DCO → QualityGate]
│ │
▼ ▼
GitHub ┌──────────Sub-Agent Registry──────────┐
Search │ Analyzer │ Generator │ Patrol │ Compliance │ MCP │
+ Hunt └────┬──────────┬──────────┬────────┬──┘
+ Webhooks │ │ │ │
┌────▼────┐ ┌───▼───┐ ┌───▼───┐ ┌─▼──┐
│ Skills │ │ LLM │ │GitHub │ │DCO │
│(17 on- │ │+ Tool │ │+ Tool │ │Sign│
│ demand) │ │Protocol│ │ │ │off │
└────┬────┘ └───┬───┘ └───┬───┘ └─┬──┘
└──────────┴─────────┴───────┘
│
Outcome Memory (SQLite)
6 tables + learning
See docs/ARCHITECTURE.md for detailed architecture documentation.
git clone https://github.com/tang-vu/ContribAI.git
cd ContribAI
pip install -e ".[dev]"
docker compose up -d dashboard # Dashboard at :8787
docker compose run --rm runner run # One-shot run
docker compose up -d dashboard scheduler # Dashboard + scheduler
cp config.example.yaml config.yaml
Edit config.yaml:
github:
token: "ghp_your_token_here"
llm:
provider: "gemini"
model: "gemini-2.5-flash"
api_key: "your_api_key"
discovery:
languages: [python, javascript]
stars_range: [100, 5000]
contribai hunt # Hunt for repos and contribute
contribai hunt --rounds 5 --delay 15 # 5 rounds, 15min delay
contribai hunt --mode analysis # Code analysis only (no issues)
contribai hunt --mode issues # Issue solving only
contribai hunt --mode both # Both analysis + issues (default)
contribai target https://github.com/owner/repo
contribai target https://github.com/owner/repo --dry-run
contribai run # Full autonomous run
contribai run --dry-run # Preview without creating PRs
contribai run --language python # Filter by language
contribai solve https://github.com/owner/repo
contribai serve # Dashboard at :8787
contribai serve --port 9000 # Custom port
contribai schedule --cron "0 */6 * * *" # Auto-run every 6h
contribai templates # List contribution templates
contribai profile list # List profiles
contribai profile security-focused # Run with profile
contribai status # Check submitted PRs
contribai stats # Overall statistics
contribai info # System info
contribai cleanup # Remove stale forks with no open PRs
Create custom analyzers as Python packages:
from contribai.plugins.base import AnalyzerPlugin
class MyAnalyzer(AnalyzerPlugin):
@property
def name(self): return "my-analyzer"
async def analyze(self, context):
return findings
Register via entry points in pyproject.toml:
[project.entry-points."contribai.analyzers"]
my_analyzer = "my_package:MyAnalyzer"
contribai/
├── core/ # Config, models, middleware chain
├── llm/ # Multi-provider LLM (Gemini, OpenAI, Anthropic, Ollama, Vertex)
├── github/ # GitHub API client, repo discovery, guidelines
├── analysis/ # 7 analyzers + progressive skill loading (17 skills)
├── agents/ # Sub-agent registry (Analyzer, Generator, Patrol, Compliance)
├── tools/ # MCP-inspired tool protocol (GitHubTool, LLMTool)
├── mcp_server.py # MCP stdio server (14 tools for Claude Desktop)
├── generator/ # Contribution generator + self-review + quality scorer
├── issues/ # Issue-driven contribution solver
├── pr/ # PR lifecycle manager + patrol + CLA handler
├── orchestrator/ # Pipeline orchestrator, hunt mode, outcome memory
├── notifications/ # Slack, Discord, Telegram notifications
├── plugins/ # Plugin system (analyzer/generator extensions)
├── templates/ # Contribution templates (5 built-in YAM
No comments yet. Be the first to share your thoughts!