dev-self-merge

A self-check procedure for a developer whose pull request has passed its required checks. It reads the current checks from GitHub and produces either a merge-ready result or an escalation.

In plain words
What is it for?
Use it to verify the required checks for a green pull request, confirm that regression checks pass, and decide whether to mark the task complete or ask a technical lead for help.
Why use it?
It prevents agents from relying on an outdated status feed or manually putting their own pull request into the merge queue. A passing result lets the server-side workflow handle queueing.

Skill for Claude CodeCodex

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 skills/loopdive/js2/dev-self-merge
Any agent
npx skills add loopdive/js2 --skill dev-self-merge
Clone the repo
git clone --depth 1 https://github.com/loopdive/js2

Made for: Claude Code, Codex.

Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,186 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.00054 $0.06186
Opus 5 $0.00027 $0.03093
Sonnet 5 $0.00011 $0.01237
Haiku 4.5 $0.00005 $0.00619

Measured yesterday against content hash 615dc4911f29, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

dev-self-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 yesterday.

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.

.claude/skills/dev-self-merge/SKILL.md · 433 lines

How it starts

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

/dev-self-merge <N>

Devs DO NOT enqueue. On a passing self-check, mark the task completed and stand down — the server-side auto-enqueue.yml workflow enqueues (#2786). This skill's outcomes are MERGE (regression self-check passes → mark the task completed and stand down; you do NOT touch the merge queue) or ESCALATE (to tech lead). The PR is enqueued by the server-side workflow, not by you.

Why devs no longer enqueue (#2786). The old model had the dev one-shot enqueue when green, with a background CI watcher to do it after stand-down. But that watcher is a child of the dev process — it died with the agent, so a green PR whose dev had stood down stranded un-enqueued (#2225, #2247). The fix moves enqueue to the one actor that is long-lived and outside agent lifecycle: the GitHub Actions workflow. Its workflow_run-on-completion trigger fires right after the required-check workflows finish, and its grace window is now 0 (#2786), so it enqueues every just-green PR within ~one workflow-startup — no dependence on any agent surviving. The required checks are cheap gate (main-ancestor + lint), merge shard reports, and quality.

The merge queue then re-validates on the merged state. merge_group re-runs the required checks (the regression-gate #1943 — the hard block), and auto-park (#2547) labels any PR that fails the merge_group re-run hold. The workflow's single trailing-add enqueue never loops, so it cannot cause the re-enqueue "cancellation churn" (memory project_merge_queue_requeue_cancels_run) that poll-loop re-adds caused on 2026-06-20.

Backstops, not the mechanism: the workflow's ~30-min cron, and the tech lead's per-loop open-PR sweep (CLAUDE.md "Tech lead discipline") — both catch the rare stray the responsive workflow_run run misses (e.g. a PR the queue dropped on main-advance). Neither is the primary path.

SECURITY — the workflow's author-trust gate is now load-bearing. With no dev enqueue, the workflow is the single enqueuer; it only enqueues PRs whose authorAssociation is OWNER/MEMBER/COLLABORATOR. External contributor PRs are never auto-enqueued — they require a deliberate maintainer enqueue plus a green cla-check.

Read the full file on GitHub · 433 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. yesterday First seen · 433 lines · 54 tokens per session scan A 615dc4911f29

Subscribe to this mod's changes

dev-self-merge is a skill published in the GitHub repository loopdive/js2 (59 stars, last pushed yesterday), licensed Apache-2.0. It adds 54 tokens to every session and 6,186 once invoked, about $0.0003 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-30.