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
Updates GitHub workflow files to use the new claude-code-action@v1 and replaces prompt_file with inline prompt parameter. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Generated-By: Claude Code (cli/claude-opus-4-5=100%) Claude-Steers: 3 Claude-Permission-Prompts: 4 Claude-Escapes: 0
| M.github/workflows/claude-dedupe-issues.yml |
| M.github/workflows/claude-issue-triage.yml |
| M.github/workflows/oncall-triage.yml |
| @@ -23,7 +23,7 @@ | ||
| 23 | 23 | uses: actions/checkout@v4 |
| 24 | 24 | |
| 25 | 25 | - name: Run Claude Code slash command |
| 26 | - uses: anthropics/claude-code-base-action@v1 | |
| 26 | + uses: anthropics/claude-code-action@v1 | |
| 27 | 27 | env: |
| 28 | 28 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 29 | 29 | with: |
| @@ -16,60 +16,6 @@ | ||
| 16 | 16 | - name: Checkout repository |
| 17 | 17 | uses: actions/checkout@v4 |
| 18 | 18 | |
| 19 | - - name: Create triage prompt | |
| 20 | - run: | | |
| 21 | - mkdir -p /tmp/claude-prompts | |
| 22 | - cat > /tmp/claude-prompts/triage-prompt.txt << 'EOF' | |
| 23 | - You're an issue triage assistant for GitHub issues. Your task is to analyze the issue and select appropriate labels from the provided list. | |
| 24 | - | |
| 25 | - IMPORTANT: Don't post any comments or messages to the issue. Your only action should be to apply labels. | |
| 26 | - | |
| 27 | - Issue Information: | |
| 28 | - - REPO: ${{ github.repository }} | |
| 29 | - - ISSUE_NUMBER: ${{ github.event.issue.number }} | |
| 30 | - | |
| 31 | - TASK OVERVIEW: | |
| 32 | - | |
| 33 | - 1. First, fetch the list of labels available in this repository by running: `gh label list`. Run exactly this command with nothing else. | |
| 34 | - | |
| 35 | - 2. Next, use the GitHub tools to get context about the issue: | |
| 36 | - - You have access to these tools: | |
| 37 | - - mcp__github__get_issue: Use this to retrieve the current issue's details including title, description, and existing labels | |
| 38 | - - mcp__github__get_issue_comments: Use this to read any discussion or additional context provided in the comments | |
| 39 | - - mcp__github__update_issue: Use this to apply labels to the issue (do not use this for commenting) | |
| 40 | - - mcp__github__search_issues: Use this to find similar issues that might provide context for proper categorization and to identify potential duplicate issues | |
| 41 | - - mcp__github__list_issues: Use this to understand patterns in how other issues are labeled | |
| 42 | - - Start by using mcp__github__get_issue to get the issue details | |
| 43 | - | |
| 44 | - 3. Analyze the issue content, considering: | |
| 45 | - - The issue title and description | |
| 46 | - - The type of issue (bug report, feature request, question, etc.) | |
| 47 | - - Technical areas mentioned | |
| 48 | - - Severity or priority indicators | |
| 49 | - - User impact | |
| 50 | - - Components affected | |
| 51 | - | |
| 52 | - 4. Select appropriate labels from the available labels list provided above: | |
| 53 | - - Choose labels that accurately reflect the issue's nature | |
| 54 | - - Be specific but comprehensive | |
| 55 | - - Select priority labels if you can determine urgency (high-priority, med-priority, or low-priority) | |
| 56 | - - Consider platform labels (android, ios) if applicable | |
| 57 | - - If you find similar issues using mcp__github__search_issues, consider using a "duplicate" label if appropriate. Only do so if the issue is a duplicate of another OPEN issue. | |
| 58 | - | |
| 59 | - 5. Apply the selected labels: | |
| 60 | - - Use mcp__github__update_issue to apply your selected labels | |
| 61 | - - DO NOT post any comments explaining your decision | |
| 62 | - - DO NOT communicate directly with users | |
| 63 | - - If no labels are clearly applicable, do not apply any labels | |
| 64 | - | |
| 65 | - IMPORTANT GUIDELINES: | |
| 66 | - - Be thorough in your analysis | |
| 67 | - - Only select labels from the provided list above | |
| 68 | - - DO NOT post any comments to the issue | |
| 69 | - - Your ONLY action should be to apply labels using mcp__github__update_issue | |
| 70 | - - It's okay to not add any labels if none are clearly applicable | |
| 71 | - EOF | |
| 72 | - | |
| 73 | 19 | - name: Setup GitHub MCP Server |
| 74 | 20 | run: | |
| 75 | 21 | mkdir -p /tmp/mcp-config |
| @@ -96,11 +42,59 @@ | ||
| 96 | 42 | |
| 97 | 43 | - name: Run Claude Code for Issue Triage |
| 98 | 44 | timeout-minutes: 5 |
| 99 | - uses: anthropics/claude-code-base-action@v1 | |
| 45 | + uses: anthropics/claude-code-action@v1 | |
| 100 | 46 | env: |
| 101 | 47 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 102 | 48 | with: |
| 103 | - prompt_file: /tmp/claude-prompts/triage-prompt.txt | |
| 49 | + prompt: | | |
| 50 | + You're an issue triage assistant for GitHub issues. Your task is to analyze the issue and select appropriate labels from the provided list. | |
| 51 | + | |
| 52 | + IMPORTANT: Don't post any comments or messages to the issue. Your only action should be to apply labels. | |
| 53 | + | |
| 54 | + Issue Information: | |
| 55 | + - REPO: ${{ github.repository }} | |
| 56 | + - ISSUE_NUMBER: ${{ github.event.issue.number }} | |
| 57 | + | |
| 58 | + TASK OVERVIEW: | |
| 59 | + | |
| 60 | + 1. First, fetch the list of labels available in this repository by running: `gh label list`. Run exactly this command with nothing else. | |
| 61 | + | |
| 62 | + 2. Next, use the GitHub tools to get context about the issue: | |
| 63 | + - You have access to these tools: | |
| 64 | + - mcp__github__get_issue: Use this to retrieve the current issue's details including title, description, and existing labels | |
| 65 | + - mcp__github__get_issue_comments: Use this to read any discussion or additional context provided in the comments | |
| 66 | + - mcp__github__update_issue: Use this to apply labels to the issue (do not use this for commenting) | |
| 67 | + - mcp__github__search_issues: Use this to find similar issues that might provide context for proper categorization and to identify potential duplicate issues | |
| 68 | + - mcp__github__list_issues: Use this to understand patterns in how other issues are labeled | |
| 69 | + - Start by using mcp__github__get_issue to get the issue details | |
| 70 | + | |
| 71 | + 3. Analyze the issue content, considering: | |
| 72 | + - The issue title and description | |
| 73 | + - The type of issue (bug report, feature request, question, etc.) | |
| 74 | + - Technical areas mentioned | |
| 75 | + - Severity or priority indicators | |
| 76 | + - User impact | |
| 77 | + - Components affected | |
| 78 | + | |
| 79 | + 4. Select appropriate labels from the available labels list provided above: | |
| 80 | + - Choose labels that accurately reflect the issue's nature | |
| 81 | + - Be specific but comprehensive | |
| 82 | + - Select priority labels if you can determine urgency (high-priority, med-priority, or low-priority) | |
| 83 | + - Consider platform labels (android, ios) if applicable | |
| 84 | + - If you find similar issues using mcp__github__search_issues, consider using a "duplicate" label if appropriate. Only do so if the issue is a duplicate of another OPEN issue. | |
| 85 | + | |
| 86 | + 5. Apply the selected labels: | |
| 87 | + - Use mcp__github__update_issue to apply your selected labels | |
| 88 | + - DO NOT post any comments explaining your decision | |
| 89 | + - DO NOT communicate directly with users | |
| 90 | + - If no labels are clearly applicable, do not apply any labels | |
| 91 | + | |
| 92 | + IMPORTANT GUIDELINES: | |
| 93 | + - Be thorough in your analysis | |
| 94 | + - Only select labels from the provided list above | |
| 95 | + - DO NOT post any comments to the issue | |
| 96 | + - Your ONLY action should be to apply labels using mcp__github__update_issue | |
| 97 | + - It's okay to not add any labels if none are clearly applicable | |
| 104 | 98 | anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} |
| 105 | 99 | claude_args: | |
| 106 | 100 | --model claude-sonnet-4-5-20250929 |
| @@ -21,69 +21,6 @@ | ||
| 21 | 21 | - name: Checkout repository |
| 22 | 22 | uses: actions/checkout@v4 |
| 23 | 23 | |
| 24 | - - name: Create oncall triage prompt | |
| 25 | - run: | | |
| 26 | - mkdir -p /tmp/claude-prompts | |
| 27 | - cat > /tmp/claude-prompts/oncall-triage-prompt.txt << 'EOF' | |
| 28 | - You're an oncall triage assistant for GitHub issues. Your task is to identify critical issues that require immediate oncall attention. | |
| 29 | - | |
| 30 | - Important: Don't post any comments or messages to the issues. Your only action should be to apply the "oncall" label to qualifying issues. | |
| 31 | - | |
| 32 | - Repository: ${{ github.repository }} | |
| 33 | - | |
| 34 | - Task overview: | |
| 35 | - 1. Fetch all open issues updated in the last 3 days: | |
| 36 | - - Use mcp__github__list_issues with: | |
| 37 | - - state="open" | |
| 38 | - - first=5 (fetch only 5 issues per page) | |
| 39 | - - orderBy="UPDATED_AT" | |
| 40 | - - direction="DESC" | |
| 41 | - - This will give you the most recently updated issues first | |
| 42 | - - For each page of results, check the updatedAt timestamp of each issue | |
| 43 | - - Add issues updated within the last 3 days (72 hours) to your TODO list as you go | |
| 44 | - - Keep paginating using the 'after' parameter until you encounter issues older than 3 days | |
| 45 | - - Once you hit issues older than 3 days, you can stop fetching (no need to fetch all open issues) | |
| 46 | - | |
| 47 | - 2. Build your TODO list incrementally as you fetch: | |
| 48 | - - As you fetch each page, immediately add qualifying issues to your TODO list | |
| 49 | - - One TODO item per issue number (e.g., "Evaluate issue #123") | |
| 50 | - - This allows you to start processing while still fetching more pages | |
| 51 | - | |
| 52 | - 3. For each issue in your TODO list: | |
| 53 | - - Use mcp__github__get_issue to read the issue details (title, body, labels) | |
| 54 | - - Use mcp__github__get_issue_comments to read all comments | |
| 55 | - - Evaluate whether this issue needs the oncall label: | |
| 56 | - a) Is it a bug? (has "bug" label or describes bug behavior) | |
| 57 | - b) Does it have at least 50 engagements? (count comments + reactions) | |
| 58 | - c) Is it truly blocking? Read and understand the full content to determine: | |
| 59 | - - Does this prevent core functionality from working? | |
| 60 | - - Can users work around it? | |
| 61 | - - Consider severity indicators: "crash", "stuck", "frozen", "hang", "unresponsive", "cannot use", "blocked", "broken" | |
| 62 | - - Be conservative - only flag issues that truly prevent users from getting work done | |
| 63 | - | |
| 64 | - 4. For issues that meet all criteria and do not already have the "oncall" label: | |
| 65 | - - Use mcp__github__update_issue to add the "oncall" label | |
| 66 | - - Do not post any comments | |
| 67 | - - Do not remove any existing labels | |
| 68 | - - Do not remove the "oncall" label from issues that already have it | |
| 69 | - | |
| 70 | - Important guidelines: | |
| 71 | - - Use the TODO list to track your progress through ALL candidate issues | |
| 72 | - - Process issues efficiently - don't read every single issue upfront, work through your TODO list systematically | |
| 73 | - - Be conservative in your assessment - only flag truly critical blocking issues | |
| 74 | - - Do not post any comments to issues | |
| 75 | - - Your only action should be to add the "oncall" label using mcp__github__update_issue | |
| 76 | - - Mark each issue as complete in your TODO list as you process it | |
| 77 | - | |
| 78 | - 7. After processing all issues in your TODO list, provide a summary of your actions: | |
| 79 | - - Total number of issues processed (candidate issues evaluated) | |
| 80 | - - Number of issues that received the "oncall" label | |
| 81 | - - For each issue that got the label: list issue number, title, and brief reason why it qualified | |
| 82 | - - Close calls: List any issues that almost qualified but didn't quite meet the criteria (e.g., borderline blocking, had workarounds) | |
| 83 | - - If no issues qualified, state that clearly | |
| 84 | - - Format the summary clearly for easy reading | |
| 85 | - EOF | |
| 86 | - | |
| 87 | 24 | - name: Setup GitHub MCP Server |
| 88 | 25 | run: | |
| 89 | 26 | mkdir -p /tmp/mcp-config |
| @@ -110,11 +47,68 @@ | ||
| 110 | 47 | |
| 111 | 48 | - name: Run Claude Code for Oncall Triage |
| 112 | 49 | timeout-minutes: 10 |
| 113 | - uses: anthropics/claude-code-base-action@v1 | |
| 50 | + uses: anthropics/claude-code-action@v1 | |
| 114 | 51 | env: |
| 115 | 52 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 116 | 53 | with: |
| 117 | - prompt_file: /tmp/claude-prompts/oncall-triage-prompt.txt | |
| 54 | + prompt: | | |
| 55 | + You're an oncall triage assistant for GitHub issues. Your task is to identify critical issues that require immediate oncall attention. | |
| 56 | + | |
| 57 | + Important: Don't post any comments or messages to the issues. Your only action should be to apply the "oncall" label to qualifying issues. | |
| 58 | + | |
| 59 | + Repository: ${{ github.repository }} | |
| 60 | + | |
| 61 | + Task overview: | |
| 62 | + 1. Fetch all open issues updated in the last 3 days: | |
| 63 | + - Use mcp__github__list_issues with: | |
| 64 | + - state="open" | |
| 65 | + - first=5 (fetch only 5 issues per page) | |
| 66 | + - orderBy="UPDATED_AT" | |
| 67 | + - direction="DESC" | |
| 68 | + - This will give you the most recently updated issues first | |
| 69 | + - For each page of results, check the updatedAt timestamp of each issue | |
| 70 | + - Add issues updated within the last 3 days (72 hours) to your TODO list as you go | |
| 71 | + - Keep paginating using the 'after' parameter until you encounter issues older than 3 days | |
| 72 | + - Once you hit issues older than 3 days, you can stop fetching (no need to fetch all open issues) | |
| 73 | + | |
| 74 | + 2. Build your TODO list incrementally as you fetch: | |
| 75 | + - As you fetch each page, immediately add qualifying issues to your TODO list | |
| 76 | + - One TODO item per issue number (e.g., "Evaluate issue #123") | |
| 77 | + - This allows you to start processing while still fetching more pages | |
| 78 | + | |
| 79 | + 3. For each issue in your TODO list: | |
| 80 | + - Use mcp__github__get_issue to read the issue details (title, body, labels) | |
| 81 | + - Use mcp__github__get_issue_comments to read all comments | |
| 82 | + - Evaluate whether this issue needs the oncall label: | |
| 83 | + a) Is it a bug? (has "bug" label or describes bug behavior) | |
| 84 | + b) Does it have at least 50 engagements? (count comments + reactions) | |
| 85 | + c) Is it truly blocking? Read and understand the full content to determine: | |
| 86 | + - Does this prevent core functionality from working? | |
| 87 | + - Can users work around it? | |
| 88 | + - Consider severity indicators: "crash", "stuck", "frozen", "hang", "unresponsive", "cannot use", "blocked", "broken" | |
| 89 | + - Be conservative - only flag issues that truly prevent users from getting work done | |
| 90 | + | |
| 91 | + 4. For issues that meet all criteria and do not already have the "oncall" label: | |
| 92 | + - Use mcp__github__update_issue to add the "oncall" label | |
| 93 | + - Do not post any comments | |
| 94 | + - Do not remove any existing labels | |
| 95 | + - Do not remove the "oncall" label from issues that already have it | |
| 96 | + | |
| 97 | + Important guidelines: | |
| 98 | + - Use the TODO list to track your progress through ALL candidate issues | |
| 99 | + - Process issues efficiently - don't read every single issue upfront, work through your TODO list systematically | |
| 100 | + - Be conservative in your assessment - only flag truly critical blocking issues | |
| 101 | + - Do not post any comments to issues | |
| 102 | + - Your only action should be to add the "oncall" label using mcp__github__update_issue | |
| 103 | + - Mark each issue as complete in your TODO list as you process it | |
| 104 | + | |
| 105 | + 7. After processing all issues in your TODO list, provide a summary of your actions: | |
| 106 | + - Total number of issues processed (candidate issues evaluated) | |
| 107 | + - Number of issues that received the "oncall" label | |
| 108 | + - For each issue that got the label: list issue number, title, and brief reason why it qualified | |
| 109 | + - Close calls: List any issues that almost qualified but didn't quite meet the criteria (e.g., borderline blocking, had workarounds) | |
| 110 | + - If no issues qualified, state that clearly | |
| 111 | + - Format the summary clearly for easy reading | |
| 118 | 112 | anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} |
| 119 | 113 | claude_args: | |
| 120 | 114 | --mcp-config /tmp/mcp-config/mcp-servers.json |