一键导入
review-and-submit
Lightweight review-fix loop (2 rounds, 1 agent each), then create PR and merge
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Lightweight review-fix loop (2 rounds, 1 agent each), then create PR and merge
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Launch, automate, and validate Electron desktop apps using playwright-cli via Chrome DevTools Protocol. Use this skill to validate UI changes in Orca, test features in the running Electron app, verify code fixes work end-to-end, or automate any Electron app (VS Code, Slack, Discord, etc.). Triggers include "validate in Electron", "test in the app", "verify the fix", "check the UI", "/electron", "automate Slack app", "control VS Code", or any task requiring interaction with a running Electron application.
Use the Orca CLI to orchestrate worktrees and live terminals through a running Orca editor. Use when an agent needs to create, inspect, update, or remove Orca worktrees; inspect repo state known to Orca; or read, send to, wait on, or stop Orca-managed terminals. Coding agents should also keep the current worktree comment updated with the latest meaningful work-in-progress checkpoint whenever useful; this is an expected default behavior, not a special trigger-only action. Triggers include "use orca cli", "manage Orca worktrees", "read Orca terminal", "reply to Claude Code in Orca", "create a worktree in Orca", "update Orca worktree comment", or any task where the agent should operate through Orca instead of talking to git worktrees and terminal processes directly.
基于 SOC 职业分类
| name | review-and-submit |
| description | Lightweight review-fix loop (2 rounds, 1 agent each), then create PR and merge |
Lightweight autonomous pipeline: review code with a single agent, fix issues (up to 2 rounds), then create PR and merge. Designed for smaller PRs where full parallel review is overkill.
IMPORTANT: Execute this entire process autonomously without asking the user for confirmation at any step.
REVIEW-FIX (max 2 rounds, 1 agent each) → CREATE PR → WAIT FOR CI → MERGE
Get the diff to understand what changed:
MERGE_BASE=$(git merge-base origin/main HEAD)
git diff $MERGE_BASE --stat
git diff $MERGE_BASE
Spawn one review agent that covers all review concerns:
Agent(
subagent_type: "general-purpose",
model: "opus",
description: "Review all changes on branch",
prompt: """
Review all code changes on this branch vs origin/main.
Run: git diff $(git merge-base origin/main HEAD)
Review for:
- Correctness and logical bugs
- Security issues
- Type safety issues
- Error handling gaps
- Performance problems
- Dead code or unused imports
**SCOPE**: Only report issues in changed code or directly caused by the changes.
Do NOT report pre-existing issues unrelated to this PR.
For each finding, output:
- File: path/to/file.ts
- Line: NN
- Severity: Critical|High|Medium|Low
- Issue: [description]
- Fix: [suggested fix]
If no issues found, say "No issues found."
"""
)
If the review found issues:
Agent(
subagent_type: "general-purpose",
model: "opus",
description: "Fix review issues",
prompt: """
Fix the following review issues:
[LIST ALL CRITICAL/HIGH/MEDIUM ISSUES FROM REVIEW]
Instructions:
1. Read each file
2. Apply fixes using the Edit tool
3. Verify fixes don't break syntax
4. Report what was fixed
"""
)
pnpm typecheck 2>&1
If typecheck fails, fix type errors (up to 2 attempts).
IF (review found no Critical/High/Medium issues):
→ EXIT loop — code is clean
IF (fixes applied):
→ Run another round to verify (unless already at round 2)
IF (round 2 reached):
→ EXIT loop
After the review-fix loop completes, commit any changes:
if [ -n "$(git status --porcelain)" ]; then
git add -A && git commit -m "fix: address review findings"
fi
Continue to Step 2 — do not stop here.
FIRST: Push the branch to the remote so gh pr create doesn't fail with
aborted: you must first push the current branch to a remote. The
create-pr skill rebases locally but does not always push before invoking
gh pr create, and gh refuses to create a PR for an un-pushed branch.
git push --force-with-lease -u origin HEAD
Then invoke:
Use the Skill tool: skill: "create-pr"
After /create-pr completes, extract PR info:
gh pr view --json number,url --jq '.number, .url'
Wait 2.5 minutes before the first poll:
echo "Waiting 2.5 minutes for CI checks..." && sleep 150
CRITICAL: Set timeout: 210000 (3.5 minutes) on the Bash tool call for this sleep.
For each poll:
CHECKS=$(gh pr checks --json name,state,bucket 2>&1)
echo "$CHECKS"
if echo "$CHECKS" | jq -e 'length == 0' >/dev/null 2>&1; then
echo "RESULT:NO_CHECKS"
elif echo "$CHECKS" | jq -e '[.[].bucket] | all(. == "pass" or . == "skipping")' >/dev/null 2>&1; then
echo "RESULT:PASSED"
elif echo "$CHECKS" | jq -e '[.[].bucket] | any(. == "fail" or . == "cancel")' >/dev/null 2>&1; then
echo "RESULT:FAILED"
else
echo "RESULT:PENDING"
fi
PASSED → Proceed to mergeFAILED → Attempt one quick fix iteration (diagnose from gh run view --log-failed, fix, push, re-poll)PENDING → Wait 90s (sleep 90, timeout: 150000), then poll againNO_CHECKS → Proceed to mergeIS_WORKTREE=false
if [ "$(git rev-parse --git-dir)" != "$(git rev-parse --git-common-dir)" ]; then
IS_WORKTREE=true
fi
BRANCH=$(git branch --show-current)
if [ "$IS_WORKTREE" = "true" ]; then
gh pr merge --admin --squash
git push origin --delete "$BRANCH" 2>/dev/null || true
else
gh pr merge --admin --squash --delete-branch
fi
If CI fails after PR creation, run one fix iteration:
FAILED_RUN=$(gh run list --branch $(git branch --show-current) --limit 5 --json databaseId,conclusion,name --jq '[.[] | select(.conclusion == "failure")] | .[0].databaseId')
if [ -n "$FAILED_RUN" ] && [ "$FAILED_RUN" != "null" ]; then
gh run view "$FAILED_RUN" --log-failed 2>&1 | tail -200
fi
pnpm typecheck, commit and push:if [ -n "$(git status --porcelain)" ]; then
git add -A && git commit -m "fix: address CI failures"
git push --force-with-lease
fi
--admin anyway.╔════════════════════════════════════════════════════════════╗
║ REVIEW AND SUBMIT ║
╠════════════════════════════════════════════════════════════╣
║ Review-Fix Loop: ║
║ Round 1: ✅ X issues found, Y fixed ║
║ Round 2: ✅ Clean review ║
║ Create PR: ✅ PR #123 ║
║ CI Checks: ✅ Passed ║
║ Merge: ✅ Merged with --admin --squash ║
╠════════════════════════════════════════════════════════════╣
║ PR URL: https://github.com/org/repo/pull/123 ║
╚════════════════════════════════════════════════════════════╝