In short.
ApexYard approve-merge is a Claude Code skill for repository maintainers who want explicit human approval before merging a pull request, but its safeguards depend on ApexYard components outside this folder. Its scripts inspect pull request state and review markers, default to squash merges and select merge commits for recognised sync branches. It also supports approval without merging and optional worktree removal. The supplied test source contains static checks and stubbed cases; no execution results establish live hook enforcement or end-to-end reliability.
Researched and written by an AI model and checked by a second AI model. How it works
Covers the four supplied files in .claude/skills/approve-merge at commit fa6911078bb3c91af457290cd2c7e8bd91843746: SKILL.md, remove-worktree.sh, scripts/approve-merge.sh and tests/test_merge_invocation_not_substituted.sh, together with the repository-root MIT LICENSE. External hook libraries, configuration, tracker implementation, referenced documentation and the rest of ApexYard are outside this scope. No code was executed. Installation, authentication, live hook matching, CI enforcement, merges, board updates and worktree removal remain unverified.
The overview
Identity
The resource is the approve-merge skill in me2resh/apexyard, comprising SKILL.md, a prerequisite-checking script, a worktree-removal helper and a regression-test script. It is an instruction package for Claude Code rather than a standalone merge application. Its metadata disables model invocation, and its instructions reserve invocation for an explicit human approval of a particular pull request.
Original source folder: [https://github.com/me2resh/apexyard/tree/main/.claude/skills/approve-merge]. The files discussed are pinned to commit fa6911078bb3c91af457290cd2c7e8bd91843746.
Assessment
The strongest fit is an existing ApexYard environment where maintainers already use its configuration, Rex review markers and tracker adapter. The skill brings those pieces together around a deliberate approval step and makes merge strategy visible in the final confirmation.
Copying this folder alone does not establish a working approval system. Important enforcement code is external, and no live merge or hook results are supplied. Its practical reliability therefore remains unverified.
Users
Repository maintainers and developers using Claude Code with ApexYard are the intended users. The workflow suits teams that distinguish approval of a general plan from permission to merge a specific pull request, meaning a proposed code change.
Beginners would need help with repository configuration, authentication, review markers and shell dependencies. Experienced developers can inspect the explicit failure paths and strategy rules, but support for other assistant clients or unrelated repository setups is not established.
Capabilities
The documented workflow resolves a pull request and repository, checks prerequisites, records human approval for its head commit and invokes the configured merge adapter. The --no-merge flag records approval without merging. An optional confirmation menu delegates approval recording to a hook.
The checker selects squash by default and merge for recognised sync branch or title patterns. Although the merge block accepts rebase as a valid strategy, the supplied checker does not select it. Release classification triggers checks intended to preserve the pull request title and body.
After a successful merge, the instructions support an optional project-board move and a separately approved worktree removal. The removal helper checks protected locations and branch identity and invokes git worktree remove without --force.
Using it
Requirements
The scripts use Bash, Git, the GitHub CLI and jq, together with an authenticated account able to read the relevant pull request. Merging also requires suitable host permissions and a configured tracker adapter. Despite that adapter abstraction, the prerequisite script queries pull requests directly through gh; support for other hosts is unknown.
Required ApexYard components include configuration, behind-base checking, review-marker and tracker libraries outside this folder. Optional cleanup and board features need further libraries. The cleanup helper requires Git 2.36 or later for its worktree-listing format. Minimum versions for the other tools and Claude Code are not specified.
Mechanism
The prerequisite script requires an open, non-draft pull request that is not reported as conflicting. By default it checks whether the branch is behind its base. A behind branch can be allowed when an external helper reports that base changes overlap neither pull request files nor configured shared paths; configuration can also disable this check.
It resolves a review marker keyed to the pull request's base repository and requires its commit hash to match the current head, or an external helper to approve carry-over. The slash-command workflow then records a structured human-approval marker containing the commit hash, timestamp and approval summary.
Before merging, the instructions repeat prerequisite checking and invoke tracker_pr_merge as a bare shell statement with literal repository and pull request arguments. This command shape is intended to make the external merge gate recognise the invocation. Actual recognition by Claude Code's live permission matcher is unverified.
Setup
Adoption requires an ApexYard checkout or operations fork with the referenced hooks, configuration and tracker integration available. The skill locates that operations root through a validated session pin or by walking upward for ApexYard anchor files.
Before using it, confirm repository resolution, GitHub authentication, review-marker paths, merge configuration and hook registration. Several referenced writing, rationale and worktree-offer documents are outside this folder. The supplied files do not provide a complete standalone installation procedure.
Example
For a hypothetical, explicitly approved pull request 42 in a configured checkout, /approve-merge 42 is documented to check prerequisites, record approval for its current commit and attempt the merge. A normal branch receives squash strategy; a recognised sync branch receives merge strategy.
With the same explicit approval, /approve-merge 42 --no-merge records approval and stops before merging. This is a documented example, not an observed execution result.
Assessment & evidence
Limitations
The supplied checker fetches mergeStateStatus but does not use it and does not inspect CI results. Whether required checks and human approval are independently enforced depends on external gates whose implementations are not supplied. The instruction to obtain explicit approval is not itself proof of technical enforcement.
Sync and release classification relies on branch and title patterns. Custom naming can therefore receive the default classification. Commit changes between approval and merging also require correct external gate behavior.
The worktree helper verifies location and branch identity but explicitly does not verify that the branch was merged. It relies on its caller for that fact. Its protections and the live merge gate have no supplied execution results.
Design rationale
The design separates permission to pursue a plan from permission to merge a particular change. Recording the exact commit hash helps identify what the human approved, while repository-qualified marker paths address pull requests involving forks.
Using merge commits for recognised sync pull requests is intended to preserve ancestry. Keeping the adapter invocation visible in shell command text addresses the documented hook-matching uncertainty. These explain the implementation choices; they do not establish that the safeguards work in a live environment.
Alternatives
The documented alternative within the skill is --no-merge, which separates approval recording from execution so merging can happen later or be handled by someone else. When no tracker CLI is configured, the instructions describe recording approval and asking the operator to merge manually on the host.
No comparative evidence establishes advantages over other approval or merge tools. Teams considering a different approach would need to compare their existing host approval controls with the additional ApexYard marker and hook dependencies.
Evidence
SKILL.md describes intended behavior; scripts/approve-merge.sh exposes prerequisite and strategy logic; remove-worktree.sh exposes cleanup protections. The test file contains checks for shell invocation shape, release metadata placement, sync patterns and stubbed cases involving missing or invalid fields and repository mismatches.
The test file explicitly distinguishes source-shape checks from proof that Claude Code's real permission matcher fires. No test output, benchmark or live pull request result is supplied. The pinned skill source is [https://raw.githubusercontent.com/me2resh/apexyard/fa6911078bb3c91af457290cd2c7e8bd91843746/.claude/skills/approve-merge/SKILL.md].
Access & freshness
Costs
The MIT notice grants permission to use the software free of charge, subject to its conditions. The evidence supplies no pricing for Claude Code, model usage, hosting or associated services. Total operating cost and setup effort are unknown, and no measured time savings are provided.
Rights
The repository LICENSE identifies the MIT License and copyright 2026 ApexYard contributors. It permits use, copying, modification, distribution, sublicensing and sale, provided the copyright and permission notice accompany copies or substantial portions. It supplies the software without warranty.
The supplied notice supports redistribution of these files with that notice. Separate terms for external services and dependencies are not established here. License source: [https://raw.githubusercontent.com/me2resh/apexyard/fa6911078bb3c91af457290cd2c7e8bd91843746/LICENSE].
Freshness
The supplied snapshot was captured on 16 November 2026 at 11:42:34.049 UTC and identifies commit fa6911078bb3c91af457290cd2c7e8bd91843746. The moving main-branch URL may contain different files later.
No product release version or compatibility matrix is established. The skill_version=2 field describes the approval-marker format and should not be treated as a software release number. Compatibility with current client and host behavior remains unverified.
Adoption actions
Before adoption, inspect the referenced gate hooks, tracker adapter and configuration alongside this folder. Confirm how they enforce CI, explicit human approval and approval invalidation when the pull request head changes. Check that branch naming matches the intended sync and release rules.
In a disposable repository, verify that missing or stale approval blocks merging and that the real Claude Code hook recognises the documented adapter invocation. Check fork resolution and release metadata preservation. Before enabling cleanup, verify its refusal cases and inspect the ignored files shown in the removal prompt. These behaviors remain unverified.
