Skip to main content
Agent skill

Test And Merge

Dev self-merge pipeline — merge main into branch, equiv tests, CI wait, self-merge via /dev-self-merge. Run by devs, not a separate tester agent.

Get started

Get the complete skill folder, including its scripts and reference files.

When to use this skill

Use Test And Merge when an AI agent needs a reusable SKILL.md workflow for this job: Dev self-merge pipeline — merge main into branch, equiv tests, CI wait, self-merge via /dev-self-merge. Run by devs, not a separate tester agent.

When not to use it

Skip Test And Merge when the task is outside the coding category, or when a more specific skill in this directory already covers the same workflow with clearer triggers.

How to install

Where will you use it?

Install scope
Claude Code folder setup
mkdir -p ~/.claude/skills/test-and-merge
# Save SKILL.md to ~/.claude/skills/test-and-merge/SKILL.md
  1. Claude Code personal install: place the skill and its bundled files at ~/.claude/skills/test-and-merge/SKILL.md. For a shared project, commit the folder at .claude/skills/test-and-merge/ instead.
  2. Current Claude Code detects SKILL.md changes in watched directories during the session. If you just created a top-level skills directory, run /reload-skills. Check that the skill is listed before testing its trigger.
  3. For Claude chat or Cowork in the Desktop app, manage uploaded skills in Customize > Skills; copying files into a local Claude Code folder is not a Desktop install. Other agents may use different install locations.

Full install guide for Claude, Cursor, and Codex →

Try a starter prompt

After installing the skill, paste this starter prompt into your agent to verify it triggers on a small task.

Starter prompt
Use the Test And Merge skill for this task: Use Test And Merge when this documented workflow matches the task. Confirm any required inputs or files before making changes.

What supports this recommendation?

69/100 provisional content score. This measures documentation, practical detail and source signals. It is not a measured task success rate or a security certification.

Documentation
75/100
Practical detail
68/100
Source evidence
58/100
Source signals
72/100
Model compatibility evidence
  • claudeinferred

    The skill text mentions Claude or a closely associated term. This is keyword-derived compatibility; no hands-on model test is recorded.

  • chatgptuntested

    No model-specific signal or recorded compatibility test was found.

  • geminiuntested

    No model-specific signal or recorded compatibility test was found.

  • copilotuntested

    No model-specific signal or recorded compatibility test was found.

  • llamauntested

    No model-specific signal or recorded compatibility test was found.

  • perplexityuntested

    No model-specific signal or recorded compatibility test was found.

  • mistraluntested

    No model-specific signal or recorded compatibility test was found.

  • grokuntested

    No model-specific signal or recorded compatibility test was found.

Inferred compatibility is based on content signals. Check the app, its available tools and setup requirements before running a skill.

What this skill does

# Test and Merge Pipeline

**Devs run this themselves after implementing a fix.** There is no separate tester agent — CI handles test262, and devs self-merge when CI passes.

## Step 1: Merge main into branch

```bash cd /workspace/.claude/worktrees/<branch> git fetch origin && git merge origin/main ```

- **Clean merge**: proceed - **Conflicts in `dashboard/`, `plan/`, `public/`**: `git checkout --theirs <file>`, then `pnpm run build:planning-artifacts` - **Conflicts in `src/**/*.ts`**: create `[CONFLICT]` task in TaskList for senior-developer. STOP.

## Step 2: Run equivalence tests

```bash npm test -- tests/equivalence.test.ts ```

All equivalence tests must pass. Any new failure = regression, fix before pushing.

## Step 3: Push and open PR

```bash git push origin <branch> gh pr create --base main --title "fix(#N): <description>" --body "..." ```

## Step 4: Wait for CI

Use a foreground blocking loop — keeps the agent occupied until CI result lands:

```bash until [ -f /workspace/.claude/ci-status/pr-<N>.json ] && \ [ "$(jq -r '.head_sha' /workspace/.claude/ci-status/pr-<N>.json)" = "$(git rev-parse HEAD)" ]; \ do sleep 60; done ```

## Step 5: Self-merge via /dev-self-merge

Run `/dev-self-merge <N>` — outputs MERGE or ESCALATE.

- **MERGE**: `gh pr merge <N> --merge --admin` - **ESCALATE**: message tech lead with criterion, values, PR number

## Step 6: Post-merge cleanup

1. `git worktree remove /workspace/.claude/worktrees/<branch>` 2. `TaskUpdate(status: completed)` 3. `TaskList` → claim next task, or shut down if queue is empty

Intended uses

  • Use Test And Merge when this documented workflow matches the task.

Implementation notes

  • Review the source instructions and adapt inputs before running the workflow.

Try it, then tell us how it went

A copied prompt does not tell us whether the task worked. Report your result after checking the output. We collect your tool and outcome, never your files or prompt.