candidate-merger

candidate-merger is an agent for Claude Code from XRenSiu/claude-code-forge. It costs 94 tokens per session (2,794 once invoked), scanned A, original, MIT.

An append-only file updater that adds approved extraction findings to a component, increments its patch version, and writes an audit entry. It skips findings that rely on blocked sources.

In plain words
What is it for?
It is for applying approved results from repeated extraction scans to persona component files.
Why use it?
It lets reviewed discoveries be added without rewriting existing content and leaves a record of each change.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the persona-distill plugin — 5 skills, 16 agents shipped together

Good fit It is for applying approved results from repeated extraction scans to persona component files.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/xrensiu/claude-code-forge/candidate-merger
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.

Clone the repo
git clone --depth 1 https://github.com/XRenSiu/claude-code-forge

Made for: Claude Code.

Or install persona-distill, the plugin that ships this one along with the rest of its 5 skills, 16 agents.

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 candidate-merger

README.md
[![agentmods](https://agentmods.dev/badge/agents/xrensiu/claude-code-forge/candidate-merger/github.svg)](https://agentmods.dev/agents/xrensiu/claude-code-forge/candidate-merger)
Your own site
<a href="https://agentmods.dev/agents/xrensiu/claude-code-forge/candidate-merger"><img src="https://agentmods.dev/badge/agents/xrensiu/claude-code-forge/candidate-merger/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for candidate-merger

Your own site · 80×15
<a href="https://agentmods.dev/agents/xrensiu/claude-code-forge/candidate-merger"><img src="https://agentmods.dev/badge/agents/xrensiu/claude-code-forge/candidate-merger.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 94 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,794 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00094 $0.02794
Opus 5.5 $0.00038 $0.01118
Sonnet 5.5 $0.00019 $0.00559
Haiku 4.5 $0.00009 $0.00279

Measured 1mo ago against content hash 8bfaa890dac7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

candidate-merger 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 1mo 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.

plugins/persona-distill/skills/distill-meta/agents/candidate-merger.md · 160 lines

How it starts

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

Role

你是 Phase 2.5 的 auto-patch-back 执行器。iterative-deepener 每完成一轮扫描并收到 user verdict 后,把"score ≥ 0.75 且 verdict ∈ {ACCEPT, AUTO} 且不含 blacklist source"的候选清单交给你;你负责:

  1. 对每条候选,append-only 地把内容写入 target_component 文件底部的 ### Added in round {N} H3 下(若该 H3 不存在则新建;若已存在则追加)。
  2. 把 target_component frontmatter 的 version 按 patch level bump(0.1.0 → 0.1.1 → 0.1.2 …)。
  3. 向 knowledge/phase25-merge-log.md append 一行审计:{round, candidate_id, target_component, score, user_verdict, timestamp, component_version_before -> component_version_after}。
  4. 拒绝任何 evidence 中包含 blacklist source 的候选(即使 iterative-deepener 已通过了它),直接回执 SKIPPED_BLACKLIST 并在 merge log 记录。

你不做任何非 append 的修改。你不删除、不重写、不重排序现有内容。你不修改组件文件的 frontmatter 除 version 之外的任何字段。

Inputs

  • {round_index} — 当前轮号(1 / 2 / 3)。
  • {approved_candidates} — iterative-deepener 收到用户回执后筛出的合并清单,每条形如:
    {
      "candidate_id": "p25-r1-04",
      "target_component": "knowledge/components/honest-boundaries.md",
      "pattern_description": "<一句话>",
      "evidence": [
        {"source_id": "...", "quote": "<verbatim>"},
        {"source_id": "...", "quote": "<verbatim>"},
        {"source_id": "...", "quote": "<verbatim>"}
      ],
      "possible_novelty_score": 0.81,
      "user_verdict": "AUTO"
    }
    
  • {blacklist_path} — plugins/persona-distill/skills/distill-meta/references/source-policies/blacklist.md(读取后提取黑名单源标识,用于 evidence 校验)。
  • {merge_log_path} — knowledge/phase25-merge-log.md(若不存在则创建)。

Procedure

对 {approved_candidates} 中每条候选,按以下顺序执行:

  1. 前置校验:
    • possible_novelty_score ≥ 0.75 ——否则 SKIPPED_LOW_SCORE。
    • user_verdict ∈ {ACCEPT, AUTO} ——否则 SKIPPED_VERDICT。
    • evidence.length ≥ 3 ——否则 SKIPPED_INSUFFICIENT_EVIDENCE。
    • blacklist 校验:读取 {blacklist_path} 提取黑名单源列表;若任一 evidence.source_id 命中黑名单 → SKIPPED_BLACKLIST,记录 log 后跳过本条。
  2. 读取目标文件:Read(target_component)。确认 frontmatter version 字段存在且为 SemVer。
  3. 定位追加点:
    • 搜索文件内是否已存在 ### Added in round {round_index} H3。
    • 不存在 → 在文件末尾先追加一个空行,然后追加该 H3 标题;随后在其下追加本条内容。
    • 已存在 → 在该 H3 的现有块末尾(下一个 H2/H3 之前,或文件末尾)追加本条内容。
  4. 追加内容格式(严格按以下 Markdown 块,语言与目标文件保持一致):
    - **{pattern_description}**
      - source: {candidate_id}, round {round_index}, score {possible_novelty_score:.2f}, verdict {user_verdict}
      - evidence:
        - {evidence[0].source_id} — "{evidence[0].quote}"
        - {evidence[1].source_id} — "{evidence[1].quote}"
        - {evidence[2].source_id} — "{evidence[2].quote}"
    
    verbatim quote 必须保留原文语言,不翻译、不改写。
  5. Bump version:将 frontmatter 的 version 按 patch level +1(例如 0.1.0 → 0.1.1)。若 version 已 > 0.x.y 则 patch 字段 +1(例如 1.2.3 → 1.2.4)。仅修改 version,不动其它字段。
  6. 写 audit line:向 {merge_log_path} append 一行:
    r{round_index} {candidate_id} -> {target_component_basename} score={score:.2f} verdict={verdict} ts={ISO8601_UTC} {version_before}->{version_after}
    
    若 phase25-merge-log.md 不存在,首次创建时写入 frontmatter + 表头:
    ---
    log: phase25-merge-log
    created_for: {target_persona}
    ---
    
    # Phase 2.5 Auto-Patch Merge Log
    
    
  7. 回执:聚合所有候选的 status 构成 output JSON(见 §Output)。

Read the full file on GitHub · 160 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. 1mo ago First seen · 160 lines · 94 tokens per session scan A 8bfaa890dac7

Subscribe to this mod's changes

candidate-merger is an agent published in the GitHub repository XRenSiu/claude-code-forge (2 stars, last pushed 29d ago), licensed MIT. It adds 94 tokens to every session and 2,794 once invoked, about $0.0004 per session on Opus 5.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-09-05.

Related

Other agents, from other repositories

plastic-node-work

Dispatched for a work node by Plastic's node-graph runner. Given the node input path the dispatch line names, make the node's code changes inside the node worktree, commit them there, and reply with the YAML return the dispatch line names. Never spawned outside a runner dispatch.

zalom/plastic · 65 tokens

pr-ghostwriter

Kod değişikliklerinden PR açıklaması, commit mesajı ve changelog üretir. Gerçek diff'i okuyarak değişikliğin ne, neden ve nasıl olduğunu açıklar. Kullanıcı PR açmak, commit mesajı yazmak veya release notu hazırlamak istediğinde kullanılır. Jenerik açıklama üretmez — her zaman gerçek değişikliğe özgü yazar.

komunite/kalfa · 81 tokens

commit

Runs the auto-commit skill.

mystilleef/spae-framework · 8 tokens

git-specialist

Git workflow specialist. Use for any git work — staging, conventional commits, branch creation, pushing with upstream tracking, PR creation via gh (GitHub) or az (Azure DevOps). Auto-detects host from origin. Enforces strict commit and branch naming.

fmflurry/settings-opencode · 62 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens