{"id":"7424c6d5-ebd9-4b90-b78c-e4df861b8713","shortId":"aM5Vmf","kind":"skill","title":"merge","tagline":"Use when the user asks to merge another branch into the current branch, pull upstream changes without rebasing, or resolve merge conflicts.","description":"input = $ARGUMENTS\n\nMerge a target branch into the current feature branch.\n\nUse `git merge origin/{target}` (remote-tracking ref, not local branch).\n\n## Conflict Resolution\n\n- **Lockfiles, migrations, config, version bumps** — accept the target version (latest agreed state), then regenerate lockfiles.\n- **Refactored-away code** — target's removal wins; rewire to the new location/API.\n- **Additive conflicts** (both sides add independent code) — keep both, then run the project's formatter/parser. Conflict boundaries leave orphan closing tags, duplicate brackets, and stray blocks that grep misses but a parser catches.\n\n**Partial survival:** when a resolution keeps *usage* of a symbol, verify the *declaration* and *import* also survived. Grep the resolved file for every feature-side symbol before continuing.\n\n## Migration Reconciliation\n\nMerge produces a merge commit but does NOT execute the target's new migrations against the local database. The DB version marker still holds the old revision — the app crashes at runtime on missing schema objects.\n\n**Re-chain:** update the feature migration's parent revision to point to the target's chain tip. Update declared head tracking if the project tracks migration head outside alembic (check project CLAUDE.md/TOOLS.md).\n\n**Re-ID if non-monotonic.** Re-pointing `down_revision` alone is not sufficient. If the feature's own revision ID is now ≤ any upstream ID in the new chain, the chain violates monotonic-timestamp rules and silently breaks any DB already stamped at that ID — alembic reports head, skips the inserted middle, app crashes on missing columns. Fix: generate a fresh `date +%Y%m%d%H%M%S`, update `revision: str = …` inside the file, rename the file to match, update project head tracking.\n\n**Verify chain:** run `alembic history` and confirm revision IDs are non-decreasing along the chain.\n\n**Apply to local DB:**\n- DB at target's tip → only the feature migration needs applying.\n- DB at feature's old pre-merge revision → stamp to the fork point (stamp moves the pointer without executing destructive down-migrations), then upgrade.\n- DB stamped at the feature revision but upstream migrations between fork and feature were inserted later → re-running the feature crashes. Stamp back to the fork point, `upgrade <last-upstream-rev>` (not `head`), then `stamp <feature-rev>`.\n\n## Merge Commit Message\n\nPre-commit hooks often reject the default `Merge branch 'X' into Y`. Use conventional commit format and pass it explicitly:\n\n```\ngit merge origin/{target} -m \"chore: merge {target} into {current-branch}\"\n```\n\nSame format for follow-up `git commit` after staging conflict resolutions. Notable decisions go in the commit body.\n\n## Execution\n\nAnnounce the merge plan before starting — divergence (commits ahead/behind), target branch. Invoking `/merge` is intent to push; no confirmation needed after the plan. Run `/qg` before pushing.\n\n**Report:** commits integrated, conflicts resolved, migration reconciliation, gate results.","tags":["merge","dotclaude","jhostalek","agent-skills","ai-coding","anthropic","claude","claude-code","claude-code-skills","code-review","codex-cli","cursor"],"capabilities":["skill","source-jhostalek","skill-merge","topic-agent-skills","topic-ai-coding","topic-anthropic","topic-claude","topic-claude-code","topic-claude-code-skills","topic-code-review","topic-codex-cli","topic-cursor","topic-developer-tools","topic-git-workflow","topic-multi-agent"],"categories":["dotclaude"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/JHostalek/dotclaude/merge","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add JHostalek/dotclaude","source_repo":"https://github.com/JHostalek/dotclaude","install_from":"skills.sh"}},"qualityScore":"0.454","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 8 github stars · SKILL.md body (3,001 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:13:16.328Z","embedding":null,"createdAt":"2026-05-18T13:20:33.291Z","updatedAt":"2026-05-18T19:13:16.328Z","lastSeenAt":"2026-05-18T19:13:16.328Z","tsv":"'/merge':457 '/qg':469 '/tools.md).':211 'accept':54 'add':81 'addit':77 'agre':59 'ahead/behind':453 'alemb':206,261,302 'alon':224 'along':312 'alreadi':256 'also':125 'announc':445 'anoth':9 'app':169,268 'appli':315,329 'argument':25 'ask':6 'away':66 'back':379 'block':102 'bodi':443 'boundari':93 'bracket':99 'branch':10,14,29,34,46,401,424,455 'break':253 'bump':53 'catch':109 'chain':179,193,243,245,300,314 'chang':17 'check':207 'chore':418 'claude.md':210 'claude.md/tools.md).':209 'close':96 'code':67,83 'column':272 'commit':145,390,394,407,432,442,452,473 'config':51 'confirm':305,463 'conflict':23,47,78,92,435,475 'continu':138 'convent':406 'crash':170,269,377 'current':13,32,423 'current-branch':422 'd':280 'databas':158 'date':277 'db':160,255,318,319,330,356 'decis':438 'declar':122,196 'decreas':311 'default':399 'destruct':350 'diverg':451 'down-migr':351 'duplic':98 'everi':132 'execut':149,349,444 'explicit':412 'featur':33,134,182,230,326,332,360,368,376 'feature-sid':133 'file':130,289,292 'fix':273 'follow':429 'follow-up':428 'fork':342,366,382 'format':408,426 'formatter/parser':91 'fresh':276 'gate':479 'generat':274 'git':36,413,431 'go':439 'grep':104,127 'h':281 'head':197,204,263,297,386 'histori':303 'hold':164 'hook':395 'id':214,234,239,260,307 'import':124 'independ':82 'input':24 'insert':266,370 'insid':287 'integr':474 'intent':459 'invok':456 'keep':84,115 'later':371 'latest':58 'leav':94 'local':45,157,317 'location/api':76 'lockfil':49,63 'm':279,282,417 'marker':162 'match':294 'merg':1,8,22,26,37,141,144,337,389,400,414,419,447 'messag':391 'middl':267 'migrat':50,139,154,183,203,327,353,364,477 'miss':105,174,271 'monoton':218,248 'monotonic-timestamp':247 'move':345 'need':328,464 'new':75,153,242 'non':217,310 'non-decreas':309 'non-monoton':216 'notabl':437 'object':176 'often':396 'old':166,334 'origin':38,415 'orphan':95 'outsid':205 'parent':185 'parser':108 'partial':110 'pass':410 'plan':448,467 'point':188,221,343,383 'pointer':347 'pre':336,393 'pre-commit':392 'pre-merg':335 'produc':142 'project':89,201,208,296 'pull':15 'push':461,471 're':178,213,220,373 're-chain':177 're-id':212 're-point':219 're-run':372 'rebas':19 'reconcili':140,478 'ref':43 'refactor':65 'refactored-away':64 'regener':62 'reject':397 'remot':41 'remote-track':40 'remov':70 'renam':290 'report':262,472 'resolut':48,114,436 'resolv':21,129,476 'result':480 'revis':167,186,223,233,285,306,338,361 'rewir':72 'rule':250 'run':87,301,374,468 'runtim':172 'schema':175 'side':80,135 'silent':252 'skill' 'skill-merge' 'skip':264 'source-jhostalek' 'stage':434 'stamp':257,339,344,357,378,388 'start':450 'state':60 'still':163 'str':286 'stray':101 'suffici':227 'surviv':111,126 'symbol':119,136 'tag':97 'target':28,39,56,68,151,191,321,416,420,454 'timestamp':249 'tip':194,323 'topic-agent-skills' 'topic-ai-coding' 'topic-anthropic' 'topic-claude' 'topic-claude-code' 'topic-claude-code-skills' 'topic-code-review' 'topic-codex-cli' 'topic-cursor' 'topic-developer-tools' 'topic-git-workflow' 'topic-multi-agent' 'track':42,198,202,298 'updat':180,195,284,295 'upgrad':355,384 'upstream':16,238,363 'usag':116 'use':2,35,405 'user':5 'verifi':120,299 'version':52,57,161 'violat':246 'win':71 'without':18,348 'x':402 'y':278,404","prices":[{"id":"a1dcea87-3284-4cde-85f2-84c2d1b0b303","listingId":"7424c6d5-ebd9-4b90-b78c-e4df861b8713","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"JHostalek","category":"dotclaude","install_from":"skills.sh"},"createdAt":"2026-05-18T13:20:33.291Z"}],"sources":[{"listingId":"7424c6d5-ebd9-4b90-b78c-e4df861b8713","source":"github","sourceId":"JHostalek/dotclaude/merge","sourceUrl":"https://github.com/JHostalek/dotclaude/tree/main/skills/merge","isPrimary":false,"firstSeenAt":"2026-05-18T13:20:33.291Z","lastSeenAt":"2026-05-18T19:13:16.328Z"}],"details":{"listingId":"7424c6d5-ebd9-4b90-b78c-e4df861b8713","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"JHostalek","slug":"merge","github":{"repo":"JHostalek/dotclaude","stars":8,"topics":["agent-skills","ai-coding","anthropic","claude","claude-code","claude-code-skills","code-review","codex-cli","cursor","developer-tools","git-workflow","multi-agent","prompt-engineering","skill-md"],"license":"cc0-1.0","html_url":"https://github.com/JHostalek/dotclaude","pushed_at":"2026-05-17T15:07:41Z","description":"Agent skills for agentic coding tools. Extremely opinionated. Updated (almost) daily.","skill_md_sha":"38d6fa5d47951ae5f97d71499fe232f0eb2455e5","skill_md_path":"skills/merge/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/JHostalek/dotclaude/tree/main/skills/merge"},"layout":"multi","source":"github","category":"dotclaude","frontmatter":{"name":"merge","description":"Use when the user asks to merge another branch into the current branch, pull upstream changes without rebasing, or resolve merge conflicts."},"skills_sh_url":"https://skills.sh/JHostalek/dotclaude/merge"},"updatedAt":"2026-05-18T19:13:16.328Z"}}