merge-main

merge-main is a skill for Claude Code, Codex from griddynamics/rosetta. It costs 12 tokens per session (2,069 once invoked), scanned A, original, Apache-2.0.

A workflow for bringing the remote main branch into the current branch and resolving conflicts carefully. A merge combines changes from two branches, while a conflict means both branches changed the same part incompatibly.

In plain words
What is it for?
Use it to merge main, inspect and resolve conflicts, check autogenerated plugin files, and record reusable lessons when the process reveals a preventable problem.
Why use it?
It helps keep the branch current while preserving the intent of both sets of changes and requiring human input when the correct resolution is uncertain.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/griddynamics/rosetta/merge-main
Any agent
npx skills add griddynamics/rosetta --skill merge-main
Clone the repo
git clone --depth 1 https://github.com/griddynamics/rosetta

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/griddynamics/rosetta/merge-main.svg)](https://agentmods.dev/skills/griddynamics/rosetta/merge-main)
Your own site
<a href="https://agentmods.dev/skills/griddynamics/rosetta/merge-main"><img src="https://agentmods.dev/badge/skills/griddynamics/rosetta/merge-main.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,069 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00012 $0.02069
Opus 5 $0.00006 $0.01035
Sonnet 5 $0.00002 $0.00414
Haiku 4.5 $0.00001 $0.00207

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

Security

Grade A, and why

merge-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.

.claude/skills/merge-main/SKILL.md · 42 lines

How it starts

The opening of the file, as written. The whole thing — 42 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a thoughtful and meticulous senior software engineer.

Sync+merge remote origin main into this branch.

On conflicts: understand what both parts did. Use 3 way merge logic. Not just selecting A vs B. Not extremes. Not mechanical.

Automatically resolve if you are 100% sure, otherwise MUST USE HITL.

Workspace root:

  • plugins are autogenerated => let user know to regenerate.
  • docs/web is the web site content, which 99% follows original files.
  • instructions is the actual instructions, use by plugin generator, which are sent to AI coding agents working on separate their own repositories.
  • src contains MCPs, additional packages, and tools.

If you learned something new which is reusable, there are process efficiency improvements, you can prevent faiures in the future, update ## Lessons learned below for self-improvement.

Lessons learned (self-improvement, keep updating, first line is template, keep template, follow "", high confidence only):

  • <key action item, less then 7 words> <concise/terse: what happened, why, root cause, reasoning, less then 25 words>.
  • Regeneration is per-profile — the default pass leaves sibling profile trees stale. After resolving generated-file conflicts, running rosettify-plugins once cleaned the 7 standard trees but left all 6 core-*-light trees carrying pre-merge content, including frontmatter keys the merge had deleted. No conflict, no test failure — scripts/pre_commit.py runs the generator twice (standard, then --profile lightweight) and only both passes together make plugins/ consistent. Verify with diff -rq plugins/<t> plugins/<t>-light: anything differing beyond the profile-scoped files and the manifest name/description is stale.
  • Check whether a doc reference survives the plugin boundary. Plugin output is only agents/ configure/ hooks/ rules/ skills/ workflows/ — nothing under docs/. A shipped instructions/ file that points at docs/… dangles for consumer repos, so "concise pointer vs inline contract" is a real HITL decision, not a style preference.
  • Hunt semantic conflicts after the textual merge; git flags none of them. Three appeared here: main documented paths this branch had deleted, main asserted "no plugin directory yet" for a target this branch added, and main deleted instructions/ rule files whose generated copies survived in a branch-only plugin. Grep the merged tree for paths/claims each side touched, and always run both src/rosettify-plugins and src/hooks suites — a regression test caught the stale path a doc review missed.
  • When both sides fixed the same stale string, compose the line — don't pick a side. Main and the branch independently corrected "Rosetta 2.0" in the Codex manifest; git conflicted only on that line while cleanly taking main's version bump and the branch's new defaultPrompt. The resolution is per-field, and the one word neither side can decide (3 vs 3.0) is the HITL question — not the whole file.
  • A generated plugins/** conflict is a shadow of its preserved source. plugins/<t>/…/plugin.json is byte-copied from src/rosettify-plugins/plugins/<t>/…, so both conflict identically. Resolve them the same way, then tell the user to regenerate rather than hand-tuning the generated copy.
  • Version drift survives a clean merge silently. Main bumped every plugin manifest and marketplace to a new patch while the branch had bumped only src/rosettify-plugins/package.json to a new minor. No conflict, no test failure — the two just disagree afterwards. Compare package.json against the manifests post-merge and surface it.
  • Re-verify main's new content against the branch's generation changes. Main added a workflow plus 8 phase files; this branch had changed how workflows become skills. Nothing conflicted and every test passed, because no fixture covers content that did not exist when the tests were written. Generate and inspect the new artifact.
  • Diff each side against the merge-base before merging; the overlap set is tiny. comm -12 on git diff --name-only <base> origin/main vs … <base> HEAD reduced 717+331 changed files to 15 real overlaps, which made the one genuine judgment call obvious immediately.
  • Verify any incoming "generated / auto-built" claim against the build config; never trust the doc. Main imported docs/reviews/DOC-STRUCTURE-PLAN.md asserting llms-full.txt is "generated by the build pipeline (no manual facts)". It is hand-maintained: .github/workflows/pages.yml only cps it to docs/web/, no generator references it, and its history is all feature commits. A false generated-claim is high-damage — it invites treating hand-written content as disposable and skipping updates. Grep *.ts/js/json/sh/yml for the filename and check git log -- <file> before believing it.
  • Zero textual overlap does not mean zero semantic conflict, and a dirty tree may be irrelevant. This merge had 0 overlapping files yet still imported a wrong maintenance claim about a file the branch edited. Separately, check git diff --name-only <base> origin/main | grep ^plugins/ first: if the incoming side touches no plugin files, locally modified plugins/ neither blocks the merge nor needs discussion — the user regenerates it regardless.
  • Identical independent edits auto-resolve — don't assume a same-file overlap needs HITL. All 6 overlapping files here were plugin copies of one workflow, and both sides had made the byte-identical check_statecheck_mode rename (each regenerating plugins to catch up with an instructions source that already had check_mode at the merge-base). git merge --ort merged them with zero conflict markers. Diff each overlapping file on both sides before assuming a HITL question exists — same-diff overlaps are free.
  • The repo has multiple independent version tracks — never compare raw numbers across them. scripts/bump_versions.sh is the ground truth: it bumps plugin.json+marketplace.json together as one group (kept equal to each other), and separately, opt-in, bumps src/rosettify/package.json, src/rosettify-plugins/package.json, src/rosettify-prompts/package.json, src/curiocity/package.json, and each pyproject.toml — with no expectation any of those match each other or the plugin/marketplace group. rosettify-plugins/package.json at 3.2.0 next to plugin.json at 3.1.8 is not drift, it's two unrelated counters — a genuine "did the user mean to conflate these" moment, corrected after the user pushed back with "solution has individual components with individual versions, you must think." The real post-merge check is per-track: diff each file in the list above at base vs main vs branch vs merged — a track is a problem only if main and branch both bumped the same file to different values, or one side bumped a track's file and the merge silently reverted it.
  • A clean textual merge can disable a feature when one side adds a closed allow-list and the other adds a new member of the validated set. Main added throw-on-unknown-filename-directive; this branch added the profile-<name>-only token kind. The two hunks sit in different parts of directives.ts, so git merged both with zero conflict markers — and the build would have hard-failed on all 11 profile-scoped source files. The suites that build from the real instruction tree are what expose this; a unit test on the parser alone would not. After any merge that touches validation, run the generator end-to-end against the real tree and check the exit code, not just the tests.
  • When both sides independently create the same canonical constant, keep the shape that can DERIVE the other. Main added spec/target-names.ts (role-keyed object), this branch had put the same seven literals in types.ts (array + type + guard). Object.values recovers the list from the roles, but no expression recovers a role from a name string — so the role-keyed object is the literal home and the list/type/guard hang off it. Picking the other direction leaves the literals duplicated and free to drift.
  • "Did the incoming side specify its new behavior?" is a merge check. Main shipped a build-aborting validation while touching only docs/hooks-verify.md under docs/ — no requirement unit at all, and the branch's shape-exemption was equally unspecified. git diff --name-only <base> origin/main | grep ^docs/requirements/ in one line tells you whether incoming behavior arrived with its spec.
  • Reword a corrected claim across every doc surface, and watch the letter case. "the closing fence yields an empty, inert token" lived in 8 places: two FR-ARCH statements AND their two criteria, FR-PROF notes AND an AC, GLOSSARY, and ASSUMPTIONS twice. A criterion can be half-right — these already said the token set is {overwrite} yet still appended the inert clause — so grep the claim, don't reason about where it "should" be. One instance began "The" rather than "the" and silently survived a case-sensitive replace.

Read the full file on GitHub · 42 lines

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 · 42 lines · 12 tokens per session scan A 8a4411aa25c0

Subscribe to this mod's changes

merge-main is a skill published in the GitHub repository griddynamics/rosetta (342 stars, last pushed today), licensed Apache-2.0. It adds 12 tokens to every session and 2,069 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.