mirror of
https://github.com/anthropics/claude-code.git
synced 2026-04-24 05:02:43 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a91286a82 | ||
|
|
3196f36cee | ||
|
|
7d22b6e167 | ||
|
|
19a829ba68 | ||
|
|
18979efb8d | ||
|
|
f77acdf149 | ||
|
|
c13cf781ef | ||
|
|
cc70d3ab50 | ||
|
|
250b257c4e | ||
|
|
dec754edc9 |
5
.github/workflows/claude-dedupe-issues.yml
vendored
5
.github/workflows/claude-dedupe-issues.yml
vendored
@@ -17,16 +17,19 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
issues: write
|
issues: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Run Claude Code slash command
|
- name: Run Claude Code slash command
|
||||||
uses: anthropics/claude-code-base-action@v1
|
uses: anthropics/claude-code-action@v1
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
allowed_non_write_users: "*"
|
||||||
prompt: "/dedupe ${{ github.repository }}/issues/${{ github.event.issue.number || inputs.issue_number }}"
|
prompt: "/dedupe ${{ github.repository }}/issues/${{ github.event.issue.number || inputs.issue_number }}"
|
||||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||||
claude_args: "--model claude-sonnet-4-5-20250929"
|
claude_args: "--model claude-sonnet-4-5-20250929"
|
||||||
|
|||||||
109
.github/workflows/claude-issue-triage.yml
vendored
109
.github/workflows/claude-issue-triage.yml
vendored
@@ -11,65 +11,12 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
issues: write
|
issues: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Create triage prompt
|
|
||||||
run: |
|
|
||||||
mkdir -p /tmp/claude-prompts
|
|
||||||
cat > /tmp/claude-prompts/triage-prompt.txt << 'EOF'
|
|
||||||
You're an issue triage assistant for GitHub issues. Your task is to analyze the issue and select appropriate labels from the provided list.
|
|
||||||
|
|
||||||
IMPORTANT: Don't post any comments or messages to the issue. Your only action should be to apply labels.
|
|
||||||
|
|
||||||
Issue Information:
|
|
||||||
- REPO: ${{ github.repository }}
|
|
||||||
- ISSUE_NUMBER: ${{ github.event.issue.number }}
|
|
||||||
|
|
||||||
TASK OVERVIEW:
|
|
||||||
|
|
||||||
1. First, fetch the list of labels available in this repository by running: `gh label list`. Run exactly this command with nothing else.
|
|
||||||
|
|
||||||
2. Next, use the GitHub tools to get context about the issue:
|
|
||||||
- You have access to these tools:
|
|
||||||
- mcp__github__get_issue: Use this to retrieve the current issue's details including title, description, and existing labels
|
|
||||||
- mcp__github__get_issue_comments: Use this to read any discussion or additional context provided in the comments
|
|
||||||
- mcp__github__update_issue: Use this to apply labels to the issue (do not use this for commenting)
|
|
||||||
- mcp__github__search_issues: Use this to find similar issues that might provide context for proper categorization and to identify potential duplicate issues
|
|
||||||
- mcp__github__list_issues: Use this to understand patterns in how other issues are labeled
|
|
||||||
- Start by using mcp__github__get_issue to get the issue details
|
|
||||||
|
|
||||||
3. Analyze the issue content, considering:
|
|
||||||
- The issue title and description
|
|
||||||
- The type of issue (bug report, feature request, question, etc.)
|
|
||||||
- Technical areas mentioned
|
|
||||||
- Severity or priority indicators
|
|
||||||
- User impact
|
|
||||||
- Components affected
|
|
||||||
|
|
||||||
4. Select appropriate labels from the available labels list provided above:
|
|
||||||
- Choose labels that accurately reflect the issue's nature
|
|
||||||
- Be specific but comprehensive
|
|
||||||
- Select priority labels if you can determine urgency (high-priority, med-priority, or low-priority)
|
|
||||||
- Consider platform labels (android, ios) if applicable
|
|
||||||
- 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.
|
|
||||||
|
|
||||||
5. Apply the selected labels:
|
|
||||||
- Use mcp__github__update_issue to apply your selected labels
|
|
||||||
- DO NOT post any comments explaining your decision
|
|
||||||
- DO NOT communicate directly with users
|
|
||||||
- If no labels are clearly applicable, do not apply any labels
|
|
||||||
|
|
||||||
IMPORTANT GUIDELINES:
|
|
||||||
- Be thorough in your analysis
|
|
||||||
- Only select labels from the provided list above
|
|
||||||
- DO NOT post any comments to the issue
|
|
||||||
- Your ONLY action should be to apply labels using mcp__github__update_issue
|
|
||||||
- It's okay to not add any labels if none are clearly applicable
|
|
||||||
EOF
|
|
||||||
|
|
||||||
- name: Setup GitHub MCP Server
|
- name: Setup GitHub MCP Server
|
||||||
run: |
|
run: |
|
||||||
mkdir -p /tmp/mcp-config
|
mkdir -p /tmp/mcp-config
|
||||||
@@ -96,11 +43,61 @@ jobs:
|
|||||||
|
|
||||||
- name: Run Claude Code for Issue Triage
|
- name: Run Claude Code for Issue Triage
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
uses: anthropics/claude-code-base-action@v1
|
uses: anthropics/claude-code-action@v1
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
prompt_file: /tmp/claude-prompts/triage-prompt.txt
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
allowed_non_write_users: "*"
|
||||||
|
prompt: |
|
||||||
|
You're an issue triage assistant for GitHub issues. Your task is to analyze the issue and select appropriate labels from the provided list.
|
||||||
|
|
||||||
|
IMPORTANT: Don't post any comments or messages to the issue. Your only action should be to apply labels.
|
||||||
|
|
||||||
|
Issue Information:
|
||||||
|
- REPO: ${{ github.repository }}
|
||||||
|
- ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||||
|
|
||||||
|
TASK OVERVIEW:
|
||||||
|
|
||||||
|
1. First, fetch the list of labels available in this repository by running: `gh label list`. Run exactly this command with nothing else.
|
||||||
|
|
||||||
|
2. Next, use the GitHub tools to get context about the issue:
|
||||||
|
- You have access to these tools:
|
||||||
|
- mcp__github__get_issue: Use this to retrieve the current issue's details including title, description, and existing labels
|
||||||
|
- mcp__github__get_issue_comments: Use this to read any discussion or additional context provided in the comments
|
||||||
|
- mcp__github__update_issue: Use this to apply labels to the issue (do not use this for commenting)
|
||||||
|
- mcp__github__search_issues: Use this to find similar issues that might provide context for proper categorization and to identify potential duplicate issues
|
||||||
|
- mcp__github__list_issues: Use this to understand patterns in how other issues are labeled
|
||||||
|
- Start by using mcp__github__get_issue to get the issue details
|
||||||
|
|
||||||
|
3. Analyze the issue content, considering:
|
||||||
|
- The issue title and description
|
||||||
|
- The type of issue (bug report, feature request, question, etc.)
|
||||||
|
- Technical areas mentioned
|
||||||
|
- Severity or priority indicators
|
||||||
|
- User impact
|
||||||
|
- Components affected
|
||||||
|
|
||||||
|
4. Select appropriate labels from the available labels list provided above:
|
||||||
|
- Choose labels that accurately reflect the issue's nature
|
||||||
|
- Be specific but comprehensive
|
||||||
|
- Select priority labels if you can determine urgency (high-priority, med-priority, or low-priority)
|
||||||
|
- Consider platform labels (android, ios) if applicable
|
||||||
|
- 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.
|
||||||
|
|
||||||
|
5. Apply the selected labels:
|
||||||
|
- Use mcp__github__update_issue to apply your selected labels
|
||||||
|
- DO NOT post any comments explaining your decision
|
||||||
|
- DO NOT communicate directly with users
|
||||||
|
- If no labels are clearly applicable, do not apply any labels
|
||||||
|
|
||||||
|
IMPORTANT GUIDELINES:
|
||||||
|
- Be thorough in your analysis
|
||||||
|
- Only select labels from the provided list above
|
||||||
|
- DO NOT post any comments to the issue
|
||||||
|
- Your ONLY action should be to apply labels using mcp__github__update_issue
|
||||||
|
- It's okay to not add any labels if none are clearly applicable
|
||||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||||
claude_args: |
|
claude_args: |
|
||||||
--model claude-sonnet-4-5-20250929
|
--model claude-sonnet-4-5-20250929
|
||||||
|
|||||||
127
.github/workflows/oncall-triage.yml
vendored
127
.github/workflows/oncall-triage.yml
vendored
@@ -16,74 +16,12 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
issues: write
|
issues: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Create oncall triage prompt
|
|
||||||
run: |
|
|
||||||
mkdir -p /tmp/claude-prompts
|
|
||||||
cat > /tmp/claude-prompts/oncall-triage-prompt.txt << 'EOF'
|
|
||||||
You're an oncall triage assistant for GitHub issues. Your task is to identify critical issues that require immediate oncall attention.
|
|
||||||
|
|
||||||
Important: Don't post any comments or messages to the issues. Your only action should be to apply the "oncall" label to qualifying issues.
|
|
||||||
|
|
||||||
Repository: ${{ github.repository }}
|
|
||||||
|
|
||||||
Task overview:
|
|
||||||
1. Fetch all open issues updated in the last 3 days:
|
|
||||||
- Use mcp__github__list_issues with:
|
|
||||||
- state="open"
|
|
||||||
- first=5 (fetch only 5 issues per page)
|
|
||||||
- orderBy="UPDATED_AT"
|
|
||||||
- direction="DESC"
|
|
||||||
- This will give you the most recently updated issues first
|
|
||||||
- For each page of results, check the updatedAt timestamp of each issue
|
|
||||||
- Add issues updated within the last 3 days (72 hours) to your TODO list as you go
|
|
||||||
- Keep paginating using the 'after' parameter until you encounter issues older than 3 days
|
|
||||||
- Once you hit issues older than 3 days, you can stop fetching (no need to fetch all open issues)
|
|
||||||
|
|
||||||
2. Build your TODO list incrementally as you fetch:
|
|
||||||
- As you fetch each page, immediately add qualifying issues to your TODO list
|
|
||||||
- One TODO item per issue number (e.g., "Evaluate issue #123")
|
|
||||||
- This allows you to start processing while still fetching more pages
|
|
||||||
|
|
||||||
3. For each issue in your TODO list:
|
|
||||||
- Use mcp__github__get_issue to read the issue details (title, body, labels)
|
|
||||||
- Use mcp__github__get_issue_comments to read all comments
|
|
||||||
- Evaluate whether this issue needs the oncall label:
|
|
||||||
a) Is it a bug? (has "bug" label or describes bug behavior)
|
|
||||||
b) Does it have at least 50 engagements? (count comments + reactions)
|
|
||||||
c) Is it truly blocking? Read and understand the full content to determine:
|
|
||||||
- Does this prevent core functionality from working?
|
|
||||||
- Can users work around it?
|
|
||||||
- Consider severity indicators: "crash", "stuck", "frozen", "hang", "unresponsive", "cannot use", "blocked", "broken"
|
|
||||||
- Be conservative - only flag issues that truly prevent users from getting work done
|
|
||||||
|
|
||||||
4. For issues that meet all criteria and do not already have the "oncall" label:
|
|
||||||
- Use mcp__github__update_issue to add the "oncall" label
|
|
||||||
- Do not post any comments
|
|
||||||
- Do not remove any existing labels
|
|
||||||
- Do not remove the "oncall" label from issues that already have it
|
|
||||||
|
|
||||||
Important guidelines:
|
|
||||||
- Use the TODO list to track your progress through ALL candidate issues
|
|
||||||
- Process issues efficiently - don't read every single issue upfront, work through your TODO list systematically
|
|
||||||
- Be conservative in your assessment - only flag truly critical blocking issues
|
|
||||||
- Do not post any comments to issues
|
|
||||||
- Your only action should be to add the "oncall" label using mcp__github__update_issue
|
|
||||||
- Mark each issue as complete in your TODO list as you process it
|
|
||||||
|
|
||||||
7. After processing all issues in your TODO list, provide a summary of your actions:
|
|
||||||
- Total number of issues processed (candidate issues evaluated)
|
|
||||||
- Number of issues that received the "oncall" label
|
|
||||||
- For each issue that got the label: list issue number, title, and brief reason why it qualified
|
|
||||||
- Close calls: List any issues that almost qualified but didn't quite meet the criteria (e.g., borderline blocking, had workarounds)
|
|
||||||
- If no issues qualified, state that clearly
|
|
||||||
- Format the summary clearly for easy reading
|
|
||||||
EOF
|
|
||||||
|
|
||||||
- name: Setup GitHub MCP Server
|
- name: Setup GitHub MCP Server
|
||||||
run: |
|
run: |
|
||||||
mkdir -p /tmp/mcp-config
|
mkdir -p /tmp/mcp-config
|
||||||
@@ -110,11 +48,70 @@ jobs:
|
|||||||
|
|
||||||
- name: Run Claude Code for Oncall Triage
|
- name: Run Claude Code for Oncall Triage
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
uses: anthropics/claude-code-base-action@v1
|
uses: anthropics/claude-code-action@v1
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
prompt_file: /tmp/claude-prompts/oncall-triage-prompt.txt
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
allowed_non_write_users: "*"
|
||||||
|
prompt: |
|
||||||
|
You're an oncall triage assistant for GitHub issues. Your task is to identify critical issues that require immediate oncall attention.
|
||||||
|
|
||||||
|
Important: Don't post any comments or messages to the issues. Your only action should be to apply the "oncall" label to qualifying issues.
|
||||||
|
|
||||||
|
Repository: ${{ github.repository }}
|
||||||
|
|
||||||
|
Task overview:
|
||||||
|
1. Fetch all open issues updated in the last 3 days:
|
||||||
|
- Use mcp__github__list_issues with:
|
||||||
|
- state="open"
|
||||||
|
- first=5 (fetch only 5 issues per page)
|
||||||
|
- orderBy="UPDATED_AT"
|
||||||
|
- direction="DESC"
|
||||||
|
- This will give you the most recently updated issues first
|
||||||
|
- For each page of results, check the updatedAt timestamp of each issue
|
||||||
|
- Add issues updated within the last 3 days (72 hours) to your TODO list as you go
|
||||||
|
- Keep paginating using the 'after' parameter until you encounter issues older than 3 days
|
||||||
|
- Once you hit issues older than 3 days, you can stop fetching (no need to fetch all open issues)
|
||||||
|
|
||||||
|
2. Build your TODO list incrementally as you fetch:
|
||||||
|
- As you fetch each page, immediately add qualifying issues to your TODO list
|
||||||
|
- One TODO item per issue number (e.g., "Evaluate issue #123")
|
||||||
|
- This allows you to start processing while still fetching more pages
|
||||||
|
|
||||||
|
3. For each issue in your TODO list:
|
||||||
|
- Use mcp__github__get_issue to read the issue details (title, body, labels)
|
||||||
|
- Use mcp__github__get_issue_comments to read all comments
|
||||||
|
- Evaluate whether this issue needs the oncall label:
|
||||||
|
a) Is it a bug? (has "bug" label or describes bug behavior)
|
||||||
|
b) Does it have at least 50 engagements? (count comments + reactions)
|
||||||
|
c) Is it truly blocking? Read and understand the full content to determine:
|
||||||
|
- Does this prevent core functionality from working?
|
||||||
|
- Can users work around it?
|
||||||
|
- Consider severity indicators: "crash", "stuck", "frozen", "hang", "unresponsive", "cannot use", "blocked", "broken"
|
||||||
|
- Be conservative - only flag issues that truly prevent users from getting work done
|
||||||
|
|
||||||
|
4. For issues that meet all criteria and do not already have the "oncall" label:
|
||||||
|
- Use mcp__github__update_issue to add the "oncall" label
|
||||||
|
- Do not post any comments
|
||||||
|
- Do not remove any existing labels
|
||||||
|
- Do not remove the "oncall" label from issues that already have it
|
||||||
|
|
||||||
|
Important guidelines:
|
||||||
|
- Use the TODO list to track your progress through ALL candidate issues
|
||||||
|
- Process issues efficiently - don't read every single issue upfront, work through your TODO list systematically
|
||||||
|
- Be conservative in your assessment - only flag truly critical blocking issues
|
||||||
|
- Do not post any comments to issues
|
||||||
|
- Your only action should be to add the "oncall" label using mcp__github__update_issue
|
||||||
|
- Mark each issue as complete in your TODO list as you process it
|
||||||
|
|
||||||
|
7. After processing all issues in your TODO list, provide a summary of your actions:
|
||||||
|
- Total number of issues processed (candidate issues evaluated)
|
||||||
|
- Number of issues that received the "oncall" label
|
||||||
|
- For each issue that got the label: list issue number, title, and brief reason why it qualified
|
||||||
|
- Close calls: List any issues that almost qualified but didn't quite meet the criteria (e.g., borderline blocking, had workarounds)
|
||||||
|
- If no issues qualified, state that clearly
|
||||||
|
- Format the summary clearly for easy reading
|
||||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||||
claude_args: |
|
claude_args: |
|
||||||
--mcp-config /tmp/mcp-config/mcp-servers.json
|
--mcp-config /tmp/mcp-config/mcp-servers.json
|
||||||
|
|||||||
13
CHANGELOG.md
13
CHANGELOG.md
@@ -1,7 +1,20 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2.1.9
|
||||||
|
|
||||||
|
- Added `auto:N` syntax for configuring the MCP tool search auto-enable threshold, where N is the context window percentage (0-100)
|
||||||
|
- Added `plansDirectory` setting to customize where plan files are stored
|
||||||
|
- Added external editor support (Ctrl+G) in AskUserQuestion "Other" input field
|
||||||
|
- Added session URL attribution to commits and PRs created from web sessions
|
||||||
|
- Added support for `PreToolUse` hooks to return `additionalContext` to the model
|
||||||
|
- Added `${CLAUDE_SESSION_ID}` string substitution for skills to access the current session ID
|
||||||
|
- Fixed long sessions with parallel tool calls failing with an API error about orphan tool_result blocks
|
||||||
|
- Fixed MCP server reconnection hanging when cached connection promise never resolves
|
||||||
|
- Fixed Ctrl+Z suspend not working in terminals using Kitty keyboard protocol (Ghostty, iTerm2, kitty, WezTerm)
|
||||||
|
|
||||||
## 2.1.7
|
## 2.1.7
|
||||||
|
|
||||||
|
- Added customizable keyboard shortcuts via `~/.claude/keybindings.json`. Run `/keybindings` to get started. Learn more at https://code.claude.com/docs/en/keybindings
|
||||||
- Added `showTurnDuration` setting to hide turn duration messages (e.g., "Cooked for 1m 6s")
|
- Added `showTurnDuration` setting to hide turn duration messages (e.g., "Cooked for 1m 6s")
|
||||||
- Added ability to provide feedback when accepting permission prompts
|
- Added ability to provide feedback when accepting permission prompts
|
||||||
- Added inline display of agent's final response in task notifications, making it easier to see results without reading the full transcript file
|
- Added inline display of agent's final response in task notifications, making it easier to see results without reading the full transcript file
|
||||||
|
|||||||
Reference in New Issue
Block a user