Bashunit gh-issue
Fetch GitHub issue, create branch, plan and implement with TDD, then open PR
git clone https://github.com/TypedDevs/bashunit
T=$(mktemp -d) && git clone --depth=1 https://github.com/TypedDevs/bashunit "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude/skills/gh-issue" ~/.claude/skills/typeddevs-bashunit-gh-issue && rm -rf "$T"
.claude/skills/gh-issue/SKILL.mdGitHub Issue Workflow
Fetch a GitHub issue, create branch, implement following TDD, and open a PR.
Arguments
- Issue number (e.g.,$ARGUMENTS
or42
)#42
Instructions
Phase 1: Setup
-
Parse the issue number from
(strip$ARGUMENTS
if present)# -
Fetch issue details:
gh issue view <number> --json title,body,labels,assignees,milestone,state -
Assign yourself if unassigned:
gh issue edit <number> --add-assignee @me -
Add appropriate labels if the issue doesn't have them:
- Something isn't workingbug
- New feature or requestenhancement
- Improvements or additions to documentationdocumentation
-
Create a branch from
:mainDetermine prefix from labels:
→bugfix/
→enhancementfeat/
→documentationdocs/- Default →
feat/
Branch name:
(slug: lowercase title, spaces →<prefix><issue-number>-<slug>
, max 50 chars)-git checkout main && git pull git checkout -b <branch-name>
Phase 2: Plan
-
Analyze the issue: requirements, labels, referenced issues, affected areas
-
Explore the codebase for context:
- Find related code in
src/ - Find related tests in
tests/ - Study existing patterns
- Find related code in
-
Create implementation plan:
- Acceptance Criteria
- Test Strategy (which tests to write first)
- Files to Change
- Implementation Order (smallest first step)
-
Use EnterPlanMode if implementation is non-trivial
Phase 3: Implement
-
Follow strict TDD workflow (see @.claude/rules/tdd-workflow.md):
For each test:
- RED - Write failing test, verify it fails for the RIGHT reason
- GREEN - Minimal code to pass
- REFACTOR - Improve while keeping tests green
-
Run full test suite frequently:
./bashunit tests/ ./bashunit --parallel tests/ -
Quality checks after each refactor:
make sa && make lint && shfmt -w .
Phase 4: Ship
-
Final verification:
./bashunit tests/ && ./bashunit --parallel tests/ && make sa && make lint -
Commit using conventional commits with
Closes #<issue-number> -
Create PR using the
skill:/pr/pr #<issue-number>
Output Format
After fetching, present:
## Issue #<number>: <title> **Labels:** <labels> **State:** <state> **Branch:** <branch-name> ### Description <body content> ### Next Steps 1. Explore codebase for context 2. Create implementation plan 3. Begin TDD cycle