wt-review-pr
Skill159 starsChanged 2 days agoMITView on GitHub
Complete PR workflow with git worktree isolation - requirements to delivery; supports both standalone and orchestrated modes
- Commits and pushes
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- admin-management-pageSkill
- build-creatorSkill
- bun-webview-testSkill
- charbuild-dps-ablationSkill
- db-styleSkill
- dob-skill-creatorSkill
- fmodel-unpackSkill
- i18nSkill
- orchestrated-deliverySkill
- perf-hotspot-profilingSkill
- shuorenhuaSkill
- tauri-cdpSkill
- video-productionSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 8 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 13
When you are launched as an independent implementation session by .agents/skills/orchestrated-delivery (not the main session), follow these …
- Very specific: line 15
Requirements/Spec: Use PLAN.md + TASKS/<unit>.md as source of truth.
- Distinctive: line 22
Communication: Do NOT ask user directly; write issues/risks into final report or use pending requests.
- Distinctive: line 23
Final Report: must include: branch name, commit SHA, PR URL (if created), verification commands & results, review conclusion, open …
- Distinctive: line 47
Create isolated git worktree for development:
- Very specific: line 63
Follow project code style (.agents/docs/code-style.md)
- Very specific: line 64
Follow commit convention (.agents/docs/commit-convention.md)
- Very specific: line 65
Use bun i18n add for i18n content (all 6 languages, each in native language)
- Very specific: line 66
Run build tools as needed (bun icon add, bun tools/data-pack.ts, etc.)
- Very specific: line 89
Use a fresh-context subagent to invoke /code-review skill (if available.
- Distinctive: line 92
Check compliance with project conventions
- Distinctive: line 106
Commit code and create PR:
- Distinctive: line 129
Evidence: Before/After screenshots or test output
- Distinctive: line 149
Note: Only clean up after PR successfully created, ensuring code is pushed to remote.
- Distinctive: line 166
PR creation fails: Keep worktree, wait for user intervention
- Very specific: line 174
Follow project rules: don't run pnpm dev, don't execute git push/merge and other sensitive operations without user confirmation
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Worktree-Isolated PR Workflow
End-to-end isolated PR workflow: requirements gathering → specification → worktree implementation → testing → code review → PR creation → cleanup.
Orchestrated Mode (launched by orchestrated-delivery)
When you are launched as an independent implementation session by .agents/skills/orchestrated-delivery (not the main session), follow these overrides:
- Requirements/Spec: Use
PLAN.md+TASKS/<unit>.mdas source of truth; skip steps 1-2 interactive confirmation; do NOT call/grill-with-docs. - Worktree: Already created by launcher via
t3_thread_launchworkspaceStrategy; skip step 3, do NOT executegit worktree add. - Implementation: Implement directly per task spec; proceed without
/implement-specif unavailable. - Testing: Execute step 5 commands; include results in final report.
- Review: Execute step 6; if
/code-reviewunavailable, use read-only subagent for equivalent review. - PR Creation: Execute step 7 only if task spec requires it; otherwise commit to branch and report.
- Cleanup: Skip step 8; do NOT remove worktree, leave it to orchestrator.
- Communication: Do NOT ask user directly; write issues/risks into final report or use pending requests.
- Final Report must include: branch name, commit SHA, PR URL (if created), verification commands & results, review conclusion, open questions.
Workflow Steps
Execute the complete workflow in standalone mode:
1. Requirements Gathering
Invoke /grill-with-docs skill (if available) to confirm requirements with user:
- Understand the actual problem the user wants to solve
- Confirm technical boundaries and constraints
- Identify relevant documentation and context
2. Specification
Invoke /to-spec skill (if available) to generate technical specification:
- Transform requirements into actionable technical spec
- Define clear acceptance criteria
- Plan file change scope
3. Worktree Creation (Isolation)
Create isolated git worktree for development:
# Create feature branch and worktree based on current master
BRANCH_NAME="feat/$(date +%s)-<descriptive-name>"
git worktree add -b "$BRANCH_NAME" "../dna-builder-wt-$BRANCH_NAME" masterImportant: Record worktree path and branch name for subsequent steps.
4. Implementation
Invoke /implement-spec skill in worktree (if available; otherwise implement directly per spec):
- Switch to worktree directory
- Implement per specification
- Follow project code style (
.agents/docs/code-style.md) - Follow commit convention (
.agents/docs/commit-convention.md) - Use
bun i18n addfor i18n content (all 6 languages, each in native language) - Run build tools as needed (
bun icon add,bun tools/data-pack.ts, etc.)
5. Testing & Linting (Verification)
Execute verification in worktree:
# Frontend changes
pnpm lint # Incremental lint (Biome + vue-tsc on changed files only)
pnpm test # Run tests if test files modified
# Backend changes (Rust)
cargo check
cargo test
# Data package changes
pnpm --filter dna-builder-data testFix all errors and warnings before proceeding.
6. Code Review
Use a fresh-context subagent to invoke /code-review skill (if available; otherwise use read-only subagent) for objective review:
- Scan implementation code quality
- Check compliance with project conventions
- Identify potential issues and improvement opportunities
Handle review feedback:
- Valid issues: Fix in worktree
- Invalid issues: Record but may ignore
- Controversial: Discuss with user to decide
7. PR Creation (Pull Request)
⚠️ The following commands modify remote repository:
git pushandgh pr createare sensitive operations. Must confirm with user in conversation first (or confirm launcher has explicitly authorized auto-push/PR), then proceed.
Commit code and create PR:
# Commit all changes
git add .
git commit -m "feat(<scope>): <description>
- <change 1>
- <change 2>
"
# Push to remote
git push -u origin "$BRANCH_NAME"
# Create PR using GitHub CLI
gh pr create --base master --head "$BRANCH_NAME" \
--title "<PR title>" \
--body "<PR body following /pr template>"Invoke /pr skill (if available) to generate PR description including:
- Summary: Visual of code changes (diff/tree/mermaid)
- Evidence: Before/After screenshots or test output
- Merge Danger:
- Door: one-way / two-way
- Blast Radius: impact scope assessment
8. Worktree Cleanup
Clean up worktree after PR creation:
# Return to main repo
cd <main-repo-path>
# Remove worktree (keep remote branch)
git worktree remove "../dna-builder-wt-$BRANCH_NAME"
# Delete local branch (remote branch auto-deleted by GitHub after PR merge)
git branch -d "$BRANCH_NAME"Note: Only clean up after PR successfully created, ensuring code is pushed to remote.
Usage Example
# User invocation
/wt-review-pr
# Or with requirement description
/wt-review-pr Add user avatar upload featureError Handling
- Unclear requirements:
/grill-with-docsphase clarifies with user - Lint/Test failures: Fix in worktree then re-verify
- Code review finds issues: Fix then re-review
- PR creation fails: Keep worktree, wait for user intervention
- Any step fails: Pause workflow, report issue, wait for user decision
Notes
- Worktree path pattern:
../dna-builder-wt-<branch-name> - Branch naming:
feat/<timestamp>-<descriptive-name> - Work entirely in worktree to avoid polluting main repo
- Follow project rules: don't run
pnpm dev, don't execute git push/merge and other sensitive operations without user confirmation - i18n content must cover all 6 languages at once (cn/tw/en/jp/kr/fr), each written in its native language
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

