git.resolve-version-conflicts

작성자: coinbase

CDS 릴리스 버전 관리 파일, 즉 package.json의 "version" 필드와 CHANGELOG.md 항목에서 패키지로 인해 발생하는 rebase/merge 충돌을 해결합니다…

npx skills add https://github.com/coinbase/cds --skill git.resolve-version-conflicts

Resolve CDS version-file conflicts

CDS ships many packages that are kept version-locked by yarn release. When both master and the current branch bump package versions independently, a rebase (or merge) collides on two file types only:

  • packages/<pkg>/package.json — the "version" field
  • packages/<pkg>/CHANGELOG.md — the top-of-file version entries

This skill resolves only those two file types mechanically. Anything else that conflicts must be raised to the user.


When to run

Trigger this flow when EITHER:

  1. The user explicitly asks to resolve a versioning / package.json / CHANGELOG conflict, or
  2. You organically notice conflict markers (<<<<<<<, =======, >>>>>>>) inside package.json or CHANGELOG.md files during a rebase/merge.

In case 2 you MUST ask the user for confirmation before performing any resolution. Describe what you found (which packages, which files) and ask whether to run this resolution flow. Do not resolve organically-detected conflicts without an explicit go-ahead.


The rules (source of truth)

  1. Master's version is the latest. For each package, the version currently on origin/master (equivalently, the HEAD/"ours" side of a rebase) is the newest published version.
  2. Reapply the branch's bump on top of master. Determine the type of bump the branch made (patch / minor / major) from the branch's version commit, then apply that same bump to master's latest version. That is the resolved version.
    • patch: x.y.Zx.y.(Z+1)
    • minor: x.Y.zx.(Y+1).0
    • major: X.y.z(X+1).0.0
  3. CHANGELOG: put the branch's entry at the top, above master's entries, using today's date and the resolved version, matching the exact format the file already uses. Keep all of master's existing entries intact below it.
  4. Only package.json and CHANGELOG.md conflicts are in scope. If any other file is conflicted, STOP and raise it to the user before continuing.
  5. Run the formatter when finished.
  6. Never change existing commit messages while continuing the rebase.

Step 0 — Confirm scope

git status

List the conflicted (both modified / unmerged) paths. Partition them:

  • In-scope: packages/*/package.json, packages/*/CHANGELOG.md
  • Out-of-scope: everything else

If any out-of-scope file is conflicted, stop and raise it to the user now. Do not touch those files. Only proceed once the user decides how to handle them.

If you got here organically (not via an explicit user request), also confirm with the user that they want you to run this resolution flow before editing anything.

Note: package.json files often auto-merge cleanly even when the CHANGELOG for the same package conflicts — you must still recompute their versions in the steps below, so include every affected package, not just the ones with visible conflict markers.


Step 1 — Identify the branch's version commit and bump type

The conflict is anchored on a specific commit (during a rebase, git names it in git status as the commit it "could not apply", e.g. 571c39254 (version)).

Inspect exactly what versions that commit changed and by how much:

git show <version-commit> -- '**/package.json'

For each package, read the - "version": "A.B.C"+ "version": "A.B.D" hunk and classify the bump as patch / minor / major (rule 2).


Step 2 — Read master's latest version per package

For every affected package:

git show origin/master:packages/<pkg>/package.json | grep '"version"'

(During a rebase the working-tree/HEAD value equals master's, since master's side was checked out — either source is fine.)

Compute the resolved version = master's latest version + the branch's bump type.

Example from a real run: master was 9.6.9 for all packages; the branch's bump was patch (9.6.8 → 9.6.9); resolved version = 9.6.10 for all of them.


Step 3 — Update each package.json

Set the "version" field of every affected package to its resolved version.

Check whether packages pin each other's versions:

grep -nE '"@coinbase/cds-(common|web|mobile|mcp-server|icons)"' packages/<pkg>/package.json

If internal deps use workspace:^ (the CDS convention), only the top-level "version" field needs changing. If any dep pins an explicit version of a package you just bumped, update that pin to match.


Step 4 — Resolve each CHANGELOG.md

For each conflicted CHANGELOG, produce this order (newest first):

  1. Branch entry — heading uses the resolved version and today's date, followed by the branch's change body.
  2. Master's entries — kept verbatim below, in descending version order.

Match the file's existing heading format exactly. CDS uses two shapes:

  • Real change: ## <version> (M/D/YYYY PST) followed by a #### 🐞 Fixes (or 🚀 Updates, 📘 Misc, …) section and bullet(s).
  • Artificial bump: ## <version> ((M/D/YYYY, HH:MM AM/PM PST)) followed by This is an artificial version bump with no new change.

Rules of thumb:

  • If the branch's contribution to this package is a real change, carry that change's body into the new top entry (real-change format).
  • If the branch only bumped this package to stay in sync (its conflict body reads "artificial version bump with no new change"), keep it an artificial-bump entry; reuse the timestamp from the branch's original entry, with today's date.
  • Do not merge the branch's bullet into master's entry — they are separate version entries. Master's entry keeps its own bullets; the branch's bullet lives under the new resolved-version heading above it.

Remove every <<<<<<<, =======, >>>>>>> marker.


Step 5 — Verify no markers remain

grep -rn '^<<<<<<<\|^=======\|^>>>>>>>' packages/*/CHANGELOG.md packages/*/package.json

Expect no output.


Step 6 — Continue the rebase (or commit the merge)

Stage the resolved files and continue without editing commit messages:

git add packages/*/package.json packages/*/CHANGELOG.md
GIT_EDITOR=true git rebase --continue

GIT_EDITOR=true accepts each existing message unchanged. If more conflicts surface on later commits, repeat Steps 0–6; if a later conflict is out-of-scope, stop and raise it.

(For a merge instead of a rebase, git commit --no-edit after git add.)


Step 7 — Format

yarn nx format:write

Step 8 — Report back

Summarize:

  • Which commit caused the conflict and which files were in scope.
  • The resolved version per package and the bump type applied on top of master.
  • The CHANGELOG placement (branch entry on top, master's kept below).
  • That commit messages were unchanged.
  • That the branch history was rewritten (rebase), so a force push (git push --force-with-lease) will be needed — do NOT push unless asked.

coinbase의 다른 스킬

git.repo-manager
coinbase
git.repo-manager — AI 에이전트를 위한 설치 가능한 스킬로, coinbase/cds에서 게시했습니다.
official
agentic-wallet
coinbase
awal CLI를 통한 암호화폐 지갑 작업 — 로그인, 잔액 확인, USDC/ETH/POL/SOL 전송, 토큰 거래, 지갑 충전, x402 결제 프로토콜 사용 등
official
authenticate-wallet
coinbase
이메일 OTP 기반 지갑 인증으로 검증 및 상태 확인을 제공합니다. 2단계 로그인 절차: 이메일로 6자리 OTP를 받기 위해 시작한 후, flowId와 코드로 인증을 완료합니다. 명령어 실행 전 셸 인젝션을 방지하기 위해 이메일, flowId, OTP에 대한 입력 검증 규칙이 포함되어 있습니다. 동반 CLI 명령어를 통해 상태 확인, 잔액 조회, 주소 검색 및 지갑 창 접근을 제공합니다. 모든 명령어는 기계 판독 가능한 출력을 위해 --json을 지원합니다...
official
fund
coinbase
Coinbase Onramp 또는 직접 전송을 통해 USDC를 지갑에 입금합니다. 사용자가 사전 설정된 금액($10, $20, $50) 또는 사용자 지정 값을 선택하고 Apple Pay, 직불카드, 은행 송금 또는 Coinbase 계정 자금 조달 중에서 선택할 수 있는 보조 UI를 엽니다. 다양한 결제 수단을 지원하며 정산 시간이 다릅니다: 카드 및 Apple Pay는 즉시, ACH 은행 송금은 1~3일 소요됩니다. Base 네트워크에서 USDC로 자금을 입금하며, 또는 사용자는 npx awal@2.0.3...을 통해 지갑 주소로 직접 USDC를 보낼 수 있습니다.
official
monetize-service
coinbase
x402 프로토콜을 통해 다른 에이전트가 발견하고 결제할 수 있는 유료 API 엔드포인트를 배포합니다. HTTP 402 결제 프로토콜을 사용하여 Base에서 요청당 USDC를 청구하며, 클라이언트는 서명된 트랜잭션으로 결제하고 API 키나 계정이 필요하지 않습니다. 검색 확장을 선언하면 엔드포인트를 x402 Bazaar에 자동으로 등록하여 에이전트가 발견할 수 있도록 합니다. Express 미들웨어를 사용하여 엔드포인트당 여러 가격 계층, 와일드카드 경로 및 여러 결제 옵션을 지원합니다. @x402/express 및 @x402/core 기반으로 구축되었습니다...
official
pay-for-service
coinbase
Base에서 x402 프로토콜을 통해 자동 USDC 결제로 유료 API를 호출합니다. x402 지원 엔드포인트에 HTTP 요청(GET, POST 등)을 실행하며, USDC 결제가 자동으로 처리됩니다. 메서드, JSON 본문, 쿼리 매개변수 및 사용자 정의 헤더를 통해 요청을 사용자 지정할 수 있습니다. 결제 제어 기능이 포함되어 있어 요청당 최대 USDC 금액을 설정하고 상관 ID로 관련 작업을 그룹화할 수 있습니다. 지갑 인증과 충분한 USDC 잔액이 필요하며, 셸을 방지하기 위해 모든 사용자 입력을 검증합니다...
official
query-blockchain-data
coinbase
Base에서 CDP SQL API를 통해 x402로 온체인 블록체인 데이터를 조회합니다. 사용자나 본인이 디코딩된 블록에 대한 온체인 정보를 확인하고자 할 때 사용하세요.
official
query-onchain-data
coinbase
Base에서 SQL을 사용하여 온체인 데이터를 쿼리하고, 쿼리당 x402 결제를 적용합니다. CoinbaseQL을 통해 디코딩된 이벤트, 트랜잭션 및 블록에 접근할 수 있습니다. CoinbaseQL은 조인, CTE, 서브쿼리 및 표준 함수를 지원하는 ClickHouse 기반 SQL 방언입니다. 세 가지 주요 테이블을 사용할 수 있습니다: base.events(디코딩된 스마트 컨트랙트 로그), base.transactions(전체 트랜잭션 데이터), base.blocks(블록 메타데이터). 이벤트 쿼리에서 전체 테이블 스캔을 피하기 위해 인덱싱된 필드(event_signature, address, block_timestamp)에 대한 필터링이 필요합니다.
official