/pr-workflow
Complete workflow for submitting code changes — create branch, commit, open PR, check CI, fix failures, and merge.
$ npx -y skills add Chorus-AIDLC/Chorus --skill pr-workflow --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/pr-workflow
Context preview
The summary Claude sees to decide when to auto-load this skill.
Complete workflow for submitting code changes — create branch, commit, open PR, check CI, fix failures, and merge.
SKILL.md
pr-workflow.SKILL.mdname: pr-workflow
description: Complete workflow for submitting code changes — create branch, commit, open PR, check CI, fix failures, and merge.
license: AGPL-3.0
metadata:
author: chorus
version: "0.1.0"
category: development
PR Workflow
Complete workflow for taking local code changes through branch creation, PR, CI verification, failure fix, and merge.
Prerequisites
- Code changes are already made and tested locally
- Remote `origin` is configured
- `gh` CLI is authenticated
Steps
1. Pre-flight Check
git status
git diff --stat
git log --oneline -5
Verify before proceeding:
- Only intended files are modified
- No sensitive files (.env, credentials) staged
- No temp artifacts (screenshots, logs) left behind
2. Create Branch
Branch from current HEAD. Naming convention:
| Type | Prefix | Example | |------|--------|---------| | Bug fix | `fix/` | `fix/remove-legacy-textarea` | | Feature | `feat/` | `feat/structured-ac-editor` | | Refactor | `refactor/` | `refactor/service-layer` | | Test | `test/` | `test/e2e-proposal-flow` | | Docs | `docs/` | `docs/api-reference` | | Chore | `chore/` | `chore/bump-deps` |
git checkout -b {prefix}{short-description}3. Stage and Commit
Stage specific files only — never use `git add .` or `git add -A`:
git add path/to/file1 path/to/file2
**Note**: Next.js paths need shell escaping:
git add src/app/\(dashboard\)/projects/\[uuid\]/file.tsx
Commit with HEREDOC for clean multi-line messages:
git commit -m "$(cat <<'EOF'
{type}: {concise description of why, not what}
{Optional body explaining context or trade-offs}
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
EOF
)"4. Push and Open PR
git push -u origin {branch-name}gh pr create --title "{type}: {title under 70 chars}" --body "$(cat <<'EOF'
## Summary
- Change 1
- Change 2
## Changed files
| File | Change |
|------|--------|
| `path/file.ts` | What changed |
## Test plan
- [x] Automated test passed
- [ ] Manual verification needed
Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"5. Check CI
gh pr checks {pr-number}- **All pass** — report to user, ready for merge
- **Any fail** — proceed to Step 6
6. Fix CI Failures
Get the failed logs:
gh pr checks {pr-number} # find failed run ID
gh run view {run-id} --log-failed 2>&1 | tail -80 # read failure detailsCommon failure types and fixes:
| Failure | Local repro | Fix | |---------|------------|-----| | Test assertion | `npx vitest run path/to/test.ts` | Update test expectations to match new behavior | | Type error | `npx tsc --noEmit` | Fix types; check only your errors with `\| grep {keyword}` | | Lint error | `pnpm lint` | Auto-fix or manual fix | | Missing test update | `grep -r "changedField" src/**/__tests__/` | Update test fixtures/helpers using the old field |
After fixing:
git add {fixed-files}
git commit -m "$(cat <<'EOF'
fix: {what was fixed in tests/types}
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
EOF
)"
git pushRe-check CI — repeat until green:
gh pr checks {pr-number}7. Merge
Only when user explicitly requests. Default to squash merge:
gh pr merge {pr-number} --squash --delete-branch
git checkout main && git pullChecklist
Before opening PR:
- [ ] `npx tsc --noEmit` passes (or no new errors)
- [ ] Related tests pass locally
- [ ] No screenshots, temp files, or debug logs in working tree
- [ ] Grep test files for any changed field/function names
Before merging:
- [ ] CI is green
- [ ] User has approved the merge
Read more
name: pr-workflow description: Complete workflow for submitting code changes — create branch, commit, open PR, check CI, fix failures, and merge. license: AGPL-3.0 metadata: author: chorus version: "0.1.0" category: development
PR Workflow
Complete workflow for taking local code changes through branch creation, PR, CI verification, failure fix, and merge.
Prerequisites
- Code changes are already made and tested locally
- Remote `origin` is configured
- `gh` CLI is authenticated
Steps
1. Pre-flight Check
git status git diff --stat git log --oneline -5
Verify before proceeding:
- Only intended files are modified
- No sensitive files (.env, credentials) staged
- No temp artifacts (screenshots, logs) left behind
2. Create Branch
Branch from current HEAD. Naming convention:
| Type | Prefix | Example | |------|--------|---------| | Bug fix | `fix/` | `fix/remove-legacy-textarea` | | Feature | `feat/` | `feat/structured-ac-editor` | | Refactor | `refactor/` | `refactor/service-layer` | | Test | `test/` | `test/e2e-proposal-flow` | | Docs | `docs/` | `docs/api-reference` | | Chore | `chore/` | `chore/bump-deps` |
git checkout -b {prefix}{short-description}3. Stage and Commit
Stage specific files only — never use `git add .` or `git add -A`:
git add path/to/file1 path/to/file2
**Note**: Next.js paths need shell escaping:
git add src/app/\(dashboard\)/projects/\[uuid\]/file.tsx
Commit with HEREDOC for clean multi-line messages:
git commit -m "$(cat <<'EOF'
{type}: {concise description of why, not what}
{Optional body explaining context or trade-offs}
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
EOF
)"4. Push and Open PR
git push -u origin {branch-name}gh pr create --title "{type}: {title under 70 chars}" --body "$(cat <<'EOF'
## Summary
- Change 1
- Change 2
## Changed files
| File | Change |
|------|--------|
| `path/file.ts` | What changed |
## Test plan
- [x] Automated test passed
- [ ] Manual verification needed
Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"5. Check CI
gh pr checks {pr-number}- **All pass** — report to user, ready for merge
- **Any fail** — proceed to Step 6
6. Fix CI Failures
Get the failed logs:
gh pr checks {pr-number} # find failed run ID
gh run view {run-id} --log-failed 2>&1 | tail -80 # read failure detailsCommon failure types and fixes:
| Failure | Local repro | Fix | |---------|------------|-----| | Test assertion | `npx vitest run path/to/test.ts` | Update test expectations to match new behavior | | Type error | `npx tsc --noEmit` | Fix types; check only your errors with `\| grep {keyword}` | | Lint error | `pnpm lint` | Auto-fix or manual fix | | Missing test update | `grep -r "changedField" src/**/__tests__/` | Update test fixtures/helpers using the old field |
After fixing:
git add {fixed-files}
git commit -m "$(cat <<'EOF'
fix: {what was fixed in tests/types}
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
EOF
)"
git pushRe-check CI — repeat until green:
gh pr checks {pr-number}7. Merge
Only when user explicitly requests. Default to squash merge:
gh pr merge {pr-number} --squash --delete-branch
git checkout main && git pullChecklist
Before opening PR:
- [ ] `npx tsc --noEmit` passes (or no new errors)
- [ ] Related tests pass locally
- [ ] No screenshots, temp files, or debug logs in working tree
- [ ] Grep test files for any changed field/function names
Before merging:
- [ ] CI is green
- [ ] User has approved the merge
The Agent Harness for AI-Human Collaboration, inspired by the AI-DLC (AI-Driven Development Lifecycle)
Repo: Chorus-AIDLC/Chorus
Other skills on chorus.
- /blog
Write release blog posts for Chorus — problem-first narrative, bilingual (zh/en), following the project's editorial style.
Open skill - /e2e-verification
Use when manually verifying a Chorus frontend change in a real browser — finding local login credentials, driving the running dev server with the Playwright MCP, logging in, navigating to a page, and capturing snapshots/screenshots for e2e acceptance.
Open skill - /openspec-apply-change
Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
Open skill - /openspec-archive-change
Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
Open skill - /openspec-explore
Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.
Open skill - /openspec-propose
Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.
Open skill

