mcpbeat Sign in

Review Fix Signoff Loop Agent Skill

Use when writing Agent Relay or Ricky workflows that must loop review, fix, and validation with fresh agent context until independent signoff agents, typically Claude and Codex, both agree the work is comprehensively complete. Covers fresh-context iterations, repairable gates, dual reviewer verdict contracts, iteration-count reporting, PR signoff comments, and blocked-state handling.

2k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
784
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/AgentWorkforce/relay --skill review-fix-signoff-loop

The instruction itself

15 sections, as written by the author

Purpose

Use this pattern for high-stakes implementation workflows where a normal "implement, test, review once" flow is not enough. The workflow must keep repairing and re-reviewing until independent signoff agents agree the spec is fully wired end to end.

Pair this with writing-agent-relay-workflows for SDK syntax and relay-80-100-workflow for deterministic validation gates.

Required Shape

  • Run deterministic preflight before agents start.
  • Confirm repository root, required specs, declared write scope, credentials needed for PR comments, and whether commit/push/PR creation is in scope.
  • For cross-repo or package-release work, write a scope matrix before implementation: repositories, branches, PRs, packages, providers/features touched, published versions, consuming package manifests, lockfiles, and expected downstream bumps.
  • Probe the CLIs used by later agent steps. For Codex, codex login status is not enough; run a tiny codex exec --ephemeral --json --sandbox read-only -m <supported-model> prompt and fail early with a clear re-login instruction if it cannot return the expected token.
  • Write preflight evidence to .workflow-artifacts/<workflow>/iteration-N/preflight.md.
  • Implement with scoped owners.
  • Use Codex workers for code changes unless the codebase has a reason to prefer another CLI.
  • Split backend, frontend, desktop, tests, docs, or infrastructure into explicit non-overlapping ownership areas.
  • Each worker writes a durable summary artifact with changed files and commands run.
  • Reconcile before validation.
  • Add a deterministic implementation-reconcile gate that checks required files, expected API/UI/runtime surfaces, migrations, generated artifacts, and untracked files with git status --short -- <paths>.
  • For multi-provider changes, reconcile against the scope matrix: every touched provider/package must be classified as implemented, dependency-only, intentionally-deferred, or not-applicable, with proof. Do not let "we only bumped the package I remembered" pass this gate.
  • For package-release flows, reconcile producer and consumer state: npm view <pkg> version, package manifests, lockfile resolved tarballs/integrities, and npm ls <pkg> from every consuming workspace.
  • For CI failures, map each failing job to its exact local command or documented non-local equivalent. Distinguish similarly named gates (for example handler coverage vs acceptance route coverage) and replay the one that actually failed.
  • Use failOnError: false, then route the captured output to a repair owner.
  • Run repairable validation.
  • Use capture -> fix -> rerun for typecheck, targeted tests, integration or E2E tests, and regression checks.
  • Include exact failing CI commands when available before broader "nearby" checks. A nearby green gate is supporting evidence, not proof that the reported CI failure is fixed.
  • Red validation output is input for a repair agent, not an immediate workflow failure.
  • Write BLOCKED_NO_COMMIT.md only for true external blockers.
  • Run fresh-context signoff reviews.
  • Start a new workflow run, new agent names, or otherwise new agent contexts for each loop iteration.
  • Run Claude and Codex signoff reviews independently over the same post-validation repo state.
  • Reviewers must read specs, diff, validation logs, artifacts, and actual files.
  • Break only on dual signoff.
  • The loop may exit only when both reviewers write the exact satisfied verdict and final deterministic acceptance is green.
  • If either reviewer finds issues or is blocked, run a Codex fix pass and start a new fresh-context review iteration.
  • Make the Codex fix pass a non-interactive one-shot worker (preset: 'worker') with a file_exists verification for its durable report. Do not rely on interactive PTY idle detection or /exit for loop progress.
  • Report final signoff.
  • Write a final SIGNOFF.md that includes iteration count, validation evidence, Claude rationale, Codex rationale, remaining risks, and artifact paths.
  • Include the final scope matrix with every repository/package/provider row signed off, deferred with owner/date, or marked not applicable. For release flows, include published and consumed versions.
  • Post the same report to the PR. Resolve the PR from an explicit env var first, then from gh pr view.

Verdict Contract

Use a strict text contract so deterministic gates can parse the result:
VERDICT: COMPREHENSIVELY_SATISFIED | FINDINGS | BLOCKED
why_passed: required when VERDICT is COMPREHENSIVELY_SATISFIED
end_to_end_wiring_verified: required when VERDICT is COMPREHENSIVELY_SATISFIED
deterministic_evidence: required when VERDICT is COMPREHENSIVELY_SATISFIED
scope_matrix_verified: required when VERDICT is COMPREHENSIVELY_SATISFIED for cross-repo/provider/package work
remaining_risks: required when VERDICT is COMPREHENSIVELY_SATISFIED
finding_id: stable-id when VERDICT is FINDINGS
severity: blocker | high | medium | low
file: path
issue: concrete gap
fix_required: exact change needed
test_required: deterministic proof needed
evidence: commands, files, or spec clause

Scope Matrix

Create a machine-readable and human-readable matrix before the first fix pass for work that spans repositories, packages, providers, or CI gates. Keep it updated every iteration.
repo | branch | PR | package/provider/surface | expected change | producer version | consumer version | files expected | gates required | status | evidence | owner

Fresh Context Implementation

Prefer an outer loop that starts a new Agent Relay workflow run per iteration:
for (let iteration = 1; ; iteration += 1) {
  await runIteration(iteration, runStamp); // new workflow name, channel, and agent names
  clearStartFromAfterResumedIteration();
  if (hasDualSignoff(iteration)) {
    writeAndPostSignoffReport(iteration);
    break;
  }
}

Codex Fixer Reliability

For review-fix loop steps, prefer this shape:
.agent(`codex-review-fixer-${suffix}`, {
  cli: 'codex',
  model: CodexModels.GPT_5_4,
  preset: 'worker',
  role: 'Review-finding fixer. Repairs valid findings and hardens tests/proofs.',
  retries: 2,
})
.step('fix-review-findings', {
  agent: `codex-review-fixer-${suffix}`,
  dependsOn: ['dual-signoff-gate'],
  task: `Read iteration artifacts. Fix every valid finding, rerun relevant checks, and write ${dir}/review-fix-report.md.`,
  verification: { type: 'file_exists', value: `${ROOT}/${dir}/review-fix-report.md` },
})

PR Signoff Comment

Final signoff should be both a durable artifact and a PR comment.
gh pr comment "$PR_NUMBER" --body-file .workflow-artifacts/my-workflow/pr-comment.md

Blocked State

Do not spin forever when progress is impossible. If agents identify a true external blocker, write:
.workflow-artifacts/<workflow>/iteration-N/BLOCKED_NO_COMMIT.md

Common Mistakes

  • Reusing the same reviewer context every loop. Start a new run or new reviewer agents for each iteration.
  • Letting a reviewer write NO_ISSUES_FOUND without pass rationale. Require the full verdict contract.
  • Treating green tests as signoff. Green deterministic gates are required evidence, not a substitute for fresh review.
  • Hard-failing the first red validation gate. Capture it, repair it, then rerun.
  • Posting a PR comment before both signoff agents agree on the same final state.
  • Forgetting to count iterations. The final report must say how many loops it took.

Other skills for the same job

different authors, same section of the catalogue
Writing Skills
by ZhanlinCui
×4

Use when creating new skills, editing existing skills, or verifying skills work before deployment

26k tokens scripts
Prompt Library
by ComeOnOliver
×2

Curated collection of high-quality prompts for various use cases. Includes role-based prompts, task-specific templates, and prompt refinement techniques. Use when user needs prompt templates, role-play prompts, or ready-to-use prompt examples for coding, writing, analysis, or creative tasks.

4k tokens
Edge Strategy Designer
by BaggaT236
×1

Convert abstract edge concepts into strategy draft variants and optional exportable ticket YAMLs for edge-candidate-agent export/validation.

7k tokens scripts
Langgraph Fundamentals
by langchain-ai
vendor ×1

INVOKE THIS SKILL when writing ANY LangGraph code. Covers StateGraph, state schemas, nodes, edges, Command, Send, invoke, streaming, and error handling.

6k tokens
Harness Model Protocol
by ComeOnOliver
×1

Analyze the protocol layer between agent harness and LLM model. Use when (1) understanding message wire formats and API contracts, (2) examining tool call encoding/decoding mechanisms, (3) evaluating streaming protocols and partial response handling, (4) identifying agentic chat primitives (system prompts, scratchpads, interrupts), (5) comparing multi-provider abstraction strategies, or (6) understanding how frameworks translate between native LLM APIs and internal representations.

12k tokens
Skill I18n
by ComeOnOliver
×1

Translate SKILL.md and README.md files into multiple languages for sharing skills internationally

11k tokens
Agent Setup Maintenance
by langfuse
vendor

| Shared workflow for editing Langfuse's repo-owned agent setup under `.agents/`. Use when changing AGENTS files, shared skills, `.agents/config.json`, generated shim behavior, provider discovery paths, or install-time agent sync.

769 tokens
Datalineage Summary
by google
vendor

>- Summarizes Google Cloud Data Lineage graphs to help users debug data quality issues and understand data provenance for BQ/GCS. Use when summarizing upstream and downstream data flows, and presenting complex lineage data as an intuitive Markdown report. Don't use for generic BigQuery queries, editing lineage relationships, or downstream deprecation. Don't use for downstream blast-radius impact analysis (use datalineage-bigquery-asset-impact-analysis skill instead).

2k tokens

How to use it

Copy the folder

Take agentworkforce/review-fix-signoff-loop from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.