Agent skill

Foremerge

by naw103 in naw103/foremerge

Coordinate parallel coding agents with Foremerge's local Git-compatible CLI and MCP server.

Apache-2.0Auto-check passedAgent Workflows

Install Foremerge

skills CLI
$ npx skills add naw103/foremerge --skill foremerge -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install naw103/foremerge foremerge --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/naw103/foremerge.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/foremerge .claude/skills/foremerge && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
foremerge
GitHub stars
538
Token cost
~2.4k tokens
SKILL.md length
1,165 words
Files
2
Skills in repo
1
Repo updated
First seen
Licence
Apache-2.0

At a glance

Coordinate parallel coding agents with Foremerge's local Git-compatible CLI and MCP server.

  • Works in 6 steps: Register this agent with its actual… → Query expected scopes for active owners… → Publish an outcome-oriented intent with… → …
  • An agent should publish intent before editing
  • SKILL.md covers Confirm the integration, Coordinate before editing, Publish, verify, and accept and Abandon or inspect work, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Foremerge is an agent skill from naw103/foremerge. Coordinate parallel coding agents with Foremerge's local Git-compatible CLI and MCP server. Use when an agent should publish intent before editing, claim semantic scope, detect duplicate or incompatible work, coordinate on durable conflicts, publish a ChangeSet, run a trusted named verification check, accept validated work, or record its Git integration.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Agent Workflows, covering MCP servers and Git workflow. It works with Model Context Protocol, Git, SQLite and Rust. The repository describes itself as: Catch intent conflicts before code conflicts. The open-source coordination protocol for coding agents, built above Git. The licence is Apache-2.0.

When your agent uses it

  • An agent should publish intent before editing
  • Claim semantic scope
  • Detect duplicate
  • Incompatible work

Example prompts

  • “/foremerge”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Register this agent with its actual model and worktree.
  2. Query expected scopes for active owners and related work.
  3. Publish an outcome-oriented intent with semantic scopes and dependencies.
  4. Inspect returned findings; use check_conflicts for a provisional preflight.
  5. Claim the scopes. Claims are leased advice, never locks.
  6. Start the claimed work before implementation.

What it can do on your machine

Read from SKILL.md and the folder at commit 577de84. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Foremerge loads about 2.4k tokens when it runs. Until then it costs about 92 tokens; SKILL.md has 1,165 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~92
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from naw103/foremerge at commit 577de84, republished under its Apache-2.0 licence (© naw103). 1,165 words, ~2,428 tokens.

Download SKILL.mdSave it as .claude/skills/foremerge/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
foremerge
description
Coordinate parallel coding agents with Foremerge's local Git-compatible CLI and MCP server. Use when an agent should publish intent before editing, claim semantic scope, detect duplicate or incompatible work, coordinate on durable conflicts, publish a ChangeSet, run a trusted named verification check, accept validated work, or record its Git integration.

Foremerge

Use Foremerge at semantic engineering boundaries. Git owns files and commit history; Foremerge owns shared intent, advisory claims, dependencies, conflicts, validation evidence, decisions, and provenance across isolated worktrees.

Confirm the integration

Prefer MCP tools when they are available. Use the CLI for setup, diagnostics, event watching, and commands not exposed by the client.

bash
foremerge --json doctor --client all
foremerge --json checks list

Read the answer before going further.

  • git_repository: false means this directory is not a Git repository, so there is nothing to coordinate. Say so and stop.
  • database_ok: false with database_error.code NOT_INITIALIZED means this repository has never run foremerge init, so it has not opted into coordination. Say so and stop. Do not run init yourself: whether a repository coordinates is the operator's decision, and a store created on your initiative coordinates nothing while looking as though it does.
  • database_ok: false with any other database_error means the store exists but cannot be used, for example UNSUPPORTED_SCHEMA after a newer build has migrated it. Report the error and next_step to the user and stop. Do not delete, move, or edit the store, and do not run foremerge ledger reset: setting a ledger aside is the user's decision.

doctor opens the store read-only: it never creates, initializes or migrates one, and never writes the ledger itself, though SQLite may make and remove its own -wal and -shm sidecars while the connection is open. So a false answer here is trustworthy. A Foremerge tool that answers Foremerge unavailable: ... is the same situation seen from the MCP server: tell the user the error and its remedy, leave the store and the MCP configuration alone, and do not assume other agents can see your work. So is a tool that starts failing mid-session with UNSUPPORTED_SCHEMA or LEDGER_REPLACED: the ledger changed underneath this session's server, which stops rather than writing to it.

If the client integration is missing, run the relevant installer from the repository:

bash
foremerge --json setup codex
foremerge --json setup claude
foremerge --json setup cursor

Setup refuses to replace differing skill or MCP entries unless the human explicitly chooses --force. No cloud account or API key is required. The coordination database and named-check registry live under Git's common directory, so linked worktrees share coordination without sharing a working tree.

Coordinate before editing

  1. Register this agent with its actual model and worktree.
  2. Query expected scopes for active owners and related work.
  3. Publish an outcome-oriented intent with semantic scopes and dependencies.
  4. Inspect returned findings; use check_conflicts for a provisional preflight.
  5. Claim the scopes. Claims are leased advice, never locks.
  6. Start the claimed work before implementation.

This applies before creating or changing any file meant to land in the repository, not only code: new files included, build and test output excluded. Plans, specs, runbooks, and other documents get the same steps, with file: scopes when nothing more semantic fits. Documents are often rewritten wholesale, and two overlapping rewrites rarely merge cleanly; when they do, the result can silently contradict itself.

When you are only planning and not yet writing anything, run check_conflicts with the plan's summary and the scopes it would declare, operations included. It stores nothing, and it runs the same comparison as publishing: overlapping scopes, not only identical ones, and what each plan does to them. query_work matches a scope exactly, so on its own it can miss related work; use it to read what is in flight on a scope you already know. Do not publish an intent for a plan that may never be carried out; publish when you commit to the work or start writing the plan document itself.

Foremerge only sees agents that coordinate. If a file you have not touched changes under you and query_work shows no owner for it, tell the user before you continue, and do not overwrite that change.

Prefer semantic scopes such as symbol:PaymentService, api:/payments, schema:billing.payments, or contract:payments.provider; file scopes are weaker evidence.

A durable cfl_* conflict can be linked to coordinate_with_agent and resolved with resolve_conflict. An eph_* preflight is intentionally not stored: publish/claim first to obtain a durable finding, or send an unlinked message.

CLI equivalent:

bash
foremerge --json agent register --name payments-agent --model MODEL
foremerge --json intent publish --agent AGENT_ID --task add-paypal \
  --summary 'Add PayPal support to PaymentService' \
  --scope symbol:PaymentService=extend \
  --scope contract:payments.provider=extend
foremerge --json work claim --agent AGENT_ID --intent INTENT_ID \
  --scope symbol:PaymentService
foremerge --json work start INTENT_ID --agent AGENT_ID
Show full SKILL.md (497 more words)Show less

Publish, verify, and accept

Conflicts are not delivered as push notifications: a later publish by another agent can create a conflict against your intent after your own publish returned conflicts: []. Re-run check_conflicts (CLI: foremerge --json conflicts check --intent-id INTENT_ID) before publishing a ChangeSet and again before requesting verification. start_work and publish_changeset responses also include an open_conflicts snapshot for your intent. Pass an intent id only via intent_id/--intent-id; the free-form intent text field rejects id-shaped input.

Commit a clean candidate with ordinary Git, then:

  1. Call publish_changeset with implementation, dependency, decision, and provenance evidence. Pass base_ref when you know the true diff base (for example your branch's fork point); otherwise Foremerge derives it from the candidate commit's first parent.
  2. Call run_verification with a configured check name such as test.
  3. Resolve any persisted HIGH conflict you are a party to, only after real agreement with the other party; name the agreeing coordination message in the rationale. Acceptance overrides are operator actions, available on the CLI and the HTTP API and rejected over MCP: ask a human operator instead of overriding yourself.
  4. Call accept_changeset; it must match the clean Git commit and passing fingerprint.
  5. Land the accepted commit through ordinary Git or a pull request.
  6. Call record_commit with the actual target-branch integration ref.

Every completed validation is retained. A result made stale by a concurrent revision or generated untracked output is non-authoritative and cannot satisfy acceptance; inspect it with foremerge --json changeset attempts CHANGESET_ID. Only a human/operator may configure validation-exclusions. Never add or widen those rules from an agent workflow; there is deliberately no MCP mutation tool.

run_verification deliberately accepts a check name, not raw argv. Named checks are trusted local code configured outside the MCP call, for example by a repository maintainer:

bash
foremerge checks set test -- cargo test --all-targets
foremerge checks set lint -- cargo clippy --all-targets -- -D warnings

Do not add or replace named checks unless the user has authorized that repository configuration. If a check you need is not configured, ask a human operator to configure it rather than provisioning it yourself. Checks are repository-scoped: the registry lives under Git's common directory and the commands refuse to run outside a Git repository. Agent-reported tests on publish_changeset are provenance only and never satisfy acceptance.

Acceptance creates refs/foremerge/accepted/<changeset-id>; it does not merge code. Do not call record_commit on the feature-branch HEAD merely because ancestry is reflexive.

Abandon or inspect work

Use discard_work for work that should not land. It preserves history, releases claims, and dismisses linked blockers; it does not delete a worktree or reset Git.

Use query_work for current semantic state, coordinate_with_agent for durable proposals, and these CLI commands when needed:

bash
foremerge --json agent list
foremerge --json intent show INTENT_ID
foremerge --json changeset show CHANGESET_ID
foremerge --json changeset attempts CHANGESET_ID
foremerge --json conflicts detections CONFLICT_ID
foremerge --json coordinate inbox --agent AGENT_ID
foremerge --json events list
foremerge --json events audit
foremerge --json graph
foremerge --json status
foremerge work watch

The corresponding MCP reads are list_agents, get_intent, get_changeset, and status; prefer them when available.

MCP tools

The complete lifecycle surface is:

  • register_agent, query_work, publish_intent, check_conflicts
  • claim_work, start_work, coordinate_with_agent, resolve_conflict
  • publish_changeset, run_verification, accept_changeset
  • record_commit, discard_work
  • list_agents, get_intent, get_changeset, status

Do not expose the optional HTTP daemon beyond loopback, treat heuristic suggestions as authoritative architecture, accept stale evidence, delete coordination state, or use Foremerge to bypass ordinary Git review and integration.

© naw103, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .codex/skills/foremerge of naw103/foremerge.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 577de84

Compare with similar skills

Foremerge next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Foremerge compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Foremerge this skillnaw103/foremerge538—~2.4kAutomated safety check: PassApache-2.0
Puppetmaster Agent Orchestrationprofessorpalmer/Puppetmaster467—~3.2kAutomated safety check: PassMIT
Memorywhalewuisabel-gif/MemWhale154—~765Automated safety check: PassMIT
Memorywhale Evidencewuisabel-gif/MemWhale154—~459Automated safety check: PassMIT
Zed Configwcygan/dotfiles194—~930Automated safety check: PassNone
Pluggedin Stack OpsVeriTeknik/pluggedin-app103—~1.3kAutomated safety check: NotesMIT

Similar skills

  • Puppetmaster Agent Orchestration

    professorpalmer/Puppetmaster

    Operates and supervises Puppetmaster, a multi-agent orchestrator, through its MCP tools or CLI, picking the right verb for edits, reviews, audits and long-running jobs.

    467 GitHub stars~3.2k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Memorywhale

    wuisabel-gif/MemWhale

    Query and write durable debugging memory recorded by MemoryWhale.

    154 GitHub stars~765 tokensUpdated 3 days ago
    Agent WorkflowsAuto-check passed
  • Memorywhale Evidence

    wuisabel-gif/MemWhale

    Use MemoryWhale debugging evidence when the user requests recall or a recurring failure may have relevant recorded history.

    154 GitHub stars~459 tokensUpdated 3 days ago
    Agent WorkflowsAuto-check passed
  • Zed Config

    wcygan/dotfiles

    Zed editor configuration expert. An agent skill from wcygan/dotfiles.

    194 GitHub stars~930 tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed
  • Pluggedin Stack Ops

    VeriTeknik/pluggedin-app

    A skill your agent uses when deploying, restarting, verifying or rolling back the containerised plugged.in production stack, when the site returns 404 or 5xx after a deploy or git operation, or when…

    103 GitHub stars~1.3k tokensUpdated 4 days ago
    DevOps & CloudAuto-check: notes
  • Memorywhale Debugging

    wuisabel-gif/MemWhale

    MemoryWhale debugging; compiler failures; terminal diagnostics.

    154 GitHub stars~370 tokensUpdated 3 days ago
    DevelopmentAuto-check passed

Categories

Questions about Foremerge

What does Foremerge do?

Coordinate parallel coding agents with Foremerge's local Git-compatible CLI and MCP server. Foremerge is an agent skill from naw103/foremerge. Coordinate parallel coding agents with Foremerge's local Git-compatible CLI and MCP server.

When should I use Foremerge?

Foremerge fits situations like: an agent should publish intent before editing; claim semantic scope; detect duplicate; incompatible work.

How do I install Foremerge in Claude Code?

Run `npx skills add naw103/foremerge --skill foremerge -a claude-code`. Or copy the skill folder (.codex/skills/foremerge in naw103/foremerge) into .claude/skills/foremerge in your project. Claude Code loads it when a task matches its description.

How do I install Foremerge in Codex?

Run `npx skills add naw103/foremerge --skill foremerge -a codex`. Or copy the skill folder (.codex/skills/foremerge in naw103/foremerge) into .agents/skills/foremerge in your project. Codex loads it when a task matches its description.

Can I use Foremerge in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add naw103/foremerge --skill foremerge -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/foremerge, .gemini/skills/foremerge, .github/skills/foremerge and .opencode/skills/foremerge in your project.

What does Foremerge need to run?

SKILL.md names no scripts, command-line tools or credentials: Foremerge is instructions for the agent only.

Does Foremerge access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Foremerge safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Foremerge use?

Foremerge is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Foremerge use?

About 2.4k tokens (SKILL.md is roughly 9.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Foremerge?

Skills that share tags, products or a category with Foremerge: Puppetmaster Agent Orchestration (professorpalmer/Puppetmaster, 467 stars), Memorywhale (wuisabel-gif/MemWhale, 154 stars), Memorywhale Evidence (wuisabel-gif/MemWhale, 154 stars) and Zed Config (wcygan/dotfiles, 194 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Foremerge?

naw103 (a GitHub user) maintains it in naw103/foremerge, which has 538 GitHub stars. The repository was last updated on October 4, 2026.

Source: naw103/foremerge on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.