neo: Command for Claude Code

.claude/commands/sync-branch.md

sync-branch is a command for Claude Code from Parslee-ai/neo. It costs 23 tokens per session (502 once invoked), scanned A, original, Apache-2.0.

A command that updates the current Git branch with changes from its base branch, then pushes the result. A base branch is the branch a change is intended to merge into.

In plain words
What is it for?
Fetching recent changes, merging the base branch, resolving conflicts with code context, aborting unclear merges, and reporting the sync result as JSON.
Why use it?
It keeps a branch current before review and provides a defined process for resolving merge conflicts.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

This is Parslee-ai/neo's own configuration. It tells Claude Code how to work on neo itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything neo configures →

Part of the neo plugin — 9 skills, 18 commands, 1 agent, 1 hook shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to Parslee-ai/neo. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Parslee-ai/neo/main/.claude/commands/sync-branch.md
Clone the repo
git clone --depth 1 https://github.com/Parslee-ai/neo

Made for: Claude Code.

Or install neo, the plugin that ships this one along with the rest of its 9 skills, 18 commands, 1 agent, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sync-branch

README.md
[![agentmods](https://agentmods.dev/badge/commands/parslee-ai/neo/sync-branch.svg)](https://agentmods.dev/commands/parslee-ai/neo/sync-branch)
Your own site
<a href="https://agentmods.dev/commands/parslee-ai/neo/sync-branch"><img src="https://agentmods.dev/badge/commands/parslee-ai/neo/sync-branch.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 502 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00023 $0.00502
Opus 5 $0.00012 $0.00251
Sonnet 5 $0.00005 $0.00100
Haiku 4.5 $0.00002 $0.00050

Measured 7d ago against content hash 0cb18da057f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

sync-branch 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 7d ago.

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/commands/sync-branch.md · 73 lines

What it actually says

Sync Branch with Base

Sync the current branch with the base branch before PR review. You (Claude) will intelligently resolve any merge conflicts.

Workflow

Step 1: Fetch Latest Changes

Fetch the latest changes from origin:

git fetch origin

Step 2: Merge Base Branch

Attempt to merge the base branch:

git merge origin/$BASE_BRANCH --no-edit

Step 3: Handle Conflicts (Claude's Responsibility)

If there are conflicts, YOU (Claude) must resolve them intelligently:

  1. Check git status to see conflicted files
  2. For each conflicted file, review the conflict markers
  3. Use your understanding of the code to resolve conflicts intelligently
  4. Stage resolved files with git add
  5. Complete merge with git commit --no-edit

If conflicts cannot be resolved (e.g., too complex, unclear intent):

git merge --abort

Then return synced: false with a clear explanation.

Step 4: Push Changes

If the merge was successful (with or without conflicts):

git push origin HEAD

Final Output (STRICT JSON)

{
  "synced": true|false,
  "had_conflicts": true|false,
  "summary": "Brief summary of sync result"
}

Examples:

  • Success without conflicts: {"synced": true, "had_conflicts": false, "summary": "Branch synced with main, no conflicts"}
  • Success with resolved conflicts: {"synced": true, "had_conflicts": true, "summary": "Branch synced with main, resolved conflicts in 2 files"}
  • Aborted due to conflicts: {"synced": false, "had_conflicts": true, "summary": "Aborted merge with main: conflicts in config.json require manual resolution"}
  • Failure: {"synced": false, "had_conflicts": false, "summary": "Failed to fetch from origin"}
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. 7d ago First seen · 73 lines · 23 tokens per session scan A 0cb18da057f1

Subscribe to this mod's changes

sync-branch is a command published in the GitHub repository Parslee-ai/neo (16 stars, last pushed yesterday), licensed Apache-2.0. It adds 23 tokens to every session and 502 once invoked, about $0.0001 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.