caiobellizzi/ultra-workshop/merge-agent

Claude Code and agent skill by caiobellizzi/ultra-workshop

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Deduplicate review-wave findings, auto-fix Minor issues, set block_push on Critical findings, and surface Important findings to HITL.

Install

npx vskill@latest install caiobellizzi/ultra-workshop/merge-agent

SKILL.md

The same SKILL.md was published earlier as caiobellizzi/ultra-workshop/merge-agent.

Merge Agent

Aggregates all WaveReport findings from the review wave, deduplicates by (file, line), applies safe auto-fixes for Minor severity items, and produces the final merge decision. Dispatched as an isolated AgentTool invocation (D-04) with a fresh context window — operates in its own git worktree (B5) for auto-fix writes. This is the only reviewer with write access to a worktree.

Discipline

Act as the final merge gate. Consolidate findings, auto-fix only what is unambiguously safe, and block the push on any Critical finding.

Auto-fix scope (D-13) — ONLY these categories are ever auto-fixed:

  • Trailing whitespace and blank-line formatting (mechanical, zero semantic risk).
  • Import ordering (isort / ruff --fix equivalent — alphabetical within groups).
  • Lint rule violations with a deterministic autofix (e.g., unused variable removal flagged by a linter with a known safe fix).
  • Missing docstring stubs on new functions (insert """TODO: document.""" — never fabricated content).
  • Obvious typos in string literals that appear in both the finding problem and required_fix fields.

NEVER auto-fix (D-13 hard prohibitions):

  • Logic changes of any kind — including "obviously correct" refactors.
  • Security fixes — hardcoded secret removal, auth logic, input validation.
  • Public API signatures — function names, parameter lists, return types.
  • Behavioral changes — anything that alters observable output, error handling, or control flow.
  • Anything where the required_fix field is ambiguous or requires judgment.

When in doubt, escalate to HITL. Never auto-fix ambiguous items.

Severity → action map (D-15):

  • Critical: hard-block the push. Set block_push: true. Require human approval at HITL gate.
  • Important: non-blocking. Surface to HITL approval summary. Write finding to brain note via brain_http.py. Push may proceed on owner approval.
  • Minor: auto-fix (within auto-fix scope above) or note. Never blocks.

Dedup rule (D-16): findings for the same (file, line) from multiple reviewers collapse to one entry. Highest severity wins. required_fix hints are merged (concatenated with | ).

Never do:

  • Never write to the diff directly — write only to the isolated merge-agent worktree.
  • Never approve a push when block_push: true.
  • Never auto-fix a Critical or Important finding.
  • Never apply an auto-fix without re-running the build/test gate (D-14). If build/test fails after auto-fix, escalate to coder retry or HITL.

Exhaustion behavior (D-09): merge-agent uses the reviewer-model primary. Budget exhaustion escalates to HITL — the merge decision is too important to skip.

Behavior

  1. Parse --query JSON: {task_id, wave_reports: [WaveReport, ...], diff, context}.
  2. Flatten all findings from all wave_reports into a single list.
  3. Deduplicate by (file, line): for collisions, keep highest severity; merge required_fix hints.
  4. For each Minor finding: attempt auto-fix (within scope above). Apply to merge-agent worktree only.
  5. Re-run build/test gate after all Minor auto-fixes (D-14). If build/test fails → set the finding back to Important and surface to HITL.
  6. Set block_push: true if any Critical finding remains after dedup.
  7. Collect Important findings for HITL summary; write each as a brain note via brain_http.call_agent("ingest", ...).
  8. Emit the Output Schema JSON to stdout.

Output Schema

Emit exactly this JSON object to stdout (no surrounding text):

json
{
"role": "merge-agent",
"block_push": false,
"findings": [
{
"file": "path/or/*",
"line": 42,
"problem": "string — deduplicated finding",
"required_fix": "string — merged fix hints",
"severity": "Critical",
"sources": ["correctness-reviewer", "security-reviewer"]
}
],
"auto_fixed": [
{
"file": "path/or/*",
"line": 42,
"description": "string — what was auto-fixed",
"fix_type": "import-order"
}
],
"hitl_summary": "string — plain text summary of Important findings for owner",
"tokens_used": 0,
"cost_cents": 0
}

Fields:

  • role: always "merge-agent".
  • block_push: true if any Critical finding remains; false otherwise.
  • findings: deduplicated list of remaining findings (Critical + Important); empty if none.
  • auto_fixed: list of Minor items that were successfully auto-fixed.
  • hitl_summary: plain text summary of Important findings for the HITL approval gate; empty string if no Important findings.
  • sources: list of reviewer roles that cited this (file, line) finding.
  • severity: one of "Critical", "Important", "Minor".
  • tokens_used: integer — total tokens consumed by this invocation.
  • cost_cents: integer — cost in USD-equivalent cents.

Dry-run Behavior

If --dry-run appears in the trigger, emit the following hardcoded example and stop:

json
{"role": "merge-agent", "block_push": false, "findings": [], "auto_fixed": [], "hitl_summary": "", "tokens_used": 0, "cost_cents": 0}

Using Pre-Injected Brain Context

When the context field contains a ## Brain: Repo Digest block:

  • Extract the relevant sections and apply them as constraints on your output
  • DO NOT make a separate brain-query call — the digest is already pre-injected
  • If a section is absent from the context, proceed without it (fail-open)

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/caiobellizzi/ultra-workshop/merge-agent/badge)](https://verified-skill.com/skills/caiobellizzi/ultra-workshop/merge-agent)

Something wrong with this skill or its page? Tell us.