| name | github-workflow |
| description | This skill should be used when the user asks to "design a feature", "create UI mockup", "create a PR", "address review comments", "resolve review threads", "retrigger Q review", "/q review", "respond to Amazon Q", "/codex review", "respond to Codex", "handle reviewer findings", "merge PR", "push changes", "check CI status", or mentions design canvas, Pencil tool, PR workflow, code review, reviewer bots, or GitHub Actions checks. |
GitHub Development Workflow
This skill provides standardized guidance for the complete GitHub development workflow, including design canvas creation using Pencil, branch management, PR creation, CI monitoring, and reviewer bot interaction.
Development Workflow Overview
Follow this 12-step workflow for all feature development and bug fixes:
Step 1: DESIGN CANVAS (Pencil Tool) โ NEW
- Open/create .pen file for feature design
- Create UI mockups, wireframes, architecture diagrams
- Document component structure and data flow
- Get user approval before proceeding
โ
Step 2: CREATE BRANCH
git checkout -b feat/<name> or fix/<name>
โ
Step 3: WRITE TEST CASES (TDD)
- Create test case document: docs/test-cases/<feature>.md
- Write unit test skeletons
- Write E2E test cases if applicable
โ
Step 4: IMPLEMENT CHANGES
- Write code following test cases
- Write new unit tests for new functionality
- Update existing tests if behavior changed
โ
Step 5: LOCAL VERIFICATION
- npm run build
- npm run test
- Deploy and verify (if applicable)
โ
Step 6: CODE SIMPLIFICATION
- Run code-simplifier agent
- Address simplification suggestions
- Mark complete: .claude/hooks/state-manager.sh mark code-simplifier
โ
Step 7: COMMIT AND CREATE PR
- git add && git commit -m "type(scope): description"
- git push -u origin <branch-name>
- Create PR via GitHub MCP or gh CLI
- Include checklist in PR description (see template below)
โ
Step 8: PR REVIEW AGENT
- Run /pr-review-toolkit:review-pr
- Address findings by severity
- Mark complete: .claude/hooks/state-manager.sh mark pr-review
โ
Step 9: WAIT FOR PR CHECKS
- Monitor GitHub Actions checks
- If FAIL โ Return to Step 4
- If PASS โ Update PR checklist, proceed to Step 10
โ
Step 10: ADDRESS REVIEWER BOT FINDINGS (ๅฟ
้กปๅๅค+ๅ
ณ้ญ)
- Review all bot comments (Amazon Q, Codex, etc.)
- Fix issues OR explain why it's a false positive
- โ ๏ธ MUST reply DIRECTLY to EACH comment thread
- โ ๏ธ MUST resolve/close EACH conversation (even false positives)
- Retrigger review: /q review, /codex review
โ
Step 11: ITERATE UNTIL NO FINDINGS
- Check for new bot findings
- If new findings โ Return to Step 10
- If no findings โ Update PR checklist, proceed to Step 12
โ
Step 12: E2E TESTS & READY FOR MERGE
- Run E2E tests using Chrome DevTools MCP
- Verify on Preview/Staging environment
- Mark complete: .claude/hooks/state-manager.sh mark e2e-tests
- Update PR checklist to show all items complete
- STOP HERE: Report status to user
- User decides when to merge
Step 1: Design Canvas (Pencil Tool)
CRITICAL: Always start feature development with a design canvas
When to Create Design Canvas
- New UI components or pages
- Feature implementations with user-facing changes
- Architecture decisions that benefit from visualization
- Complex data flows or state management
Pencil Tool Workflow
-
Check editor state:
Use get_editor_state() to see if a .pen file is open
-
Open or create design file:
Use open_document("docs/designs/<feature>.pen") or open_document("new")
-
Get design guidelines (if needed):
Use get_guidelines(topic="landing-page|table|tailwind|code")
-
Get style guide for consistent design:
Use get_style_guide_tags() to discover available tags
Use get_style_guide(tags=["modern", "dashboard"]) for inspiration
-
Create design elements:
Use batch_design(operations) to create:
- UI mockups and wireframes
- Component hierarchy diagrams
- Data flow visualizations
- Architecture diagrams
-
Validate design visually:
Use get_screenshot() to verify the design looks correct
-
Document design decisions:
- Add text annotations explaining choices
- Include component specifications
- Note interaction patterns
Design Canvas Template Structure
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Feature: <Feature Name> โ
โ Date: YYYY-MM-DD โ
โ Status: Draft | In Review | Approved โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ UI Mockup / Wireframe โ โ
โ โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Component Architecture โ โ
โ โ - Component tree โ โ
โ โ - Props/State flow โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Data Flow Diagram โ โ
โ โ - API calls โ โ
โ โ - State management โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ Design Notes: โ
โ - Key decisions and rationale โ
โ - Accessibility considerations โ
โ - Responsive behavior โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Design Approval
Before proceeding to implementation:
- Present the design canvas to the user
- Get explicit approval
- Document any feedback or changes
- Update design status to "Approved"
PR Description Template
When creating a PR, include this checklist in the description. Update it as each step completes:
## Summary
<1-3 bullet points describing the change>
## Design
- [ ] Design canvas created (`docs/designs/<feature>.pen`)
- [ ] Design approved by user
## Test Plan
- [ ] Test cases documented (`docs/test-cases/<feature>.md`)
- [ ] Build passes (`npm run build`)
- [ ] Unit tests pass (`npm run test`)
- [ ] CI checks pass
- [ ] code-simplifier review passed
- [ ] pr-review agent review passed
- [ ] Reviewer bot findings addressed (no new findings)
- [ ] E2E tests pass
## Checklist
- [ ] New unit tests written for new functionality
- [ ] E2E test cases updated if needed
- [ ] Documentation updated if needed
Update PR Checklist Command
After completing each step, update the PR description:
gh pr view {pr_number} --json body --jq '.body' > /tmp/pr_body.md
gh pr edit {pr_number} --body "$(cat /tmp/pr_body.md)"
Or use the GitHub MCP tool to update the PR body directly.
PR Check Monitoring
Monitor CI Status
gh pr checks {pr_number} --watch --interval 30
gh pr checks {pr_number}
Checks to Monitor
| Check | Description | Action if Failed |
|---|
| CI / build-and-test | Build + unit tests | Fix code or update snapshots |
| Security Scan | SAST, npm audit | Fix security issues |
| Amazon Q Developer | Security review | Address findings, retrigger with /q review |
| Codex | AI code review | Address findings, retrigger with /codex review |
| Other review bots | Various checks | Address findings, retrigger per bot docs |
Reviewer Bot Workflow
Multiple review bots can provide automated code review findings on PRs:
| Bot | Trigger Command | Bot Username |
|---|
| Amazon Q Developer | /q review | amazon-q-developer[bot] |
| Codex | /codex review | codex[bot] |
| Other bots | See bot documentation | Varies |
Handling Bot Review Findings
โ ๏ธ ๅฟ
้กป้ตๅฎ็่งๅ: ๆฏไธช finding ้ฝๅฟ
้กปๅๅคๅนถๅ
ณ้ญ discussion
ๅค็ๆต็จ:
- ้ไธ้
่ฏปๆๆ comments - ไป็ป็่งฃๆฏไธช finding ็ๅ
ๅฎน
- ๅคๆญ็ฑปๅๅนถ้ๅ่กๅจ:
- ๆๆ้ฎ้ข โ ไฟฎๅคไปฃ็ ๅนถ push
- ่ฏฏๆฅ (False Positive) โ ๅๅค่ฏดๆไธบไฝ่ฟๆฏ่ฏฏๆฅ
- ๅฟ
้กป็ดๆฅๅๅคๆฏไธช thread - ไฝฟ็จ
in_reply_to ๅๅค๏ผไธๆฏ PR ็บงๅซ็ general comment
- ๅฟ
้กปๅ
ณ้ญๆฏไธช discussion - ๅๅคๅไฝฟ็จ GraphQL mutation ๆ ่ฎฐไธบ resolved
- ่งฆๅ้ๆฐๅฎกๆฅ - ไฝฟ็จๅฏนๅบๅฝไปค๏ผๅฆ
/q reviewใ/codex review๏ผ
False Positive ๅค็่ง่
ๅณไฝฟๆฏ่ฏฏๆฅ๏ผไนๅฟ
้กป:
- ๅๅค comment - ๆธ
ๆฅ่ฏดๆไธบไปไน่ฟๆฏ่ฏฏๆฅ
- ๅ
ณ้ญ discussion - ๆ ่ฎฐ thread ไธบ resolved
ๅๅคๆจกๆฟ:
This is a false positive because {ๅ
ทไฝๅๅ }.
{่ฏฆ็ป่งฃ้}:
- {็็ฑ 1}
- {็็ฑ 2}
Marking as resolved.
ๅธธ่ง่ฏฏๆฅๅบๆฏๅๅๅค็คบไพ:
| ๅบๆฏ | ๅๅค็คบไพ |
|---|
| ๅฎๅ
จ็ธๅ
ณๆๆกฃ | "This is documentation for authorized operators. Access is controlled by IAM permissions, not documentation obscurity." |
| ๆต่ฏไปฃ็ ไธญ็็กฌ็ผ็ | "This is a test file using mock data. No real credentials are involved." |
| ๆกๆถ็บฆๅฎ็ๆจกๅผ | "This pattern is required by Next.js App Router conventions. See: {link to docs}" |
| ๅทฒๆ้ฒๆคๆชๆฝ | "This is protected by {existing mechanism} at {location}. Additional validation here would be redundant." |
ๅๅคๅนถๅ
ณ้ญ Finding ็ๅฎๆดๆต็จ
gh api repos/{owner}/{repo}/pulls/{pr}/comments \
--jq '.[] | {id: .id, path: .path, body: .body[:100]}'
gh api repos/{owner}/{repo}/pulls/{pr}/comments \
-X POST \
-f body="Addressed in commit {hash} - {ไฟฎๅค่ฏดๆ}" \
-F in_reply_to=<comment_id>
gh api repos/{owner}/{repo}/pulls/{pr}/comments \
-X POST \
-f body="This is a false positive because {ๅๅ }. Marking as resolved." \
-F in_reply_to=<comment_id>
gh api graphql -f query='
query {
repository(owner: "{owner}", name: "{repo}") {
pullRequest(number: {pr}) {
reviewThreads(first: 50) {
nodes { id isResolved }
}
}
}
}' --jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false) | .id'
gh api graphql -f query='
mutation {
resolveReviewThread(input: {threadId: "<thread_id>"}) {
thread { isResolved }
}
}'
ไฝฟ็จ่ๆฌๆน้ๅค็
./.claude/skills/github-workflow/scripts/resolve-threads.sh {owner} {repo} {pr_number}
Retrigger Bot Reviews
After addressing findings, trigger a new scan:
gh pr comment {pr_number} --body "/q review"
gh pr comment {pr_number} --body "/codex review"
Wait 60-90 seconds for the review to complete, then check for new comments.
Iteration Loop (CRITICAL)
Repeat until review bots find no more issues:
- Address findings (fix code or explain design)
- Reply to each comment thread
- Resolve all threads
- Trigger review command (
/q review, /codex review, etc.)
- Wait 60-90 seconds
- Check for new findings
- If new findings โ repeat from step 1
- Only proceed to merge when no new positive findings appear
This loop is essential - review bots may find new issues in your fixes.
Review Thread Management
Critical Rules
- Reply DIRECTLY to each comment thread - NOT a single general PR comment
- Resolve each conversation after replying
- Wrong approach:
gh pr comment {pr} --body "Fixed all issues" (doesn't close threads)
Reply to Review Comments
gh api repos/{owner}/{repo}/pulls/{pr}/comments \
--jq '.[] | {id: .id, path: .path, body: .body[:50]}'
gh api repos/{owner}/{repo}/pulls/{pr}/comments \
-X POST \
-f body="Addressed in commit abc123 - <description of fix>" \
-F in_reply_to=<comment_id>
Resolve Review Threads
gh api graphql -f query='
query {
repository(owner: "{owner}", name: "{repo}") {
pullRequest(number: {pr}) {
reviewThreads(first: 50) {
nodes {
id
isResolved
comments(first: 1) {
nodes { body }
}
}
}
}
}
}' --jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false) | .id'
gh api graphql -f query='
mutation {
resolveReviewThread(input: {threadId: "<thread_id>"}) {
thread { isResolved }
}
}'
Batch Resolve All Threads
Use the scripts/resolve-threads.sh script to resolve all unresolved threads at once:
./.claude/skills/github-workflow/scripts/resolve-threads.sh {owner} {repo} {pr_number}
Common Response Patterns
For Valid Issues
Addressed in commit {hash} - {description of fix}
Example:
Addressed in commit abc123 - Updated Lambda@Edge handler to use external file pattern
For False Positives
This is by design because {explanation}. The {feature} requires {justification}.
Example:
This is documentation for authorized operators. The commands require IAM permissions that only administrators have. IAM access controls prevent unauthorized access, not documentation obscurity.
For Documentation Concerns
The referenced file {filename} exists in the repository at {path}. This is a reference document, not executable code.
Quick Reference
| Task | Command |
|---|
| Create design | Pencil MCP tools |
| Create PR | gh pr create --title "..." --body "..." |
| Watch checks | gh pr checks {pr} --watch |
| Get comments | gh api repos/{o}/{r}/pulls/{pr}/comments |
| Reply to comment | gh api ... -X POST -F in_reply_to=<id> |
| Resolve thread | GraphQL resolveReviewThread mutation |
| Trigger Q review | gh pr comment {pr} --body "/q review" |
| Trigger Codex review | gh pr comment {pr} --body "/codex review" |
| Check thread status | GraphQL query for reviewThreads |
Additional Resources
Reference Files
For detailed commands and conventions, consult:
references/review-commands.md - Complete gh CLI and GraphQL command reference
references/commit-conventions.md - Branch naming and commit message conventions
Scripts
Utility scripts in scripts/:
reply-to-comments.sh - Reply to a specific review comment
resolve-threads.sh - Batch resolve all unresolved threads