com um clique
pr-automerge
// Activate when asked to auto-review and merge a PR. Runs a closed-loop workflow: subagent Stage 3 review -> fix findings -> re-review -> post ICC-REVIEW receipt -> merge (optional via workflow.auto_merge).
// Activate when asked to auto-review and merge a PR. Runs a closed-loop workflow: subagent Stage 3 review -> fix findings -> re-review -> post ICC-REVIEW receipt -> merge (optional via workflow.auto_merge).
Activate when starting new work to check for established patterns. Activate when ensuring consistency with team standards or when promoting successful memory patterns. Searches and applies best practices before implementation.
Activate when user wants to save knowledge, search past decisions, or manage persistent memories. Handles architecture patterns, implementation logic, issues/fixes, and past implementations. Uses local SQLite + FTS5 + vector embeddings for fast hybrid search. Supports write, search, update, archive, and list operations.
Activate when user explicitly requests the development workflow process, asks about workflow phases, or says "start work", "begin development", "follow the process". Activate when creating PRs or deploying to production. NOT for simple questions or minor fixes. Executes AUTONOMOUSLY - only pauses when human decision is genuinely required.
Activate when reviewing code, before committing, after committing, or before merging a PR. Activate when user asks to review, audit, check for security issues, or find regressions. Analyzes code for logic errors, regressions, edge cases, security issues, and test gaps. Fixes findings AUTOMATICALLY. Required at process skill quality gates.
Activate when user asks to commit, push changes, create a PR, open a pull request, or submit changes for review. Activate when process skill reaches commit or PR phase. Provides commit message formatting and PR structure. PRs default to dev branch, not main. Works with git-privacy skill.
Activate when user asks to release, bump version, cut a release, merge to main, or tag a version. Handles version bumping (semver), CHANGELOG updates, PR merging, git tagging, and GitHub release creation.
This skill implements the closed-loop workflow: Review via subagent -> ICC-REVIEW receipt -> merge when NO FINDINGS -> otherwise fix and restart.
<PR-number>dev. Never auto-merge a PR targeting main unless it is an explicitly requested release workflow.ICC-REVIEW-RECEIPT exists for the PR's current head SHA:
Reviewer-Stage: 3 (temp checkout)Reviewer-Agent: ... (subagent)Head-SHA matches headRefOidFindings: 0 and NO FINDINGSResult: PASSworkflow.require_github_approval=true.workflow.auto_merge=true (standing approval), the agent MAY merge once gates pass.@Reviewer and run Reviewer Stage 3 in a temp checkout.ICC-REVIEW-RECEIPT NO FINDINGS comment for the current head SHA.workflow.require_github_approval=true): after posting NO FINDINGS
receipt, reviewer subagent should:
APPROVED review already exists.gh pr review <PR-number> --approve --body "Approved based on ICC Stage 3 review receipt (NO FINDINGS)."gh user: GitHub forbids approving your own PR (server-side rule). Skip.
workflow.auto_merge=true and base is dev: merge the PR (agent-performed merge; do NOT use --auto).PR info:
PR=<PR-number>
gh pr view "$PR" --json number,baseRefName,headRefName,headRefOid,state,mergeable --jq .
gh pr checks "$PR"
Approval check (optional gate):
PR=<PR-number>
PR_AUTHOR=$(gh pr view "$PR" --json author --jq .author.login)
GH_USER=$(gh api user --jq .login)
APPROVALS=$(gh pr view "$PR" --json reviews --jq '[.reviews[] | select(.state=="APPROVED")] | length')
echo "Approvals: $APPROVALS"
if [ "$PR_AUTHOR" = "$GH_USER" ]; then
echo "Self-authored PR ($GH_USER): GitHub forbids self-approval; approvals may require a bot/second identity."
fi
Receipt verification:
PR=<PR-number>
HEAD_SHA=$(gh pr view "$PR" --json headRefOid --jq .headRefOid)
RECEIPT=$(gh pr view "$PR" --json comments --jq '.comments | map(select(.body | contains("ICC-REVIEW-RECEIPT"))) | last | .body // ""')
echo "$RECEIPT" | rg -q "Reviewer-Stage: 3 \\(temp checkout\\)"
echo "$RECEIPT" | rg -q "Reviewer-Agent:.*\\(subagent\\)"
echo "$RECEIPT" | rg -q "Head-SHA: $HEAD_SHA"
echo "$RECEIPT" | rg -q "Findings: 0"
echo "$RECEIPT" | rg -q "NO FINDINGS"
echo "$RECEIPT" | rg -q "Result: PASS"
Merge (agent-performed):
gh pr merge <PR-number> --squash --delete-branch