Create a branch linked to a GitHub issue via gh issue develop, then implement the work with regular convention-following commits. Use when starting work on an issue, picking up a ticket, developing a feature branch, or any intent to begin coding against a GitHub issue.
Ships in git. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Create a development branch linked to a GitHub issue, then implement the work with disciplined, convention-following commits. This skill handles the full loop from branch creation through development, but never pushes to the remote — the user retains full control over when and how to share their work.
Determine which issue to work on. The user may provide:
42)https://github.com/owner/repo/issues/42)If the user provides a number or URL, use it directly. If they describe the work without an issue reference, search for a matching open issue:
gh issue list --limit 20 --state open --json number,title --jq '.[] | "#\(.number) \(.title)"'
Present matching issues and ask the user to confirm. If no matching issue exists, ask whether to create one first (suggest the gh-issue skill) or proceed with just a branch.
Store the result as ISSUE_NUMBER.
Before creating a branch, check for uncommitted changes:
git status --porcelain
If the working tree is dirty, inform the user and ask how to proceed:
git stash)Do not silently discard or stash changes — always get explicit consent.
The branch name follows a fixed convention: issues/ISSUE_NUMBER. For example, issue #1 becomes issues/1, issue #42 becomes issues/42.
Before creating the branch, check whether a dev or develop branch exists on the remote:
git ls-remote --heads origin dev develop
Store the result as BASE_BRANCH — either dev, develop, or the repo's default branch (e.g., main) if neither exists.
Pass --base with the detected BASE_BRANCH so the new issue branch is based on the correct branch:
gh issue develop ISSUE_NUMBER --checkout --name "issues/ISSUE_NUMBER" --base BASE_BRANCH
Handle these error cases:
issues/ISSUE_NUMBER already exists, ask the user whether to check out the existing branch (git checkout issues/ISSUE_NUMBER) or delete and recreate it.gh repo create or git remote add origin.After success, confirm the branch name and that it is linked to the issue.
Before writing any code, understand how this project handles commits:
# Recent commit history for convention patterns
git log --oneline -20
# Explicit conventions
cat CLAUDE.md 2>/dev/null || true
cat .github/CONTRIBUTING.md 2>/dev/null || true
cat CONTRIBUTING.md 2>/dev/null || true
Infer from the history:
feat:, fix:), ticket prefixes (PROJ-123), or plain prose(auth), (api), or noneExplicit documented conventions (in CLAUDE.md, CONTRIBUTING.md) override inferred patterns. Store the result as COMMIT_CONVENTION for use throughout development.
Fetch the full issue details to understand what needs to be implemented:
gh issue view ISSUE_NUMBER --json title,body,labels,assignees
Use the issue title, body, acceptance criteria, and any referenced files or code paths to guide the implementation. If the issue references specific files, read them to understand the current state before making changes.
Implement the changes described in the issue. During development:
At each logical checkpoint during development, follow this process:
Before staging, review new untracked files:
git status --porcelain
Look for files that should not be committed:
.env, .env.local, .env.*.localcredentials.json, *.pem, *.key, token.txt.DS_Store, Thumbs.db.idea/, .vscode/settings.json (unless the project already tracks it)node_modules/, dist/, __pycache__/, *.pyc*.log, npm-debug.log*If any such files exist and are not already in .gitignore, update .gitignore first and commit that change separately:
echo "pattern" >> .gitignore
git add .gitignore
git commit -m "chore: add pattern to .gitignore"
Adapt the commit message prefix to match COMMIT_CONVENTION.
Stage only the files related to the current logical change. Always name files explicitly:
git add src/auth/login.ts src/auth/login.test.ts
Review what is staged before committing:
git diff --cached --stat
Write a commit message following COMMIT_CONVENTION. The message must:
git commit -m "feat(auth): add login endpoint with JWT validation"
The commit message is exactly the text above — nothing appended, nothing added after the fact.
Continue development until the implementation is complete.
Once the implementation is working and tested — but before reporting completion or opening a PR — run the built-in simplify skill as a dedicated cleanup/refactor pass over the recently changed code:
Invoke the Skill tool with skill: "simplify"
simplify reviews changed code for reuse, quality, and efficiency, then fixes the issues it finds. Treat it as a final-mile polish, not a per-commit formatter — it works best when there is a meaningful surface of new code to evaluate.
After simplify completes:
COMMIT_CONVENTION (e.g., refactor: simplify auth helpers). Do not fold simplify edits into unrelated feature commits — keep the cleanup as its own logical commit so reviewers can see the polish step.Skip this step only if the work was a trivial one-line fix where there is nothing meaningful to simplify.
After all work is committed, show a summary:
# All commits made on this branch
git log --oneline main..HEAD
# Confirm nothing is left uncommitted
git status
Report to the user:
After the final status report, offer the user a path forward:
Ready to open a PR? I can run
/gh-prto push and create a pull request.
Wait for the user to confirm before proceeding. Do not automatically invoke /gh-pr.
When the user wants to work on multiple issues simultaneously (e.g., "implement issues 17, 18, 19 in parallel"), use this workflow instead of the serial Steps 1-8 above.
Before dispatching any agents, create all issue branches with the issues/N naming convention:
gh issue develop 17 --name "issues/17" --base dev --checkout=false
gh issue develop 18 --name "issues/18" --base dev --checkout=false
gh issue develop 19 --name "issues/19" --base dev --checkout=false
Key flags:
--name "issues/N" — enforces the naming convention (without this, GitHub auto-generates names from issue titles)--checkout=false — creates the branch on the remote without switching locally (important when creating multiple branches)--base — specifies the base branch if not the defaultAfter creating the linked branches, dispatch parallel agents using isolation: "worktree". Each agent receives one issue to implement.
Inject commit rules into every agent prompt. Before dispatching any agent, read templates/commit-template.md (relative to this skill's directory) and include its full content in the agent prompt. Subagents do not load the gh-dev skill, so they will follow system-level defaults (which inject Co-Authored-By trailers) unless explicitly overridden by the template.
Each agent must work independently. Do not structure prompts so that one agent's work depends on another agent's output. Every agent should:
main or dev)simplify skill as a final cleanup pass after the implementation is working and tested, and commit any resulting changes separately before pushingImportant: Agents working in worktrees get their own branch names (worktree-agent-XXXXX), not the issue-linked branch names. Include explicit push instructions in each agent's prompt:
After committing, push your work to the issue branch:
git push origin HEAD:issues/N
Alternatively, have the agent check out the issue branch inside the worktree before starting:
git checkout issues/N
If agents used worktree branch names, push each to its corresponding issue branch:
# From each worktree directory
git push origin worktree-agent-XXXXX:issues/17
git push origin worktree-agent-YYYYY:issues/18
git push origin worktree-agent-ZZZZZ:issues/19
If there are conflicts due to the issue branch having extra commits (e.g., from the base branch), rebase first:
git fetch origin
git rebase origin/issues/N
# Resolve conflicts if any
git push origin HEAD:issues/N
If multiple issues touch the same files or share a dependency, do not create sequential dependencies between agents. Instead, choose one of:
Never make one agent wait for another agent to finish.
Before running any gh command, verify that the CLI is available and authenticated:
gh auth status
If gh is not installed, guide the user to install it first:
brew install ghwinget install --id GitHub.cli or scoop install ghIf gh is installed but not authenticated, guide the user to log in:
gh auth login
Do not proceed until gh auth status succeeds.
Always pass --name with exact issues/N value -- Without --name, GitHub auto-generates branch names from issue titles. Even when --name is provided, the value must be exactly issues/N — never a descriptive name like 6-macro-management or anything derived from the issue title. The convention is issues/ISSUE_NUMBER, no exceptions. Use gh issue develop N --name "issues/N" every time. Common mistake: the model passes --name but invents a custom name instead of following the issues/N pattern.
Worktree agents use their own branch names -- When dispatching parallel agents with isolation: "worktree", each agent works on a worktree-agent-XXXXX branch, not the issue-linked branch. After the agent completes, you must push with an explicit refspec: git push origin worktree-agent-XXXXX:issues/N. To avoid this, instruct agents to git checkout issues/N inside the worktree before starting work, or include the refspec push command in the agent prompt.
Subagents ignore skill hard rules -- Worktree agents dispatched via isolation: "worktree" do not inherit the gh-dev skill's instructions. The system-level harness injects a Co-Authored-By trailer by default, which the agent will follow unless explicitly overridden. Fix: read templates/commit-template.md and inject its content into every agent prompt. This is mandatory — without it, every subagent commit will have a Co-Authored-By trailer.
If the repository has no GitHub remote, inform the user that a remote is required and suggest:
gh repo create
# or
git remote add origin https://github.com/{owner}/{repo}.git
git push, git push --force, or any command that sends commits to the remote.git add ., git add -A, or git add --all. Always stage files by explicit path.git branch -D).What SKILL.md sets; muted values are Claude Code's defaults
/git:gh-devfrom git
npx claudepluginhub chienchuanw/chuan-skills --plugin git9 skills in this plugin
/branch-reportGenerates a branch-vs-default comparison report with plain-language explanations and senior dev review. Use when the user asks to summarize, compare, review, or explain branch changes, or wants a PR summary before merging. Read-only: it produces a report to read — it does not push the branch or open/update the PR (for that use gh-pr).
/commit-msgSuggests 3 commit messages based on git diff and project conventions. Use when the user asks for commit message ideas, wants help writing a commit message, or has changes ready to commit.
/gh-archiveCapture the current state of a project by updating documentation at the end of a development session. Invokes the readme skill to refresh README.md and the planning-with-files skill to record project status in a doc/ or docs/ directory. Use after merging a PR, finishing a feature, wrapping up a coding session, or any time the user wants to snapshot where the project stands — even implicit phrases like "archive this", "wrap up the session", "document current status", "update project docs", "snapshot this repo", or "I'm done for today". Also use when the user says "end of session" or asks to prepare documentation before stepping away from a project.