gh-issue-develop
npx machina-cli add skill dceoy/github-cli-agent-skills/gh-issue-develop --openclawFiles (1)
SKILL.md
1.2 KB
GitHub Issue Develop
When to use
- The user asks to create or list branches linked to an issue.
- You need a branch name tied to an issue.
Inputs to confirm
- Issue number or URL.
- Branch name (optional) and base branch.
- Whether to checkout after creation.
- Target repo if not current (
--repo OWNER/REPO).
Workflow
- Verify auth:
gh --version gh auth status - List linked branches:
gh issue develop --list 123 - Create a branch (optionally checkout):
gh issue develop 123 --name "feature/123-fix" --base main --checkout
Examples
# Create and checkout a branch for issue 123
~ gh issue develop 123 --checkout
Notes
--branch-repoallows creating the branch in a fork.--basesets the remote base branch for the new branch.
References
- GitHub CLI manual: https://cli.github.com/manual/
gh issue develop --help
Source
git clone https://github.com/dceoy/github-cli-agent-skills/blob/main/skills/gh-issue-develop/SKILL.mdView on GitHub Overview
gh-issue-develop helps you manage branches linked to GitHub issues. Use it to list existing linked branches or to create new ones tied to a specific issue, with control over branch name, base, and checkout behavior, including fork scenarios.
How This Skill Works
The skill uses the GitHub CLI (gh). It first verifies authentication, then can list linked branches with gh issue develop --list <issue>, or create a new branch with gh issue develop <issue> --name <branch> --base <base> [--checkout], optionally targeting a fork with --branch-repo. Inputs include the issue number or URL and optional branch details.
When to Use It
- You need a branch that is explicitly linked to a specific issue.
- You want to list all branches associated with an issue to review work in progress.
- You need to create a new feature branch for an issue with a specific base branch.
- You work from a fork and must create the branch in a fork using --branch-repo.
- You want to immediately switch to the newly created branch after creation using --checkout.
Quick Start
- Step 1: Verify gh CLI is installed and you are authenticated (gh --version; gh auth status).
- Step 2: List or create a linked branch for the issue using gh issue develop <ISSUE> with --list or --name/--base/--checkout.
- Step 3: If creating, include a meaningful branch name with --name, choose the correct --base, and use --checkout if you want to switch immediately.
Best Practices
- Always confirm the correct issue number or URL and, if necessary, the target repository.
- Use a consistent naming scheme for branches, e.g. feature/<issue-number>-description.
- Specify the proper base branch with --base to ensure correct merge targets.
- Use --checkout when you want to start work immediately on the new branch.
- For forks, use --branch-repo to ensure the branch is created in the intended remote.
Example Use Cases
- ~ gh issue develop 123 --checkout
- gh issue develop 123 --name "feature/123-fix" --base main
- gh issue develop --list 456
- gh issue develop 789 --name "feature/789" --base develop --branch-repo my-fork
- gh issue develop 321 --name "feature/321-improve" --base release --checkout
Frequently Asked Questions
Add this skill to your agents