sync-main

sync-main is a command for Claude Code from luanpdd/kit-mcp. It costs 23 tokens per session (429 once invoked), scanned A, original, MIT.

A Git command that brings new commits from the shared main branch into your current feature branch. It asks how to handle conflicts when both branches changed the same files.

In plain words
What is it for?
Use it to fetch and merge origin/main into a feature branch and resolve conflicts by choosing the main or local version.
Why use it?
It keeps your branch aligned with recent team changes while protecting the main branch from accidental changes.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to fetch and merge origin/main into a feature branch and resolve conflicts by choosing the main or local version.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/luanpdd/kit-mcp/sync-main
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.

Clone the repo
git clone --depth 1 https://github.com/luanpdd/kit-mcp

Made for: Claude Code.

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-main

README.md
[![agentmods](https://agentmods.dev/badge/commands/luanpdd/kit-mcp/sync-main.svg)](https://agentmods.dev/commands/luanpdd/kit-mcp/sync-main)
Your own site
<a href="https://agentmods.dev/commands/luanpdd/kit-mcp/sync-main"><img src="https://agentmods.dev/badge/commands/luanpdd/kit-mcp/sync-main.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 429 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.00429
Opus 5 $0.00012 $0.00215
Sonnet 5 $0.00005 $0.00086
Haiku 4.5 $0.00002 $0.00043

Measured 4d ago against content hash 6a62ec23e0d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

sync-main 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 4d 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.

kit/commands/sync-main.md · 69 lines

What it actually says

<safety_rules> NUNCA execute git push para main ou origin/main. NUNCA mude para a branch main (git checkout main / git switch main). Este comando só traz código da main para a branch local — nunca o contrário. </safety_rules>

1 — Proteção: bloquear se estiver na main

git branch --show-current

Se a branch atual for main, encerre com:

"⛔ Você está na branch main. Mude para uma branch de feature antes de continuar."

2 — Buscar atualizações e verificar se há algo novo

git fetch origin
git log --oneline origin/main ^HEAD

Se não houver nenhum commit novo em origin/main, informe:

"Sua branch já está atualizada com a main." E encerre.

3 — Aplicar os commits da main na branch local

git merge origin/main

Se não houver conflitos:

Mostre um resumo com:

  • Quantos commits foram integrados
  • Lista dos arquivos modificados (git diff --name-only HEAD~1 HEAD ou similar)

Encerre.

Se houver conflitos:

Liste os arquivos conflitantes e pergunte:

"Encontrei conflitos nos arquivos abaixo. Qual é a prioridade? [1] main — usa o código da main nos conflitos [2] local — mantém o seu código nos conflitos"

Aguarde a resposta.

Se [1] main: Para cada arquivo conflitante: git checkout --theirs <arquivo> Depois: git add . && git commit

Se [2] local: Para cada arquivo conflitante: git checkout --ours <arquivo> Depois: git add . && git commit

Mostre o resumo final: branch atual, status limpo, commits integrados.

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. 4d ago First seen · 69 lines · 23 tokens per session scan A 6a62ec23e0d4

Subscribe to this mod's changes

sync-main is a command published in the GitHub repository luanpdd/kit-mcp (1 stars, last pushed yesterday), licensed MIT. It adds 23 tokens to every session and 429 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-09-03.