zed-cherry-pick

zed-industries/zed

Черри-пик одного или нескольких смерженных PR и/или коммитов в ветки `preview` или `stable` Zed, включая разбор неудачных прогонов.

Звёзды95 246
Авторzed-industries
Установок9

Установка

SKILL.md

Zed Cherry-Pick

Zed ships from two long-lived release branches that live on origin:

  • preview channel → branch like v1.4.x
  • stable channel → branch like v1.3.x

The version numbers change with each release. Never hardcode them — always discover the current mapping (see Finding the target branch).

A merged PR on main gets ported to a release branch by script/cherry-pick, normally driven by the cherry_pick GitHub Actions workflow. When that workflow fails (almost always a merge conflict), use this skill to finish the job locally and open the cherry-pick PR by hand.

When to use

Use this when the user asks to cherry-pick one or more commits and/or Pull Requests (by number or URL) to preview or stable. Optionally, the user may specify whether to resolve merge conflicts; if unspecified, attempt the cherry-pick, and then if there are merge conflicts in practice, stop and inform the user that there are merge conflicts and offer to resolve them. (Users may prefer to resolve the merge conflicts themselves before continuing.)

The script you're emulating

The canonical procedure lives in script/cherry-pick and the cherry_pick GitHub Actions workflow. Read the script first if anything looks off — your local steps must produce the same branch name, PR title, and PR body it would.

Signature: script/cherry-pick <branch-name> <commit-sha> <channel>

  • <branch-name> is the release branch (e.g. v1.4.x), not the channel name.
  • <channel> is preview or stable, used only for display text in the PR title/body.

It creates a local branch named cherry-pick-<branch-name>-<short-sha> (the short SHA is the first 8 chars of the commit), force-pushes it to origin, and opens a PR.

Finding the target branch

The channel→branch mapping changes every release. Find the current one by inspecting the most recent cherry_pick workflow runs:

gh run list --workflow=cherry_pick.yml --limit 30 --json displayTitle,databaseId
# pick a recent run for the channel you want, then:
gh run view <id> --log 2>&1 | grep -E "BRANCH:|CHANNEL:"

A successful run prints both BRANCH: and CHANNEL: env vars; that's your mapping.

Procedure

1. Gather context

You need three things: the merge commit SHA, the target branch, and the channel name.

If the user requested multiple PRs and/or commits, gather the metadata for all of them first and cherry-pick them in the order they landed on main, oldest to newest. For PRs, order by mergedAt; for raw commits, use their order on main when available, otherwise commit date. This tends to reduce avoidable conflicts because later changes may depend on earlier ones, but it does not guarantee a conflict-free cherry-pick when the release branch has diverged.

gh pr view <PR_NUMBER> --json title,number,mergeCommit,mergedAt,url

If the user said the workflow failed, fetch its log to see exactly which command failed and which file conflicted:

gh run list --workflow=cherry_pick.yml --limit 10 --json databaseId,displayTitle,status,conclusion
gh run view <failed_run_id> --log-failed

The failed-run log also confirms the BRANCH and COMMIT the workflow used — handy if there's any ambiguity.

2. Reproduce the script's setup locally

The repository may be a worktree (check .git — if it's a file, you're in a worktree pointing at a shared gitdir). That's fine; just operate normally.

git --no-pager fetch origin <branch-name> <commit-sha>
git checkout --force origin/<branch-name> -B cherry-pick-<branch-name>-<short-sha>
git cherry-pick <commit-sha>

The branch name must match cherry-pick-<branch-name>-<short-sha> exactly (script convention; reviewers and tooling expect it).

3. Check for missing prerequisite cherry-picks

If the cherry-pick conflicts, do not immediately resolve the conflicts manually.

First determine whether the conflict is likely caused by other PRs or commits that are already on main but missing from the release branch. If so, point out those candidate prerequisite PRs/commits to the user, including PR links, and offer to either resolve the conflicts manually or let the user run the GitHub cherry-pick workflow for those commits first.

If the user wants to run the workflow for the missing prerequisites, stop here. This often keeps cherry-picks clean and eligible for automatic approval.

Only resolve conflicts manually if:

  • no likely missing prerequisites are found, or
  • the user chooses manual conflict resolution instead of cherry-picking the prerequisites first.

4. Resolve the conflicts manually

Do this only after checking for missing prerequisite cherry-picks.

  • Inspect every conflicted file with grep -n '<<<<<<<\\|>>>>>>>\\|=======' <path> to find the markers.
  • Conflicts are usually diff3 style with three sections: HEAD (release branch), ||||||| parent of <sha> (merge base on main), and the incoming change.
  • Read the original commit (git --no-pager show <commit-sha> -- <path>) to understand the author's intent, then pick the resolution that produces the equivalent end state on the release branch.
  • Don't grab unrelated changes from main that happen to surround the conflict — keep the cherry-pick minimal.

5. Validate

Always build and (if reasonable) test the affected crate(s) before continuing the cherry-pick.

cargo check -p <affected_crate>
cargo test  -p <affected_crate>

If validation fails, fix the resolution — do not continue with a broken build. If you can't reach a clean state, abort with git cherry-pick --abort and report back to the user.

6. Finish the cherry-pick

git cherry-pick --continue opens an editor by default. Prevent that:

git add <resolved_files>
GIT_EDITOR=true git cherry-pick --continue

This preserves the original commit message verbatim, which is what the script does.

7. Push and open the PR

git push origin -f cherry-pick-<branch-name>-<short-sha>

Then create the PR with the exact title and body format script/cherry-pick uses, so it's indistinguishable from an automated one.

Title:

<original commit subject> (cherry-pick to <channel>)

The original commit subject already ends in (#<original_pr_number>); keep it.

Body (when the original commit title ends in (#<N>), which is the normal case):

Cherry-pick of #<original_pr_number> to <channel>

----
<original commit body, verbatim>

Create it with gh pr create, writing the body to a temp file to keep formatting intact:

git --no-pager log -1 --pretty=format:"%b" > /tmp/cp-body-tail.md
printf 'Cherry-pick of #%s to %s\n\n----\n' <PR_NUMBER> <channel> | cat - /tmp/cp-body-tail.md > /tmp/cp-body.md
gh pr create --base <branch-name> --head cherry-pick-<branch-name>-<short-sha> \\
  --title "<commit subject> (cherry-pick to <channel>)" \\
  --body-file /tmp/cp-body.md

Do not add a Release Notes: section — the original commit body already has one (or already says N/A), and you don't want it duplicated.

Final report to the user

Tell the user:

  • The new PR URL.
  • A one-line summary of the conflict and how you resolved it.
  • What validation you ran (commands + result).
  • That their local branch is now cherry-pick-<branch-name>-<short-sha>, in case they want you to switch back.

Gotchas

  • --no-pager and GIT_EDITOR=true: required for non-interactive git in this environment. Forgetting GIT_EDITOR=true on cherry-pick --continue hangs the terminal.
  • Worktree index lock: if a previous git command was interrupted, you may see index.lock errors. The lock lives at <gitdir>/index.lock where <gitdir> is what cat .git points to (for a worktree). Remove it only if you're sure no git process is running.
  • Don't expand the cherry-pick's scope: when resolving conflicts, never pull in unrelated changes from main just because they sit next to the conflict region. The PR should be the smallest diff that reproduces the original commit's intent on the release branch.
  • Channel branches are not called preview/stable: don't try to git fetch origin preview. Look up the actual vX.Y.x branch name first.

When Finished

After everything is finished, the last thing to do is to provide a link to the opened pull request(s) for the cherry-pick(s).

Вставить в README

Ссылка на карточку для вашего README — без картинок и счётчиков.

[DarkPlay: zed-cherry-pick](https://darkplay.ru/ai/skills/zed-industries-zed-zed-cherry-pick)

Описание

Переносит (cherry-pick) один или несколько слитых PR и/или коммитов в ветку релиза `preview` или `stable` в Zed. Используйте, когда пользователь упоминает cherry-pick в preview/stable, неудачный запуск cherry-pick или хочет вручную перенести исправления в ветку релиза.

Похожие скиллы и другие разделы каталога

Популярное в разделе «Скиллы»

Самые востребованные скиллов раздела по установкам и звёздам.

find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
4 400 000 устан.
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
1 600 000 устан.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
1 600 000 устан.
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
1 600 000 устан.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
1 600 000 устан.
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
1 500 000 устан.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
1 400 000 устан.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
1 300 000 устан.
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
1 300 000 устан.
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.
1 300 000 устан.
Похожее в других разделах каталога

Соседние разделы каталога: возможно, нужный инструмент живёт там.

bmad-brainstormingbmad-code-org · Фасилитируемый брейншторминг с библиотекой техник — дивергенция, конвергенция и фиксация…
39 комп.
agent-harnessalirezarezvani · Превращает папку навыков предметной области в ограниченный агентский цикл: построитель…
510 комп.
chief-data-officer-advisoralirezarezvani · Советник CDO: аудит данных для ИИ, стратегия data-продуктов, оценка активов.
510 комп.
commercial-skillsalirezarezvani · Коммерческий домен: 8 навыков — ценообразование, deal desk, партнёрства, каналы.
510 комп.
handoff-productivityalirezarezvani · Сжатие беседы в документ-передачу для другого агента.
510 комп.
security-guidancealirezarezvani · Хук-напоминание о безопасности для Claude Code: ловит 12 антипаттернов до записи кода.
510 комп.
ai-syncanthropics · Синхронизация ИИ-агентов между Claude Code, Cursor, Codex, Aider, Cline, Windsurf и…
38 комп.
airport-pickups-londonanthropics · Бронирование трансферов в аэропорты и круизные порты Великобритании с фиксированными…
4 915 ★
andieanthropics · Andie — острый на ум собеседник внутри Claude Code. Не пересказывает, а спорит…
38 комп.
architecture-studioanthropics · Плагин для архитекторов и AEC: 7 агентов, 36 навыков и 9 плагинов для анализа участка и…
38 комп.

Лучшие ИИ-инструменты для генерации видео

Генерация видео

Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,

VEED.IOVeed
По запросу
5.0
MootionMootion
По запросу
5.0
FlyviFlyvi
Есть бесплатный тариф
4.9
Google Veo 3.1Google
Платно
4.9
Sora (OpenAI)OpenAI
Платно
4.9
PikaPika
Платно
4.9
captions space
Есть бесплатный тариф
4.8
Клайп
Есть бесплатный тариф
4.8
viralpulse.appViralpulse
По запросу
4.8
Viral Maker AIViral-maker
Есть бесплатный тариф
4.8

Лучшие ИИ-инструменты для генерации текста и копирайтинга

Генерация текста и копирайтинг

Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра

NeuroscribeNeuroscribe
Есть бесплатный тариф
5.0
GoGPTGogpt
По запросу
5.0
ChatsonicChatsonic
По запросу
4.9
НейроТекстерNeuro-texter
По запросу
4.9
ChatGPTOpenAI
По подписке
4.9
Редактум
Есть бесплатный тариф
4.8
ChadGPTChadgpt
По запросу
4.8
Cosmo ScribeCosmoscribe
Есть бесплатный тариф
4.8
Memo HelperCopilot33
По запросу
4.8
LibraChatLibrachat
Есть бесплатный тариф
4.8

Лучшие ИИ-инструменты для генерации изображений

Генерация изображений

Подборка нейросетей для генерации изображений от фотореализма до концепт-арта. Сервисы, которые экономят часы ручной работы, создавая визуал для блогов, рекламы и дизайна за минуты

MagviMagvi
По запросу
5.0
DALL-E 3OpenAI
По подписке
5.0
SupaLabSupalab
По запросу
5.0
Freestyling.aiFreestyling
Есть бесплатный тариф
4.9
ArtGeneration.meArtgeneration
Есть бесплатный тариф
4.9
BigjpgBigjpg
По запросу
4.9
Художник от VKVK
Бесплатно
4.9
Wonderink — ИИ-книги
Есть бесплатный тариф
4.8
Avato AI12ai
По запросу
4.8
Virton AIVirton
По запросу
4.8