用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tenfyzhong/skills-hub --skill implement-issue命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | implement-issue |
| description | Implement a GitHub issue from an issue URL or number. |
Implement a GitHub issue from start to finish: branch setup, codebase analysis, and implementation.
Before proceeding, verify:
# 1. Check if in a git repository
git rev-parse --is-inside-work-tree
# 2. Check if gh CLI is available and authenticated
gh auth status
# 3. Check for uncommitted changes (warn user if any)
git status --porcelain
If checks fail, STOP and inform the user:
gh auth login first."The user provides an issue reference in one of these formats:
https://github.com/owner/repo/issues/123#123 or 123# Get comprehensive issue metadata
gh issue view <ISSUE_NUMBER_OR_URL> --json number,title,body,state,author,labels,milestone,assignees,comments,createdAt,updatedAt
# Get repository info for branch naming
gh repo view --json owner,name,defaultBranchRef
Parse the issue to understand:
# Detect default branch (main or master)
DEFAULT_BRANCH=$(gh repo view --json defaultBranchRef -q '.defaultBranchRef.name')
# Fetch latest changes
git fetch origin $DEFAULT_BRANCH
# Checkout and update default branch
git checkout $DEFAULT_BRANCH
git pull origin $DEFAULT_BRANCH
Generate a branch name based on the issue:
Branch naming convention: <type>/<issue-number>-<short-description>
| Issue Type (from labels) | Branch Prefix |
|---|---|
| bug, bugfix | fix/ |
| feature, enhancement | feat/ |
| docs, documentation | docs/ |
| refactor | refactor/ |
| test | test/ |
| chore | chore/ |
| (default) | issue/ |
Examples:
feat/42-add-user-authenticationfix/15-fix-login-redirectdocs/99-update-readme# Create and checkout new branch
git checkout -b <BRANCH_NAME>
Before implementing, thoroughly understand the codebase:
# Get project structure overview
ls -la
find . -type f -name "*.json" -path "*/package.json" -o -name "*.toml" -path "*/Cargo.toml" -o -name "*.go" -path "*/go.mod" 2>/dev/null | head -20
# Check for configuration files
ls -la *.json *.yaml *.yml *.toml .* 2>/dev/null | head -20
Use explore agents to understand:
# Fire multiple explore agents in parallel
background_task(agent="explore", prompt="Find the main entry points and understand the overall architecture of this codebase")
background_task(agent="explore", prompt="Find code related to [ISSUE_TOPIC] and understand existing patterns")
background_task(agent="explore", prompt="Find test patterns and testing conventions in this codebase")
Based on the issue requirements, identify:
Before coding, create a detailed todo list:
todowrite([
{ id: "1", content: "Understand issue requirements fully", status: "completed", priority: "high" },
{ id: "2", content: "Analyze related codebase areas", status: "completed", priority: "high" },
{ id: "3", content: "[Specific implementation task 1]", status: "pending", priority: "high" },
{ id: "4", content: "[Specific implementation task 2]", status: "pending", priority: "medium" },
{ id: "5", content: "Add/update tests", status: "pending", priority: "high" },
{ id: "6", content: "Run tests and fix issues", status: "pending", priority: "high" },
{ id: "7", content: "Update documentation if needed", status: "pending", priority: "low" },
{ id: "8", content: "Final verification", status: "pending", priority: "high" }
])
Follow these principles:
For each implementation task:
in_progresslsp_diagnostics on changed filescompleted# Run project tests (detect test command from package.json, Makefile, etc.)
# Common patterns:
npm test
yarn test
go test ./...
cargo test
pytest
make test
Ensure:
# Check for any linting issues
# (detect lint command from project config)
# Verify build succeeds
# (detect build command from project config)
# Review all changes
git diff --stat
git diff
# Stage all changes
git add -A
# Create commit with conventional commit message
# Format: <type>(scope): <description>
#
# Reference the issue number in the commit body
git commit -s -m "<type>: <short description>
<detailed description of changes>
Closes #<ISSUE_NUMBER>"
Commit message examples:
feat: add user authentication systemfix: resolve login redirect loopdocs: update API documentationAfter completing the implementation, provide:
Issue: #[NUMBER] - [TITLE]
Branch: [BRANCH_NAME]
Status: [Implemented / Partially Implemented / Blocked]
| File | Change Type | Description |
|---|---|---|
path/to/file.ts | Modified | [What was changed] |
path/to/new-file.ts | Added | [What was added] |
[2-5 sentences explaining what was implemented and how it addresses the issue]
| Check | Status | Notes |
|---|---|---|
| Build | Pass/Fail | [Notes] |
| Tests | Pass/Fail | [Notes] |
| Lint | Pass/Fail | [Notes] |
| Diagnostics | Clean/Issues | [Notes] |
Suggest to the user:
git diff origin/<DEFAULT_BRANCH>...HEADgit push -u origin <BRANCH_NAME>gh pr create --title "<PR_TITLE>" --body "<PR_BODY>"Or offer to create the PR automatically if requested.
| Situation | Action |
|---|---|
| Issue not found | Verify issue number/URL, check repository access |
| Branch already exists | Ask user: use existing branch or create new with suffix? |
| Merge conflicts | Report to user, suggest resolution steps |
| Tests failing | Investigate if pre-existing or caused by changes |
| Unclear requirements | Ask user for clarification before proceeding |
| Implementation blocked | Document blockers, suggest alternatives |