merge

merge is an agent for coding agents from Bitmia-ai/RedEye. It costs 21 tokens per session (1,732 once invoked), scanned A, original, MIT.

An agent for the merge phase of a RedEye development workflow. It brings verified changes from a separate Git worktree into the main branch and clears related claims.

In plain words
What is it for?
Use it to check whether changes need merging, merge a worktree into the main branch, pull main back, and clear claims.
Why use it?
It standardises the final integration step after verification and handles merge conflicts according to the workflow rules. A Git worktree is a separate working directory connected to the same repository.

Agent

Part of the redeye plugin — 10 commands, 13 agents, 1 hook shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/bitmia-ai/redeye/merge
Clone the repo
git clone --depth 1 https://github.com/Bitmia-ai/RedEye

Or install redeye, the plugin that ships this one along with the rest of its 10 commands, 13 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for merge

README.md
[![agentmods](https://agentmods.dev/badge/agents/bitmia-ai/redeye/merge.svg)](https://agentmods.dev/agents/bitmia-ai/redeye/merge)
Your own site
<a href="https://agentmods.dev/agents/bitmia-ai/redeye/merge"><img src="https://agentmods.dev/badge/agents/bitmia-ai/redeye/merge.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,732 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00021 $0.01732
Opus 5 $0.00010 $0.00866
Sonnet 5 $0.00004 $0.00346
Haiku 4.5 $0.00002 $0.00173

Measured 4d ago against content hash e1a5ca4a1278, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

merge scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/merge.md · 143 lines

How it starts

The opening of the file, as written. The whole thing — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Phase: MERGE

Precondition: VERIFY passed. Only runs when healthy.

Do NOT read files outside your listed scope: .redeye/state.json, .active-claims.json.

Step 1: Check If Merge Needed

MAIN_DIR=$(git rev-parse --path-format=absolute --git-common-dir | sed 's|/.git$||')
WORKTREE_BRANCH=$(git rev-parse --abbrev-ref HEAD)
UNMERGED=$(git log main..$WORKTREE_BRANCH --oneline)

If empty: nothing to merge. Skip to output.

Step 2: Merge Worktree into Main

Use bash scripts/lock.sh "$MAIN_DIR/.redeye-git.lock" ... around all main-worktree git operations. (scripts/lock.sh is the portable wrapper RedEye ships; macOS has no flock(1) so calling flock directly hard-fails on the user's machine.)

Capture the pre-merge HEAD BEFORE the merge runs. It feeds Step 3's selective revert; once git merge has completed, HEAD is the post-merge commit and the revert restores the wrong contents.

PRE_MERGE=$(git -C "$MAIN_DIR" rev-parse HEAD)

bash scripts/lock.sh "$MAIN_DIR/.redeye-git.lock" \
  git -C "$MAIN_DIR" merge "$WORKTREE_BRANCH" --no-edit \
  -m "redeye: merge T{id} — {title}"

If conflicts: abort merge, set merge_status to conflict, and post a blocking question via scripts/create-question.sh (the ONLY supported path for creating inbox questions):

bash scripts/create-question.sh \
  --question "Merge conflict on <task>: which side wins, or should we abort?" \
  --default "abort and re-plan" \
  --options "take ours, take theirs, abort and re-plan" \
  --blocks-task "<task-id>" \
  --context "MERGE conflict; details in .redeye/status.md"

Step 3: Exclude Worktree-Only Files

Use the PRE_MERGE sha captured at the start of Step 2 to selectively restore worktree-local control files (state.json, status.md, tester-reports.md, feedback.md) so the merge commit only carries source-tree changes:

bash scripts/lock.sh "$MAIN_DIR/.redeye-git.lock" bash -c '
  git -C "$1" checkout "$2" -- \
    .redeye/state.json .redeye/status.md .redeye/tester-reports.md .redeye/feedback.md 2>/dev/null || true
  git -C "$1" diff --cached --quiet || \
    git -C "$1" commit --amend --no-edit
' _ "$MAIN_DIR" "$PRE_MERGE"

Read the full file on GitHub · 143 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 143 lines · 21 tokens per session scan A e1a5ca4a1278

Subscribe to this mod's changes

merge is an agent published in the GitHub repository Bitmia-ai/RedEye (6 stars, last pushed 2mo ago), licensed MIT. It adds 21 tokens to every session and 1,732 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

squad-leader

Coordinator and facilitator for complex tasks within a multi-agent team (squad). Acts as the main communication channel between the squad and the team lead (main Claude), requests new worker spawns as necessary, and helps to keep the squad on course and track progress. Use when faced with a complex task with no…

hesreallyhim/really-claude-code · 83 tokens

agent-explorer

Agent and skill catalog searcher for squad formation. Reads catalog paths from a user-level config and searches them for existing agents and skills that match capability gaps identified by the skill-identifier. Use when a squad-leader needs to check whether existing agents/skills cover the gaps in a SKILL ANALYSIS…

hesreallyhim/really-claude-code · 84 tokens

team-architect

Designs optimal multi-agent team configurations for any software engineering situation. Analyzes the problem's traits (complexity, urgency, domain, risk), selects the best team pattern, defines agent roles, designs task dependency graphs, and recommends a communication topology. This agent should be used when users…

hesreallyhim/really-claude-code · 140 tokens

therapist

Internal facilitator for /therapist sessions. Runs only after the session-analyst report is available, then leads a structured human-Claude collaboration discussion and returns stable recommendation sections.

hesreallyhim/really-claude-code · 39 tokens

skill-identifier

Skill identification specialist for multi-agent teams. Identifies what skills are required for a task, checks coverage against installed skills, recommends skills for specific agent roles, and surfaces gaps when they exist. Use when you need to identify required capabilities, check skill coverage, produce role-skill…

hesreallyhim/really-claude-code · 70 tokens

session-analyst

Internal analyst for /therapist sessions and direct transcript-analysis requests. Reviews recent Claude Code JSONL sessions, extracts collaboration patterns, and returns a structured report for the therapist agent.

hesreallyhim/really-claude-code · 41 tokens