This document describes the GitHub Actions-based automation system that uses Claude Code as an AI agent to manage issue lifecycle, detect duplicates, triage priority, and maintain repository health. These workflows automate tasks that would otherwise require manual human review of hundreds of issues.
For detailed documentation on specific automation systems, see:
The GitHub automation system consists of multiple GitHub Actions workflows that trigger on issue events (opened, commented) or scheduled intervals. Each workflow uses the anthropics/claude-code-action to run Claude Code in an automated context, providing it with specific prompts and tool access to perform repository management tasks.
Workflow Architecture
Sources: .github/workflows/claude-issue-triage.yml1-107 .github/workflows/claude-dedupe-issues.yml1-85 .github/workflows/oncall-triage.yml1-119
| Workflow | Event Trigger | Schedule | Manual | Concurrency |
|---|---|---|---|---|
claude-issue-triage.yml | issues.opened, issue_comment.created | - | - | Per-issue |
claude-dedupe-issues.yml | issues.opened | - | ✓ | Default |
oncall-triage.yml | - | Every 6 hours | ✓ | Default |
auto-close-duplicates.yml | - | Daily | ✓ | Default |
sweep.yml | - | Daily | ✓ | Default |
remove-autoclose-label.yml | issue_comment.created | - | - | Default |
log-issue-events.yml | Multiple issue events | - | - | Default |
issue-opened-dispatch.yml | issues.opened | - | - | Default |
Sources: .github/workflows/claude-issue-triage.yml2-17 .github/workflows/claude-dedupe-issues.yml3-11 .github/workflows/oncall-triage.yml3-10
All AI-powered workflows use the anthropics/claude-code-action@v1 GitHub Action, which provides Claude Code as a service for automation. The action accepts:
Common Parameters
| Parameter | Purpose | Example |
|---|---|---|
github_token | GitHub API access | ${{ secrets.GITHUB_TOKEN }} |
anthropic_api_key | Claude API access | ${{ secrets.ANTHROPIC_API_KEY }} |
allowed_non_write_users | Bypass permission checks | "*" (all users) |
prompt | Task instructions | Multi-line markdown |
claude_args | CLI arguments | --model claude-opus-4-6 |
Example Usage Pattern
Sources: .github/workflows/claude-issue-triage.yml27-107 .github/workflows/claude-dedupe-issues.yml26-35
Workflows grant Claude Code access to specific tools for interacting with GitHub. Two primary mechanisms exist:
1. GitHub CLI (gh) via Bash Tool
Most workflows use the gh CLI through the Bash tool with restricted command patterns:
Sources: .github/workflows/claude-issue-triage.yml106
2. GitHub MCP Server via MCP Tools
The oncall workflow uses the GitHub MCP Server for advanced querying capabilities:
Allowed MCP tools:
mcp__github__list_issues - Paginated issue listing with filtersmcp__github__get_issue - Detailed issue retrievalmcp__github__get_issue_comments - Comment thread accessmcp__github__update_issue - Label and state mutationsSources: .github/workflows/oncall-triage.yml25-47 .github/workflows/oncall-triage.yml117-118
| Aspect | gh CLI (Bash Tool) | GitHub MCP Server |
|---|---|---|
| Setup | Available by default | Requires Docker container setup |
| Pagination | Manual with --limit | Built-in with first/after cursor |
| Filtering | Limited to CLI flags | GraphQL-level filters (orderBy, direction) |
| Used By | Triage, Dedupe | Oncall |
| Complexity | Simple shell commands | Structured tool calls |
| Performance | Single-shot queries | Efficient incremental fetching |
Sources: .github/workflows/claude-issue-triage.yml53-56 .github/workflows/oncall-triage.yml66-75
Workflows mutate issue state through two primary mechanisms:
Label Categories
| Category | Labels | Purpose | Applied By |
|---|---|---|---|
| Type | bug, enhancement, question, documentation, duplicate, invalid | Issue categorization | Triage |
| Lifecycle | needs-repro, needs-info, stale, autoclose | Issue health tracking | Triage, Sweep |
| Platform | platform:linux, platform:macos, platform:windows, platform:vscode, etc. | Environment identification | Triage |
| API | api:bedrock, api:vertex | API-specific issues | Triage |
| Priority | oncall | Critical blocking issues | Oncall |
Label Lifecycle Flow
Sources: .github/workflows/claude-issue-triage.yml45-50 .github/workflows/claude-issue-triage.yml72-80
Comment Patterns
Workflows add structured comments to issues for:
Example from dedupe workflow:
Sources: .github/workflows/claude-dedupe-issues.yml33
All workflows request minimal permissions following the principle of least privilege:
The allowed_non_write_users: "*" parameter bypasses the default claude-code-action restriction that only allows repository write users to trigger workflows.
Sources: .github/workflows/claude-issue-triage.yml18-21 .github/workflows/claude-dedupe-issues.yml17-20 .github/workflows/oncall-triage.yml16-19
Different workflows use different Claude models based on task complexity:
| Workflow | Model | Rationale |
|---|---|---|
| Issue Triage | claude-opus-4-6 | Complex decision-making requiring nuanced understanding of issue context |
| Issue Dedupe | claude-sonnet-4-5-20250929 | Balance between speed and accuracy for similarity detection |
| Oncall | Default (Haiku/Sonnet) | Lightweight filtering followed by deeper analysis |
| General @claude | claude-sonnet-4-5-20250929 | General-purpose tasks |
Sources: .github/workflows/claude-issue-triage.yml105 .github/workflows/claude-dedupe-issues.yml35 .github/workflows/claude.yml37
Several workflows log events to Statsig for tracking automation effectiveness:
Event Types Logged
| Event Name | Workflow | When Logged | Metadata |
|---|---|---|---|
github_duplicate_comment_added | Dedupe | After posting duplicate comment | repository, issue_number, triggered_by, workflow_run_id |
github_issue_autoclosed | Auto-close | After closing duplicate | repository, issue_number, original_issue, days_since_warning |
github_issue_opened | Log Events | On issue creation | Full issue context |
Statsig Logging Pattern
Sources: .github/workflows/claude-dedupe-issues.yml37-84
The triage workflow uses per-issue concurrency to prevent race conditions:
This ensures:
Sources: .github/workflows/claude-issue-triage.yml15-17
All workflows implement defense-in-depth timeout layers:
This prevents runaway executions and ensures predictable resource usage.
Sources: .github/workflows/claude-issue-triage.yml10-11 .github/workflows/claude-issue-triage.yml27-28
The automation system includes multiple escape hatches to prevent false positives:
1. Manual Trigger Override
workflow_dispatch for manual reruns2. Activity Detection
remove-autoclose-label.yml removes auto-close labels when humans commentstale and autoclose labels automatically3. Reaction Monitoring
4. Conservative Guidelines All prompts include instructions like:
Sources: .github/workflows/claude-issue-triage.yml96-102 .github/workflows/oncall-triage.yml100-105
The .claude/commands/ directory contains command definitions that can be used both interactively (via CLI) and in automated workflows, promoting code reuse.
Sources: .github/workflows/claude-dedupe-issues.yml33 .claude/commands/oncall-triage.md1-41
Refresh this wiki