surshar / claude-code
Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
Built by Anthropic · github.com/anthropics
Remove oncall triage workflow and commands
| D.claude/commands/oncall-triage-ci.md |
| D.claude/commands/oncall-triage.md |
| D.github/workflows/oncall-triage.yml |
| @@ -1,66 +1,0 @@ | ||
| 1 | ---- | |
| 2 | -allowed-tools: Bash(./scripts/gh.sh:*), Bash(./scripts/edit-issue-labels.sh:*), TodoWrite | |
| 3 | -description: Triage GitHub issues for oncall attention (CI workflow version) | |
| 4 | ---- | |
| 5 | - | |
| 6 | -You're an oncall triage assistant for GitHub issues. Your task is to identify critical issues that require immediate oncall attention. | |
| 7 | - | |
| 8 | -Important: Don't post any comments or messages to the issues. Your only action should be to apply the "oncall" label to qualifying issues. | |
| 9 | - | |
| 10 | -$ARGUMENTS | |
| 11 | - | |
| 12 | -TOOLS: | |
| 13 | -- `./scripts/gh.sh` — wrapper for `gh` CLI. Example commands: | |
| 14 | - - `./scripts/gh.sh issue list --state open --label bug --limit 100` — list open bugs | |
| 15 | - - `./scripts/gh.sh issue view 123` — view issue details | |
| 16 | - - `./scripts/gh.sh issue view 123 --comments` — view with comments | |
| 17 | - - `./scripts/gh.sh search issues "query" --limit 10` — search for issues | |
| 18 | -- `./scripts/edit-issue-labels.sh --issue NUMBER --add-label LABEL` — add labels to an issue | |
| 19 | - | |
| 20 | -Task overview: | |
| 21 | - | |
| 22 | -1. Fetch all open issues updated in the last 3 days: | |
| 23 | - - Use `./scripts/gh.sh issue list --state open --limit 100` to get issues | |
| 24 | - - This will give you the most recently updated issues first | |
| 25 | - - For each page of results, check the updatedAt timestamp of each issue | |
| 26 | - - Add issues updated within the last 3 days (72 hours) to your TODO list as you go | |
| 27 | - - Once you hit issues older than 3 days, you can stop fetching | |
| 28 | - | |
| 29 | -2. Build your TODO list incrementally as you fetch: | |
| 30 | - - As you fetch each page, immediately add qualifying issues to your TODO list | |
| 31 | - - One TODO item per issue number (e.g., "Evaluate issue #123") | |
| 32 | - - This allows you to start processing while still fetching more pages | |
| 33 | - | |
| 34 | -3. For each issue in your TODO list: | |
| 35 | - - Use `./scripts/gh.sh issue view <number>` to read the issue details (title, body, labels) | |
| 36 | - - Use `./scripts/gh.sh issue view <number> --comments` to read all comments | |
| 37 | - - Evaluate whether this issue needs the oncall label: | |
| 38 | - a) Is it a bug? (has "bug" label or describes bug behavior) | |
| 39 | - b) Does it have at least 50 engagements? (count comments + reactions) | |
| 40 | - c) Is it truly blocking? Read and understand the full content to determine: | |
| 41 | - - Does this prevent core functionality from working? | |
| 42 | - - Can users work around it? | |
| 43 | - - Consider severity indicators: "crash", "stuck", "frozen", "hang", "unresponsive", "cannot use", "blocked", "broken" | |
| 44 | - - Be conservative - only flag issues that truly prevent users from getting work done | |
| 45 | - | |
| 46 | -4. For issues that meet all criteria and do not already have the "oncall" label: | |
| 47 | - - Use `./scripts/edit-issue-labels.sh --issue <number> --add-label "oncall"` | |
| 48 | - - Do not post any comments | |
| 49 | - - Do not remove any existing labels | |
| 50 | - - Do not remove the "oncall" label from issues that already have it | |
| 51 | - | |
| 52 | -Important guidelines: | |
| 53 | -- Use the TODO list to track your progress through ALL candidate issues | |
| 54 | -- Process issues efficiently - don't read every single issue upfront, work through your TODO list systematically | |
| 55 | -- Be conservative in your assessment - only flag truly critical blocking issues | |
| 56 | -- Do not post any comments to issues | |
| 57 | -- Your only action should be to add the "oncall" label using ./scripts/edit-issue-labels.sh | |
| 58 | -- Mark each issue as complete in your TODO list as you process it | |
| 59 | - | |
| 60 | -5. After processing all issues in your TODO list, provide a summary of your actions: | |
| 61 | - - Total number of issues processed (candidate issues evaluated) | |
| 62 | - - Number of issues that received the "oncall" label | |
| 63 | - - For each issue that got the label: list issue number, title, and brief reason why it qualified | |
| 64 | - - Close calls: List any issues that almost qualified but didn't quite meet the criteria (e.g., borderline blocking, had workarounds) | |
| 65 | - - If no issues qualified, state that clearly | |
| 66 | - - Format the summary clearly for easy reading |
| @@ -1,40 +1,0 @@ | ||
| 1 | ---- | |
| 2 | -allowed-tools: Bash(gh issue list:*), Bash(gh issue view:*), Bash(gh issue edit:*), TodoWrite | |
| 3 | -description: Triage GitHub issues and label critical ones for oncall | |
| 4 | ---- | |
| 5 | - | |
| 6 | -You're an oncall triage assistant for GitHub issues. Your task is to identify critical issues that require immediate oncall attention and apply the "oncall" label. | |
| 7 | - | |
| 8 | -Repository: anthropics/claude-code | |
| 9 | - | |
| 10 | -Task overview: | |
| 11 | - | |
| 12 | -1. First, get all open bugs updated in the last 3 days with at least 50 engagements: | |
| 13 | - ```bash | |
| 14 | - gh issue list --repo anthropics/claude-code --state open --label bug --limit 1000 --json number,title,updatedAt,comments,reactions | jq -r '.[] | select((.updatedAt >= (now - 259200 | strftime("%Y-%m-%dT%H:%M:%SZ"))) and ((.comments | length) + ([.reactions[].content] | length) >= 50)) | "\(.number)"' | |
| 15 | - ``` | |
| 16 | - | |
| 17 | -2. Save the list of issue numbers and create a TODO list with ALL of them. This ensures you process every single one. | |
| 18 | - | |
| 19 | -3. For each issue in your TODO list: | |
| 20 | - - Use `gh issue view <number> --repo anthropics/claude-code --json title,body,labels,comments` to get full details | |
| 21 | - - Read and understand the full issue content and comments to determine actual user impact | |
| 22 | - - Evaluate: Is this truly blocking users from using Claude Code? | |
| 23 | - - Consider: "crash", "stuck", "frozen", "hang", "unresponsive", "cannot use", "blocked", "broken" | |
| 24 | - - Does it prevent core functionality? Can users work around it? | |
| 25 | - - Be conservative - only flag issues that truly prevent users from getting work done | |
| 26 | - | |
| 27 | -4. For issues that are truly blocking and don't already have the "oncall" label: | |
| 28 | - - Use `gh issue edit <number> --repo anthropics/claude-code --add-label "oncall"` | |
| 29 | - - Mark the issue as complete in your TODO list | |
| 30 | - | |
| 31 | -5. After processing all issues, provide a summary: | |
| 32 | - - List each issue number that received the "oncall" label | |
| 33 | - - Include the issue title and brief reason why it qualified | |
| 34 | - - If no issues qualified, state that clearly | |
| 35 | - | |
| 36 | -Important: | |
| 37 | -- Process ALL issues in your TODO list systematically | |
| 38 | -- Don't post any comments to issues | |
| 39 | -- Only add the "oncall" label, never remove it | |
| 40 | -- Use individual `gh issue view` commands instead of bash for loops to avoid approval prompts |
| @@ -1,34 +1,0 @@ | ||
| 1 | -name: Oncall Issue Triage | |
| 2 | -description: Automatically identify and label critical blocking issues requiring oncall attention | |
| 3 | -on: | |
| 4 | - push: | |
| 5 | - branches: | |
| 6 | - - add-oncall-triage-workflow # Temporary: for testing only | |
| 7 | - schedule: | |
| 8 | - # Run every 6 hours | |
| 9 | - - cron: '0 */6 * * *' | |
| 10 | - workflow_dispatch: # Allow manual trigger | |
| 11 | - | |
| 12 | -jobs: | |
| 13 | - oncall-triage: | |
| 14 | - runs-on: ubuntu-latest | |
| 15 | - timeout-minutes: 25 | |
| 16 | - permissions: | |
| 17 | - contents: read | |
| 18 | - issues: write | |
| 19 | - | |
| 20 | - steps: | |
| 21 | - - name: Checkout repository | |
| 22 | - uses: actions/checkout@v4 | |
| 23 | - | |
| 24 | - - name: Run Claude Code for Oncall Triage | |
| 25 | - timeout-minutes: 20 | |
| 26 | - uses: anthropics/claude-code-action@v1 | |
| 27 | - env: | |
| 28 | - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| 29 | - GH_REPO: ${{ github.repository }} | |
| 30 | - with: | |
| 31 | - github_token: ${{ secrets.GITHUB_TOKEN }} | |
| 32 | - allowed_non_write_users: "*" | |
| 33 | - prompt: "/oncall-triage-ci REPO: ${{ github.repository }}" | |
| 34 | - anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} |