spacehub

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

Add GitHub workflow to deduplicate issues and Claude configurationBrowse files
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Boris Cherny authored on Jul 29, 2025 parent 4fd2c49 · commit 6418cacb0b7a
2 changed files+58 -0compared with 4fd2c49
A.claude/commands/dedupe.md
A.github/workflows/claude-dedupe-issues.yml
@@ -1,0 +1,33 @@
1+---
2+allowed-tools: Bash(gh issue view:*), Bash(gh search:*), Bash(gh issue list:*), Bash(gh api:*), Bash(gh issue comment:*)
3+description: Find duplicate GitHub issues
4+---
5+
6+Find up to 3 likely duplicate issues for a given GitHub issue.
7+
8+To do this, follow these steps precisely:
9+
10+1. Use an agent to check if the Github issue (a) is closed, (b) does not need to be deduped (eg. because it is broad product feedback without a specific solution, or positive feedback), or (c) already has a duplicates comment that you made earlier. If so, do not proceed.
11+2. Use an agent to view a Github issue, and ask the agent to return a summary of the issue
12+3. Then, launch 5 parallel agents to search Github for duplicates of this issue, using diverse keywords and search approaches, using the summary from #1
13+4. Next, feed the results from #1 and #2 into another agent, so that it can filter out false positives, that are likely not actually duplicates of the original issue
14+5. Finally, comment back on the issue with a list of up to three duplicate issues (or zero, if there are no likely duplicates)
15+
16+Notes (be sure to tell this to your agents, too):
17+
18+- Use `gh` to interact with Github, rather than web fetch
19+- Do not use other tools, beyond `gh` (eg. don't use other MCP servers, file edit, etc.)
20+- Make a todo list first
21+- For your comment, follow the following format precisely (assuming for this example that you found 3 suspected duplicates):
22+
23+---
24+
25+Found 3 possible duplicate issues:
26+
27+1. <link to issue>
28+2. <link to issue>
29+3. <link to issue>
30+
31+If your issue is a duplicate, please close it and 👍 the existing issue instead.
32+
33+## 🤖 Generated with [Claude Code](https://claude.ai/code)
@@ -1,0 +1,25 @@
1+name: Claude Issue Dedupe
2+description: Automatically dedupe GitHub issues using Claude Code
3+on:
4+ issues:
5+ types: [opened]
6+
7+jobs:
8+ triage-issue:
9+ runs-on: ubuntu-latest
10+ timeout-minutes: 10
11+ permissions:
12+ contents: read
13+ issues: write
14+
15+ steps:
16+ - name: Checkout repository
17+ uses: actions/checkout@v4
18+
19+ - name: Run Claude Code slash command
20+ uses: anthropics/claude-code-base-action@beta
21+ with:
22+ prompt: "/dedupe ${{ github.repository }}/issues/${{ github.event.issue.number }}"
23+ anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
24+ claude_env: |
25+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}