Skip to main content
skill CX Codex

parallel-work-check — Claude Code skill: branch check

parallel-work-check is a Claude Code skill that compares local and remote commits on an existing branch and reviews new changes. It helps catch overlapping work before editing.

MIT ★ 539 updated 2026-10-29

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ZaxbyHub/opencode-swarm --skill parallel-work-check -a claude-code
Open on GitHub

What parallel-work-check does

Run the skill before taking up work on an existing branch, including after a pause or before assigning the first coding task. It fetches the current remote state, compares commit hashes, and reads new commit messages when the remote is ahead. If both sides have unique commits, the changes need to be integrated according to the team’s workflow.

The check looks for new commits that touch planned files. It asks the agent to decide whether parallel work replaces the planned approach or can be incorporated, then record the result using the PARALLEL WORK CHECK template. For commits from another agent, the guidance favors that work unless there is a clear reason to choose a different approach. The comparison depends on fetching the remote branch first.

What it helps with

  • check whether the remote branch has advanced
  • spot new commits affecting planned files
  • identify work from another agent
  • decide whether to integrate changes or drop a planned approach
  • record the branch decision before editing

Example prompts for the agent

  • Compare this branch with its remote counterpart before I edit anything.
  • Check whether another agent changed the files I plan to work on.
  • Write a PARALLEL WORK CHECK and decide whether to integrate the remote commits first.

How to install parallel-work-check

1Skills CLI (Vercel)

npx skills add ZaxbyHub/opencode-swarm --skill parallel-work-check -a claude-code

2Manually: put the files in place

~/.claude/skills/parallel-work-check/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/parallel-work-check/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about parallel-work-check

How do I install parallel-work-check in Claude Code?

Run npx skills add ZaxbyHub/opencode-swarm --skill parallel-work-check -a claude-code. The skill file is at ~/.claude/skills/parallel-work-check/SKILL.md.

What does parallel-work-check do?

It fetches the remote branch state, compares it with the local branch, and reviews new commits for overlap with planned changes before work begins.

What should I do when local and remote branches have diverged?

Integrate their changes using the team’s merge or rebase workflow. If new commits affect planned files, assess whether they supersede the approach or can be combined with it.

Source text

SKILL.md · MIT
---
name: parallel-work-check
description: >
  Apply before starting work on an existing branch. Checks for parallel work by
  other agents or developers that may supersede or conflict with your planned
  changes. Prevents wasted effort on stale branches.
metadata:
  audience: swarm-plugin
  effort: small
  generated_from_knowledge: '[]'
  source_knowledge_ids: '["f07c1f4d-9bb0-4219-9804-26aa8efe8146"]'
  generated_at: "2026-06-14T16:50:00Z"
  confidence: "0.8"
  status: active
  version: "4"
  skill_origin: generated
  provenance_note: >
    Re-linked to current knowledge entries (version 4). The original source ID
    b8fee776... is no longer present in the active knowledge store. The skill
    body and behavior are unchanged; only source_knowledge_ids metadata was
    updated to point to the current lesson about verifying pre-existing state
    on parent commit, which is directly relevant to the parallel-work-check
    protocol.
---

# Parallel Work Check Protocol

Run this check before starting ANY work on an existing branch (not a fresh branch
you just created). This applies to PR branches, feature branches, and any branch
that may have concurrent contributors.

## Step 1 — Check current branch state

1. Determine the current branch name.
2. Determine the remote tracking branch (usually `origin/<branch-name>`).

## Step 2 — Fetch remote state

Fetch the latest state from the remote for the current branch. Do NOT skip this
step because "the branch looks recent" or "I just checked."

## Step 3 — Compare local vs remote

Compare the local HEAD commit hash with the remote HEAD commit hash:

- **Identical**: Remote has not diverged. Proceed with your work.
- **Remote ahead**: The remote branch has commits you don't have locally.
  - Read the new commit messages with `git log local..remote`.
  - Check if any of those commits touch files you plan to modify.
  - If yes: evaluate whether the parallel work supersedes your planned changes.
  - If the parallel work is superior: reset your local branch to match remote
    and abandon your planned approach. Document the decision.
  - If the parallel work is complementary: integrate it first, then proceed.
- **Local ahead**: You have local commits not on remote. This is normal if you
  already started work. Proceed, but be aware that pushing may conflict with
  subsequent remote changes.
- **Diverged**: Both local and remote have unique commits. This requires
  integration. Merge or rebase as appropriate for the team's workflow.

## Step 4 — Check for parallel swarm/agent work

If the remote has new commits:

1. Check the commit authors. If commits are from a different swarm/agent
   (different author name/email pattern), treat this as parallel swarm work.
2. Parallel swarm work is often superior because:
   - It may have access to different context or tools
   - It may have started earlier or had more iterations
   - It may have taken a fundamentally better approach
3. Default stance: **prefer the parallel swarm's work** unless you can clearly
   articulate why your approach is better.

## Step 5 — Decision and documentation

Before proceeding, document your decision:

```
PARALLEL WORK CHECK:
- Branch: <name>
- Local HEAD: <hash> <message>
- Remote HEAD: <hash> <message>
- Diverged: yes/no
- New commits on remote: <count>
- Parallel swarm work detected: yes/no
- Decision: [proceed / integrate-then-proceed / abandon-use-remote / needs-review]
- Rationale: <one sentence>
```

## Anti-patterns — do NOT do these

- Skip the fetch because "I'm sure nothing changed."
- Ignore remote commits because "my approach is probably better."
- Start fixing code without checking if the remote already fixed it.
- Blindly overwrite remote work with local changes without evaluating first.

## Example: parallel swarm superseded local work

```
PARALLEL WORK CHECK:
- Branch: codex/issue-956-plan-completion-gate
- Local HEAD: 5aa34f88 fix(delegation-gate): block next task until completion is persisted
- Remote HEAD: 2b4e9266 fix: correct contradictory test title/comments
- Diverged: yes (remote is 8 commits ahead)
- New commits on remote: 8
- Parallel swarm work detected: yes (different commit author)
- Decision: abandon-use-remote
- Rationale: Parallel swarm restored file from main and re-integrated cleanly,
  producing 486 passing tests vs our incremental patching which left 38 failures.
```

## Integration with swarm workflow

This check should run:
- At session start (MODE: RESUME or MODE: EXECUTE)
- Before creating a new plan for an existing branch
- Before dispatching the first coder task
- After any significant pause where parallel work could have occurred

## Integration with other skills

The parallel-work-check skill is referenced by other skills that start work on an existing branch:

| Skill | Usage |
|-------|-------|
| `file:.swarm/bundled-skills/swarm-pr-feedback/SKILL.md` | Checks before starting PR feedback fixes — ensures no parallel work has already addressed the same findings |
| Legacy pr-review-fix alias | Compatibility entry that delegates to the bundled `swarm-pr-feedback` protocol |
| `file:.swarm/bundled-skills/swarm-implement/SKILL.md` | Checks before implementation Phase 1 — ensures the branch is up-to-date before planning |
| Any skill that starts work on an existing branch | Run the parallel-work-check protocol before beginning fixes or implementation |

When a skill references parallel-work-check, the checking agent must:
1. Fetch and compare remote vs local state
2. Read any new commits from parallel work
3. Evaluate whether the parallel work supersedes, complements, or does not affect the planned work
4. Document the decision using the PARALLEL WORK CHECK template

© ZaxbyHub · MIT · ZaxbyHub/opencode-swarm

Similar skills

All skills for Git and GitHub →

From the same set121

The whole set →
swarm-pr-feedback swarm-pr-feedback — a skill that resolves pull request review comments, CI failures, and branch conflicts through structured verification stages. CX Codex +1 ★ 539repo stars commit-pr commit-pr — a portable skill that verifies your code before push, writes conventional commits, and fills in a PR body. Guards against accidentally committing generated files or secrets. CX Codex +1 ★ 539repo stars test-file-split test-file-split breaks an oversized test file into parts along describe() boundaries when it nears the 500-line cap or blows past it. CX Codex +1 ★ 539repo stars fork-pr-operations fork-pr-operations guides agents through fork pull request workflows: GitHub Actions approval, safe rebasing with force-with-lease, and handling multi-round bot reviews. CX Codex +1 ★ 539repo stars design-docs Writes and syncs a project's design docs: domain, technical spec, behavior spec, plus a traceability registry and changelog. CX Codex +1 ★ 539repo stars orchestrating-subagents orchestrating-subagents is a Claude Code skill for dividing project tasks among subagents, with parallel explorers and independent code review in isolated contexts. CX Codex +1 ★ 539repo stars commit-pr The commit-pr skill guides commits, pull request updates, and CI checks in opencode-swarm. Use it when publishing issue-related code changes or closing out a PR. CX Codex +1 ★ 539repo stars contributing contributing walks an agent through the full pull-request cycle in the opencode-swarm repo: branch naming, commit format, a release-notes fragment, local checks and the PR template. CX Codex +1 ★ 539repo stars

Project sponsors

Companies that keep this analytics open