caiobellizzi/ultra-workshop/merge-agent
Claude Code and agent skill by caiobellizzi/ultra-workshop
- community
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-agentSKILL.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
--fixequivalent — 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
problemandrequired_fixfields.
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_fixfield 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. Setblock_push: true. Require human approval at HITL gate.Important: non-blocking. Surface to HITL approval summary. Write finding to brain note viabrain_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
CriticalorImportantfinding. - 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
- Parse
--queryJSON:{task_id, wave_reports: [WaveReport, ...], diff, context}. - Flatten all findings from all
wave_reportsinto a single list. - Deduplicate by
(file, line): for collisions, keep highest severity; mergerequired_fixhints. - For each
Minorfinding: attempt auto-fix (within scope above). Apply to merge-agent worktree only. - Re-run build/test gate after all Minor auto-fixes (D-14). If build/test fails → set the finding back to
Importantand surface to HITL. - Set
block_push: trueif anyCriticalfinding remains after dedup. - Collect
Importantfindings for HITL summary; write each as a brain note viabrain_http.call_agent("ingest", ...). - Emit the Output Schema JSON to stdout.
Output Schema
Emit exactly this JSON object to stdout (no surrounding text):
Fields:
role: always"merge-agent".block_push:trueif any Critical finding remains;falseotherwise.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:
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
- SKILL.md in the repositoryCheckingskills/merge-agent/SKILL.md
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
[](https://verified-skill.com/skills/caiobellizzi/ultra-workshop/merge-agent)