🤖 Intelligent GitHub notification triage system powered by Claude AI
Automatic classification, prioritization, and action on your GitHub notifications with P1/P2/P3 levels, smart muting, and a feedback loop for continuous improvement.
With 314+ unread notifications spread across multiple repos, manual triage is impossible. This system:
- Classifies each notification: P1 (urgent), P2 (important), P3 (low)
- Suggests actions: review, approve, investigate, mute, skip
- Auto-executes: mutes low-priority items, labels dependencies
- Learns: tracks your feedback to improve classifications over time
- Scales: processes hundreds of notifications in minutes
git clone https://github.com/labgadget015-dotcom/github-notifications-copilot.git
cd github-notifications-copilot
pip install -r requirements.txtexport GITHUB_TOKEN="ghp_your_github_token_here"
export ANTHROPIC_API_KEY="sk-ant-your_key_here"python notification_copilot.py --dry-runThis shows what would happen without making actual changes.
python notification_copilot.py --execute┌─────────────────────────────────────────────────────────────┐
│ GitHub Notifications API │
│ (314 unread items) │
└────────────────────┬────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Enrich & Normalize │
│ Extract: repo, type, title, reason, timestamp │
└────────────────────┬────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ LLM Classifier (Claude) │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ P1: Security, urgent reviews, production bugs │ │
│ │ P2: Important features, workflow failures │ │
│ │ P3: Dependencies, discussions, old threads │ │
│ └──────────────────────────────────────────────────────┘ │
└────────────────────┬────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Actions Executor │
│ • Auto-mute P3 from non-critical repos │
│ • Auto-label dependencies │
│ • Save state to JSON for dashboard │
└────────────────────┬────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Output │
│ • digest.md (human-readable summary) │
│ • notifications_state.json (machine-readable) │
│ • dashboard UI (coming soon) │
└─────────────────────────────────────────────────────────────┘
github-notifications-copilot/
├── notification_copilot.py # Main entry point & orchestration
├── github_api_client.py # GitHub API wrapper
├── llm_classifier.py # LLM-powered triage logic
├── actions_executor.py # Auto-label, mute, archive
├── config.yaml # Configuration (repos, labels, etc.)
├── requirements.txt # Python dependencies
├── README.md # This file
└── examples/
├── sample_notifications.json # Test data
└── sample_output.json # Example triage output
github:
api_url: https://api.github.com
llm:
provider: anthropic
model: claude-3-5-sonnet-20241022
triage:
confidence_threshold: 0.7
important_repos:
- labgadget015-dotcom/autonomous-github-agent
- labgadget015-dotcom/analysis-os
- labgadget015-dotcom/github-multi-agent-system
mute_labels:
- dependencies
- chore
- stale
actions:
auto_mute: true
auto_label: true
dry_run: true # Set to false to actually execute- Your PRs waiting on you
- Security/vulnerability issues
- Production-critical bugs assigned to you
- Code reviews you requested
- Blocked PRs (branch protection)
- Your open PRs or issues needing review
- Important bugs affecting core repos
- Workflow failures in repos you own
- Feature requests for active projects
- Dependencies/dependabot updates
- CI passes/routine status checks
- Discussions/comments on issues
- Old threads (>2 days with no action)
- Chores/documentation
Machine-readable state of all notifications:
{
"fetched_at": "2026-01-24T03:00:00Z",
"total": 314,
"by_priority": { "P1": 12, "P2": 45, "P3": 257 },
"notifications": [
{
"notification": { ... },
"triage": {
"priority": "P1",
"category": "security",
"action": "review_now",
"confidence": 0.95,
"reasoning": "Security issue assigned to you"
}
}
]
}Human-readable summary:
# GitHub Notifications Digest
Generated: 2026-01-24T03:00:00Z
## Summary
- **P1 (Urgent)**: 12 items
- **P2 (Important)**: 45 items
- **P3 (Low)**: 257 items
## P1 Items (Act Now)
- **autonomous-github-agent**: Security issue in OAuth flow
- Action: review_now | Confidence: 95%
- **analysis-os**: Workflow failed - Quality Check
- Action: investigate | Confidence: 88%Improve triage accuracy by rating classifications:
- Run triage:
python notification_copilot.py - Review output in
digest.md - Rate accuracy: "Was P1 correct? P2? P3?"
- Save feedback to
feedback.json - Script auto-adjusts LLM prompt based on patterns
Example feedback:
{
"notification_id": "123456",
"original_priority": "P2",
"user_priority": "P1",
"notes": "This PR blocks other work, should be P1"
}# 1. Fetch & triage
python notification_copilot.py --output digest.md
# 2. Read digest
cat digest.md
# 3. Handle P1 items (5-10 min)
# Go to GitHub, review P1 items
# 4. Execute auto-mutes
python notification_copilot.py --execute --mute-p3Use cron or GitHub Actions:
# In your crontab
0 */2 * * * cd /path/to/copilot && python notification_copilot.py --auto-execute >> copilot.log 2>&1from notification_copilot import NotificationCopilot
copilot = NotificationCopilot()
notifications = copilot.fetch()
triaged = copilot.classify(notifications)
# Custom logic
for item in triaged:
if item['triage']['priority'] == 'P1':
# Do something special
pass- P1 response time: How fast you handle urgent items
- False positive rate: P3 items you actually care about
- Mute accuracy: Items you muted but later needed
- Time saved: Minutes spent on triage vs. manual sorting
Edit llm_classifier.py to add repo-specific logic:
if repo == "critical-production-repo":
# All failures -> P1
return {"priority": "P1", ...}
if "security" in title.lower():
# Always P1
return {"priority": "P1", ...}- Web dashboard (React)
- Slack/email digest integration
- GitHub Actions workflow
- Custom label-based triage rules
- Team-based notification grouping
- Webhook for real-time processing
- Metrics dashboard
- Start with dry-run: Always use
--dry-runfirst to see what would happen - Customize repos: Update
important_reposlist to match your workflow - Review mute labels: Add labels that are noise for you
- Batch processing: Run at consistent times (morning, afternoon, evening)
- Archive old: Use GitHub's archive feature for threads >1 month old
Fork, improve, and submit PRs! Ideas:
- Better triage prompts
- Additional LLM providers (OpenAI, Anthropic alternatives)
- Dashboard UI
- Integration with project management tools
MIT
Built for autonomous development workflows. Designed to eliminate notification fatigue and let you focus on high-value work.
Questions? Open an issue or reach out.
Built with: Python 3.9+, Claude API, GitHub API, asyncio