Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Pull unmerged PlatformPlatform pull requests into a downstream project by cherry-picking each one onto the platformplatform-updates branch. Renames commits to "PlatformPlatform PR N - title" per the existing convention. Drives a ralph-loop that validates each commit (build, test, format, lint, optional e2e) before moving on. Use in downstream projects that have PlatformPlatform configured as the upstream remote.
.claude/skills/platformplatform-pull-platformplatform-changes/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 125% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 133% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 79% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 83% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 47% | 0% |
Discover unported PlatformPlatform pull requests and emit a /ralph-loop:ralph-loop prompt that the user runs themselves to cherry-pick them one at a time. Optionally interviews the user upfront to capture porting decisions for each PR.
This skill assumes the current repo is a downstream project with upstream configured as the PlatformPlatform remote. The CLI command pull-platformplatform-changes will fail if the remote isn't set up — that's the expected guardrail.
Compute the root repo path:
bashROOT_REPO=$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)") CURRENT_BRANCH=$(git branch --show-current)
A run is in progress if $ROOT_REPO/.workspace/platformplatform-updates/commits.md exists AND the current branch is platformplatform-updates.
If resuming:
commits.md and count [x] vs [ ] lines. Identify the next pending commit.learnings.md and surface the last 3 entries.port-plan.md if it exists and surface a brief summary of upcoming PR decisions.If fresh: continue to STEP 2.
bashgit status --porcelain
If there are uncommitted changes, stop and ask the user to stash or commit first.
bashdotnet run --project developer-cli -- pull-platformplatform-changes --list-only
Output is one line per unported PR: <date> <hash> <subject> (#<pr>).
If the output is empty, stop and report nothing to port.
Parse each line into {date, hash, subject, prNumber}. The PR number is in the trailing (#NNN) group. The ported commit subject is PlatformPlatform PR <prNumber> - <subject without (#<prNumber>)>.
Show the list newest-first to the user (date + ported title) and confirm the range.
Use AskUserQuestion to ask whether to create a worktree. Some downstream projects don't support worktrees, so always ask.
If yes:
bashgit worktree add .claude/worktrees/platformplatform-updates main
Then call the EnterWorktree tool to switch context.
If no: the existing CLI flow handles branch creation during cherry-pick. For the ralph-loop, create the branch now off main:
bashgit switch --create platformplatform-updates main
Use AskUserQuestion to ask the run mode:
learnings.md.port-plan.md. The loop reads port-plan.md for guidance on each commit.For each unported PR (oldest first), examine its objective and decide if downstream needs adaptation:
bash gh pr view <prNumber> --repo platformplatform/PlatformPlatform --json title,body,files
port-plan.md (see format below). Keep notes brief and action-oriented — the ralph-loop reads them per-commit.Don't interview the user on every PR — only when the diff suggests a real adaptation question. Routine PRs can flow through without disruption.
$ROOT_REPO/.workspace/platformplatform-updates/commits.md
$ROOT_REPO/.workspace/platformplatform-updates/learnings.md
$ROOT_REPO/.workspace/platformplatform-updates/port-plan.md (interview-upfront only)commits.md format:
markdown<!-- mode: <run-mode> | source: pull-platformplatform-changes | started: <YYYY-MM-DD> --> N PRs to port. [ ] <hash> PlatformPlatform PR <N> - <subject> [ ] <hash> PlatformPlatform PR <N> - <subject> ...
Lines are oldest-first. Subjects are already renamed to the ported convention.
learnings.md starts as just a heading:
markdown# Learnings — PlatformPlatform pull
port-plan.md format (interview-upfront only):
markdown# Port plan — PlatformPlatform pull ## PR <N> — <subject> - decision: port-as-is | adapt | skip - notes: <one to three lines of guidance for the ralph-loop>
Compute iterations:
N = number of [ ] lines in commits.md (PRs marked skip in port-plan.md still count — the loop processes them)
iterations = max(ceil(N * 1.25), N + 10)Send TWO separate messages.
Message 1:
Use /copy to copy the following ralph-loop and run it from your Claude Code terminal.Message 2 — the literal command, nothing else:
/ralph-loop:ralph-loop "<PROMPT>" --max-iterations <N> --completion-promise "WE ARE DONE"Substitute {{worktree-path}}, {{root-repo}}, {{commits-file}}, {{learnings-file}}, {{port-plan-file}} (or omit the port-plan reference if not in interview-upfront mode), {{run-mode}}. Use real newlines.
We are pulling unmerged PlatformPlatform pull requests into the platformplatform-updates branch at {{worktree-path}} by cherry-picking commits one at a time from {{commits-file}}. Run mode: {{run-mode}}. Per-PR plan: {{port-plan-file}} (consult before each commit; absent means no upfront interview was done).
For each iteration:
1. Pick the next commit — the first line in the commits file without [x]. If every line is marked, output WE ARE DONE.
2. Consult the port plan — if {{port-plan-file}} exists, find the matching PR section and follow its decision and notes. If decision is 'skip', mark [x] with a [SKIPPED: <reason>] suffix and move on without cherry-picking.
3. Cherry-pick — `git cherry-pick -m 1 --strategy=recursive -X theirs <hash>`. Resolve any conflicts so the working tree reflects the intended state of the PR. Note whether conflicts were manually resolved — this drives the validation order in step 5. If the cherry-pick produces no changes (already applied downstream), skip the rest and mark [x] with [NO-OP: already applied].
4. Rename the commit — amend the commit message to 'PlatformPlatform PR <N> - <original subject without trailing (#<N>)>'. Strip the trailing PR number suffix; preserve the rest of the body. Strip any `# Conflicts:` block git inserted after a conflicted cherry-pick, and any other `#`-prefixed comment lines — PlatformPlatform's pull-request-conventions CI accepts multi-line messages only for `PlatformPlatform PR ...` and `Co-authored-by:` commits, but conflict-marker noise must never land in the final history.
5. Validate the change — order depends on whether conflicts were resolved in step 3:
**Conflicts resolved (we touched code by hand):**
1. build (must succeed)
2. format (must run before lint, since manual edits often need formatting that would otherwise show up as lint findings)
3. in parallel: backend tests, restart Aspire, e2e tests (smoke for small changes; full suite for large changes; full suite at least every 5 commits)
4. lint
5. if lint or any earlier step changed anything, restart this validation from step 5.1
**No conflicts (clean cherry-pick):**
1. build (must succeed)
2. in parallel: backend tests, format, lint, restart Aspire, e2e tests (same scope rules as above)
3. if lint or any other parallel step changed anything, restart this validation from step 5.1
E2E run with --stop-on-first-failure --quiet to fail fast. If tests fail, do not move on until the full suite is green. If something is missing because a later PR introduces it, pull only the minimum needed lines forward and note it under that future commit in the commits file as an indented line.
6. Fold all fixes into the cherry-picked commit — amend so the commit is self-contained. Re-run the sanitize step from #4 if the amend re-introduces any `# Conflicts:` block or `#`-prefixed lines.
7. Verify the working tree is clean — git status must show zero changes after the amend.
8. Mark the commit done — change [ ] to [x] on its line in {{commits-file}}.
9. Log learnings — append a one-line entry to {{learnings-file}} for any non-trivial adaptation, conflict resolution choice, skipped PR, or NO-OP. Format: '- PR <N> — <one-line note>'. Routine clean ports do not need an entry.
Mode-specific behavior:
- autonomous: do not ask the user anything. Make every judgement call yourself. Note unusual choices in {{learnings-file}}.
- interview-upfront: follow {{port-plan-file}} closely. If you find the plan disagrees with reality (e.g. a 'port-as-is' PR has an unexpected conflict), use AskUserQuestion to clarify rather than guessing.
- interview-on-problem: when you cannot make progress (irreconcilable conflict, ambiguous adaptation, change that no longer applies), use AskUserQuestion to ask. Bake the answer into your next attempt and log it in {{learnings-file}}.
Operating principles:
- Never stop. If a PR cannot be ported as-is, adapt it: collapse it with a neighbor, split it, reorder it, drop changes that don't apply downstream, or skip it with a logged reason. The goal is a downstream that reflects PlatformPlatform's intent, not literal preservation of every commit.
- Smallest possible change when borrowing forward — pull only the lines required to compile or pass tests.
- Trust the loop. Every iteration ends with a clean tree, a passing build, passing tests, passing lint, passing e2e, and one more [x] in the commits file.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 3,379 | 3,527 | +4% | 1 | 1 | 0% | 369 | 2,802 | +659% | 0 | 0 | — |
case-07 | fail→fail | 14,058 | 8,365 | -40% | 1 | 1 | 0% | 2,062 | 3,865 | +87% | 0 | 0 | — |
case-02 | fail→fail | 5,652 | 2,779 | -51% | 1 | 1 | 0% | 307 | 2,816 | +817% | 0 | 0 | — |
case-03 | fail→fail | 16,849 | 6,250 | -63% | 1 | 1 | 0% | 2,544 | 3,005 | +18% | 0 | 0 | — |
case-04 | fail→pass | 9,101 | 3,492 | -62% | 1 | 1 | 0% | 1,425 | 3,212 | +125% | 0 | 0 | — |
case-05 | fail→fail | 7,705 | 6,386 | -17% | 1 | 1 | 0% | 1,253 | 3,151 | +151% | 0 | 0 | — |
case-06 | fail→fail | 8,977 | 2,922 | -67% | 1 | 1 | 0% | 1,736 | 3,182 | +83% | 0 | 0 | — |
case-08 | fail→pass | 7,803 | 2,301 | -71% | 1 | 1 | 0% | 1,299 | 3,029 | +133% | 0 | 0 | — |
case-09 | fail→pass | 14,366 | 6,661 | -54% | 1 | 1 | 0% | 2,033 | 3,640 | +79% | 0 | 0 | — |
case-10 | fail→pass | 10,448 | 4,110 | -61% | 1 | 1 | 0% | 1,812 | 3,310 | +83% | 0 | 0 | — |
case-11 | fail→fail | 10,565 | 6,238 | -41% | 1 | 1 | 0% | 1,592 | 3,419 | +115% | 0 | 0 | — |
case-12 | fail→fail | 6,930 | 17,832 | +157% | 1 | 1 | 0% | 939 | 6,251 | +566% | 0 | 0 | — |
case-13 | fail→pass | 12,322 | 2,643 | -79% | 1 | 1 | 0% | 2,077 | 3,052 | +47% | 0 | 0 | — |
case-14 | fail→fail | 13,934 | 3,511 | -75% | 1 | 1 | 0% | 2,017 | 3,248 | +61% | 0 | 0 | — |
case-15 | fail→fail | 9,186 | 3,638 | -60% | 1 | 1 | 0% | 1,377 | 3,237 | +135% | 0 | 0 | — |
case-16 | fail→pass | 9,337 | 3,319 | -64% | 1 | 1 | 0% | 1,460 | 3,123 | +114% | 0 | 0 | — |
case-17 | fail→fail | 6,935 | 2,044 | -71% | 1 | 1 | 0% | 1,087 | 2,942 | +171% | 0 | 0 | — |
case-18 | fail→pass | 12,195 | 6,113 | -50% | 1 | 1 | 0% | 1,773 | 3,621 | +104% | 0 | 0 | — |
case-19 | fail→pass | 10,950 | 4,251 | -61% | 1 | 1 | 0% | 1,777 | 3,330 | +87% | 0 | 0 | — |
case-20 | pass→fail | 8,761 | 5,642 | -36% | 1 | 1 | 0% | 1,585 | 2,995 | +89% | 0 | 0 | — |
case-21 | pass→fail | 11,016 | 5,168 | -53% | 1 | 1 | 0% | 1,954 | 2,835 | +45% | 0 | 0 | — |
case-22 | pass→fail | 9,338 | 5,556 | -41% | 1 | 1 | 0% | 1,541 | 2,852 | +85% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 17 counted toward the lift figure. The other 5 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +23 percentage points is the difference between those two pass rates over the 17 comparable cases. 3 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.