Agent Skills › diegosouzapw/OmniRoute › merge-batch

merge-batch

GitHub

用于批量准备和合并PR,包含权限校验、冲突诊断、依赖验证及静态检查。确保合并过程符合安全规范与贡献者署名要求。

config/quality/skill-templates/merge-batch/SKILL.md diegosouzapw/OmniRoute

Trigger Scenarios

需要批量合并多个PR 执行PR合并前的合规性检查 处理代码合并冲突

Install

npx skills add diegosouzapw/OmniRoute --skill merge-batch -g -y
More Options

Non-standard path

npx skills add https://github.com/diegosouzapw/OmniRoute/tree/release/v3.8.52/config/quality/skill-templates/merge-batch -g -y

Use without installing

npx skills use diegosouzapw/OmniRoute@merge-batch

指定 Agent (Claude Code)

npx skills add diegosouzapw/OmniRoute --skill merge-batch -a claude-code -g -y

安装 repo 全部 skill

npx skills add diegosouzapw/OmniRoute --all -g -y

预览 repo 内 skill

npx skills add diegosouzapw/OmniRoute --list

SKILL.md

Frontmatter
{
    "name": "merge-batch",
    "description": "Prepare and merge an owner-selected PR batch with contributor credit and exact-candidate admission. Use for a pasted PR list; combined focused validation is diagnostic, and every actual landing still requires its applicable checks and authorization.",
    "allowed-tools": "Bash, Read, Edit, Write, Grep, Glob, AskUserQuestion"
}

Merge batch: shared preparation, exact admission

Read ../_shared/base-green.md, ../_shared/validation-gate.md and ../_shared/merge-gates.md. Their current-candidate, authority, protected-surface and credit rules govern this workflow. Historical throughput, administrative merge and blanket rebaseline exceptions are superseded by that protocol.

Batching shares discovery and conflict diagnosis. It does not make a combined board's PASS evidence valid for different intermediate squash candidates.

1. Intake and authority

Resolve each selected PR's open/draft state, current head/base, target, contributor and write authority. Read the diff and current freeze state, and check active worktree ownership. Hold any item another session is working. A request to analyze or prepare a list is not authority to merge or close it.

Run scripts/quality/check-skill-contract.mjs against the actual installed skills root before admission. Missing or drifted modeled instructions mean HOLD; a template-only check does not verify the installation being used.

Show a 1–5 star table with rationale, overlaps and holds. Stars prioritize work; they do not waive required checks or protected-surface approval. Ask the owner before acting on low-star items or dispatching rework not already authorized. For a subsumed item, prove the current behavior and obtain the separate per-item closure decision; preserve the original PR when its work is being used.

Completion: selected scope, target, ownership and permitted actions are explicit.

2. Build the diagnostic board

Pin the approved live base and record the ordered PR heads. Use one owned branch and worktree under .claude/worktrees/, with active hooks and dependencies matching the candidate lockfile. Verify dependency identity instead of assuming a copy from the shared checkout is current. Do not install over shared hard links.

Board the selected refs and verify each is an ancestor of the combined head. Resolve overlaps without dropping sibling behavior or contributor attribution. Keep unrelated worktrees and the shared checkout untouched; never use git stash. Parallel preparation needs authorized delegation and disjoint write ownership.

Completion: the board has a recorded base, ordered heads, final SHA/tree and a scoped diff that contains every intended change and reconciliation.

3. Diagnose and repair

Run the applicable static profile and focused tests with their actual collectors. Keep stdout/stderr, exits, signals, versions and identities. These are PARTIAL evidence, not merge acceptance. Full workflow evidence can be supplied by the approved server queue; it need not be redundantly simulated for every local probe.

Compare a failed requirement on the exact pinned base under comparable runtime and installation before attributing it. Record resource/setup interruptions separately. Controlled repetitions may diagnose instability; a later PASS does not erase an earlier required FAIL. Preserve assertions, thresholds and baselines.

Apply every required conflict, i18n, documentation and code reconciliation to the candidate before its acceptance. Do not deliberately land a red tip and promise a follow-up after distributing the batch.

Completion: proven defects have scoped RED/GREEN evidence, and remaining failures or incomplete lanes have explicit dispositions without green-by-bypass.

4. Admit each actual landing

Use the shared merge gates for every selected PR/group. Resolve its current base, head, tested candidate and policy again. Require all applicable required lanes, including Gate / CI, Gate / Quality and requirements outside those aggregates. Draft skips, MERGEABLE, a green board, an old head and inherited failures are not acceptance. A changed identity returns the item to validation.

Use an approved server-enforced queue or reviewed identity-preserving protocol for each actual landing. gh pr merge --match-head-commit guards the head only; it does not atomically guard the base or replace missing required checks. If the tool cannot preserve the tested candidate or exclude a race, HOLD.

Merge only the owner-authorized item after protected-surface approval where applicable. Keep contributor fixes in their authorized branch; a locked fork needs the shared credit-preserving fallback, not a direct protected-branch push. Administrative bypass, trust approval and release/deploy authority are separate exceptional decisions, never inferred from a batch request or star rating.

Completion: the actual landed identity has current required evidence and the specific authority for that mutation, or the item remains prepared/HOLD.

5. Readback and handoff

Verify merged state, actual SHA/tree and contributor credit. Refresh and validate the resulting base before admitting the next landing. Report prepared, integrated and currently validated separately; a partially landed batch is not a full PASS.

Retain an ordered ledger of PRs, base/head/candidate/landing identities, checks, receipts, contributor attribution and holds in the owned private task artifacts. Close only separately authorized items and use the shared credit rules. Preserve evidence before safe teardown of worktrees created for this batch; never remove another session's work or leave the shared checkout on a different branch.

Version History

  • d804179 Current 2026-10-19 14:19

Same Skill Collection

config/quality/skill-templates/green-prs/SKILL.md
config/quality/skill-templates/merge-prs/SKILL.md
config/quality/skill-templates/quality-scan/SKILL.md
config/quality/skill-templates/sweep-reds/SKILL.md
config/quality/skill-templates/validate-release-green/SKILL.md
skills/cli-a2a/SKILL.md
skills/cli-backup-sync/SKILL.md
skills/cli-batches/SKILL.md
skills/cli-chat/SKILL.md
skills/cli-compression/SKILL.md
skills/cli-contexts/SKILL.md
skills/cli-cost-usage/SKILL.md
skills/cli-eval/SKILL.md
skills/cli-health/SKILL.md
skills/cli-keys/SKILL.md
skills/cli-mcp/SKILL.md
skills/cli-models/SKILL.md
skills/cli-plugins-skills/SKILL.md
skills/cli-policy-audit/SKILL.md
skills/cli-providers/SKILL.md
skills/cli-resilience/SKILL.md
skills/cli-routing/SKILL.md
skills/cli-serve/SKILL.md
skills/cli-setup/SKILL.md
skills/cli-skill-collector/SKILL.md
skills/cli-tunnel/SKILL.md
skills/config-codex-cli/SKILL.md
skills/omni-agents-a2a/SKILL.md
skills/omni-api-keys/SKILL.md
skills/omni-auth/SKILL.md
skills/omni-budget/SKILL.md
skills/omni-cache/SKILL.md
skills/omni-cli-tools/SKILL.md
skills/omni-combos-routing/SKILL.md
skills/omni-compression/SKILL.md
skills/omni-context-rtk/SKILL.md
skills/omni-db-backups/SKILL.md
skills/omni-github-skills/SKILL.md
skills/omni-inference/SKILL.md
skills/omni-mcp/SKILL.md
skills/omni-models/SKILL.md
skills/omni-providers/SKILL.md
skills/omni-proxies/SKILL.md
skills/omni-resilience/SKILL.md
skills/omni-settings/SKILL.md
skills/omni-sync-cloud/SKILL.md
skills/omni-tunnels/SKILL.md
skills/omni-usage-logs/SKILL.md
skills/omni-version-manager/SKILL.md

Metadata

Files
0
Version
d804179
Hash
ceb23e33
Indexed
2026-10-19 14:19

홈 - 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-25 10:27
浙ICP备14020137号-1