commit 4522ca6fd5b1ee9ad37c6a609f833077ce03fee9 Author: Zhongwei Li Date: Sat Nov 29 17:54:41 2025 +0800 Initial commit diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..9e5c6b6 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,11 @@ +{ + "name": "github-issue-fix", + "description": "This is a detailed way you can analyze the GitHub issues and let Claude handle them in best possible way.", + "version": "1.0.0", + "author": { + "name": "safayavatsal" + }, + "commands": [ + "./commands/" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..ccf4e3b --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# github-issue-fix + +This is a detailed way you can analyze the GitHub issues and let Claude handle them in best possible way. diff --git a/commands/github-issue-fix.md b/commands/github-issue-fix.md new file mode 100644 index 0000000..8687cd2 --- /dev/null +++ b/commands/github-issue-fix.md @@ -0,0 +1,153 @@ +--- +description: This is a detailed way you can analyze the GitHub issues and let Claude handle them in best possible way. +author: safayavatsal +version: 1.0.0 +--- + +Please analyze and fix the GitHub issue: $ARGUMENTS. + +Follow these steps: + +# PLAN +1. Use `gh issue view` to get the issue details + - Fetch the full description, labels, assignees, and any metadata from the GitHub issue. + +2. Read and understand the problem described in the issue + - Carefully analyze the main problem statement and what outcome is expected. + +3. Identify related or linked **sub-issues** and dependencies + - Look for: + - **Child issues or tasks** linked under the main issue (e.g., checklists in the issue body such as `- [ ] Create DB schema`, `- [ ] Implement API`). + - **Related GitHub issues** linked as "blocks", "is blocked by", or "relates to". + - **Issues grouped under an epic or parent story**, if using project management tools. + - Treat these sub-issues as part of the scope. If they exist, factor them into the plan so the solution is efficient and avoids duplication. + - **Example:** + - Main Issue: *"Implement user authentication"* + - Sub-issues found: + - `#201` Setup user database schema + - `#202` Create login API + - `#203` Integrate OAuth provider + - Plan must account for all three, because they are part of solving the main issue. + +4. Ask clarification questions if needed + - If any detail is unclear, prepare a list of clarification questions for the issue author or stakeholders. + +5. Understand the prior art for the issue + - Search scratchpads or internal documentation for previous thoughts related to the issue. + - Search previous PRs to see if any work was already attempted on this problem. + - Search the codebase for relevant files, functions, or modules that may already contain related logic. + +6. Ultrathink about how to solve the issue in a small and manageable way + - Break down the main issue **and its sub-issues** into smaller, actionable tasks. + - Sequence the tasks in a logical order, respecting dependencies (e.g., database before API, API before UI). + - Draft a clear plan with todos that can be executed incrementally. + +7. Document the plan in the scratchpad + - Include the issue name in the filename for easy reference. + - Add the direct link to the issue in the scratchpad. + - Ensure the plan is well-structured so it can be executed by another human or an automated system without requiring extra context. + +--- + +# Scratchpad for Issue Planning + +## Main Issue +- **Title:** +- **Link:** +- **Description:** + +--- + +## Sub-Issues / Dependencies +- Look for checklists in the issue body (e.g., `- [ ] Task A`) +- Look for linked issues in GitHub (e.g., `#201` blocks `#200`) +- Look for epic/parent issue relationships +- Document them here: + +- [ ] +- [ ] +- [ ] + +--- + +## Clarification Questions +- +- + +--- + +## Prior Art +- **Scratchpads:** +- **PRs:** +- **Codebase References:** + +--- + +## Proposed Plan +1. +2. +3. +4. + +--- + +## Todos +- [ ] +- [ ] +- [ ] + +--- + +## Notes +- + +--- + +# CREATE +- Create a new branch with the issue name + - Use a consistent naming convention (e.g., `issue/-`) +- Solve the issue in **small, manageable steps**, following the plan documented in the scratchpad + - If the issue has **sub-issues**, address them incrementally, committing as each part is completed +- Create **clear and descriptive commit messages** + - Example: `fix(auth): handle token refresh expiry (closes #123)` +- Commit changes frequently, after completing each step or sub-issue + +--- + +# TEST +- Run **all relevant tests** to verify the fix + - Unit tests, integration tests, and end-to-end tests if available +- Ensure code passes: + - ✅ Linting + - ✅ Type checking +- For bug fixes: + - Add **regression tests** to prevent reoccurrence +- If automated tests don’t cover everything, add **manual testing steps** + +--- + +# PUSH +- Push the branch to the remote repository +- Create a **Pull Request (PR)** with the issue name in the title + - Example: `Fix: Auth Token Refresh [#123]` +- In the PR description: + - Reference the main issue (`Closes #123`) + - Reference any sub-issues covered + - Summarize what was changed and why +- Ensure PR follows contribution guidelines: + - ✅ Uses the PR template + - ✅ Has appropriate labels + - ✅ Requests reviewers + +--- + +## ✅ Final Checklist Before Merge +- [ ] Issue and sub-issues addressed +- [ ] All tests passing +- [ ] Linting and type checks clean +- [ ] Commit messages follow convention +- [ ] PR description is complete +- [ ] Review feedback applied + + +Remember to use the GitHub CLI (`gh`) for all GitHub-related tasks. \ No newline at end of file diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..53a80b4 --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,45 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:ananddtyagi/claude-code-marketplace:plugins/github-issue-fix", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "799b982a2a24490f3f17dd29c5995a8c724e54ad", + "treeHash": "5d137b1516433aa42dedec4e2a1566b624775eb23c376df2b2589c0d33a21999", + "generatedAt": "2025-11-28T10:13:24.829432Z", + "toolVersion": "publish_plugins.py@0.2.0" + }, + "origin": { + "remote": "git@github.com:zhongweili/42plugin-data.git", + "branch": "master", + "commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390", + "repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data" + }, + "manifest": { + "name": "github-issue-fix", + "description": "This is a detailed way you can analyze the GitHub issues and let Claude handle them in best possible way.", + "version": "1.0.0" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "5a55be1b348666bc367f6e039c09d91fd02794d2a48b6c9d722bc4deaa7eb3b0" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "9c9b30611512a7cf13539d7417bfa3870965ec7224b5fdd2d291514242543f62" + }, + { + "path": "commands/github-issue-fix.md", + "sha256": "bdf5ec171f40b61f781b04a6cc421a9ce5106efad9cda54e80b9618356fa79fd" + } + ], + "dirSha256": "5d137b1516433aa42dedec4e2a1566b624775eb23c376df2b2589c0d33a21999" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file