cherry-pick
Skill2 starsChanged 4 months agoMITView on GitHub
Apply specific commits from one branch onto another with git cherry-pick — backport a fix, pull a single feature commit across branches, or recover a commit — safely and with conflict handling. Use when the user says "cherry-pick this commit", "backport this fix to the release branch", "apply commit X to main", "bring that commit over here", "port this change to another branch", or "I need just one commit from that branch".
6 other projects use a version of this.
Adopted by
Most recently taken up by
- yuzono/anime-extensionstheir own version, first seen Nov 1, 2026
- microsoft/DirectXShaderCompilertheir own version, first seen Oct 16, 2026
- vaadin/web-componentstheir own version, first seen Oct 8, 2026
- ai-dynamo/aiperftheir own version, first seen Oct 8, 2026
- MystenLabs/suitheir own version, first seen Oct 8, 2026
- fleetdm/fleettheir own version, first seen Oct 8, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- MystenLabs/sui★ 7.8ksame name
- fleetdm/fleet★ 7.2ksame name
- microsoft/DirectXShaderCompiler★ 3.7ksame name
- ai-dynamo/aiperf★ 882same name
- vaadin/web-components★ 585same name
- yuzono/anime-extensions★ 546same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository68 other files it gives its agents.
- a11ySkill
- api-docsSkill
- audit-logSkill
- benchmarkSkill
- bisectSkill
- cacheSkill
- changelogSkill
- ci-setupSkill
- codeownersSkill
- commit-messageSkill
- connection-poolSkill
- contributingSkill
- coverageSkill
- db-migrateSkill
- dead-codeSkill
- debugSkill
- depsSkill
- diagramSkill
- dockerizeSkill
- docstringSkill
- e2eSkill
- env-exampleSkill
- error-handlingSkill
- explainSkill
- feature-flagSkill
- flaky-testSkill
- gitignoreSkill
- graceful-shutdownSkill
- graphqlSkill
- healthcheckSkill
- i18nSkill
- idempotencySkill
- licenseSkill
- lint-fixSkill
- loggingSkill
- migrateSkill
- mockSkill
- onboardSkill
- optimizeSkill
- paginationSkill
- pr-descriptionSkill
- pre-commitSkill
- profileSkill
- prune-branchesSkill
- rate-limitSkill
- readmeSkill
- rebaseSkill
- refactorSkill
- regexSkill
- releaseSkill
- resolve-conflictsSkill
- retrySkill
- review-diffSkill
- scaffoldSkill
- secrets-scanSkill
- security-headersSkill
- seedSkill
- soft-deleteSkill
- sqlSkill
- squashSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 4 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Require a clean working tree: If there are uncommitted changes, stop and tell the user to commit or stash first (see the stash skill) — …
- Distinctive: line 25
Check it isn't already there: Look for the change on the target (git log --oneline --grep or compare patches) — cherry-picking something …
- Very specific: line 29
Use -n/--no-commit to stage without committing when the user wants to review or combine before committing.
- Distinctive: line 31
Verify and report: After applying, confirm the result builds/tests pass where relevant, show the new git log --oneline, and note that …
- Distinctive: line 35
Never start with a dirty tree or without confirming both the source commit(s) and the destination branch.
- Distinctive: line 36
Check whether the change is already present before applying — avoid duplicate or empty commits.
- Very specific: line 38
Use -x for backports so the origin commit is recorded, and prefer cherry-picking the minimal set — for many commits across branches, …
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Branch & commit context
!git status --short 2>/dev/null
!git branch --show-current 2>/dev/null
!git log --oneline -10 2>/dev/null
Instructions
Apply the commit(s) in $ARGUMENTS onto the current branch with git cherry-pick. Cherry-picking copies commits and can conflict or duplicate work — confirm the target commits and the destination branch before starting, and stop to let the user resolve conflicts rather than guessing.
Method
- Require a clean working tree. If there are uncommitted changes, stop and tell the user to commit or stash first (see the
stashskill) — cherry-pick refuses to run mid-mess and a dirty tree risks losing work. - Confirm what and where. Verify you're on the intended destination branch and identify the exact commit(s): a single SHA, a list, or a range (
A..BexcludesA;A^..Bincludes it). Showgit show --stat <sha>for each so the user confirms these are the right changes before applying. - Check it isn't already there. Look for the change on the target (
git log --oneline --grepor compare patches) — cherry-picking something already merged creates a duplicate/empty commit. If the same content is present, say so instead of re-applying. - Apply deliberately:
- Single or several commits:
git cherry-pick <sha> [<sha>...](applies oldest-first). - Preserve provenance for backports with
-x, which appends a "cherry picked from commit<sha>" line so the origin is traceable. - Use
-n/--no-committo stage without committing when the user wants to review or combine before committing.
- Single or several commits:
- Handle conflicts as a checkpoint. On conflict, do not force a resolution — show the conflicted files, explain both sides, and resolve like a merge (see
resolve-conflicts). Continue withgit cherry-pick --continue, or back out cleanly withgit cherry-pick --abort(or--skipfor an already-applied commit). Never leave the repo mid-cherry-pick silently. - Verify and report. After applying, confirm the result builds/tests pass where relevant, show the new
git log --oneline, and note that cherry-picked commits have new SHAs — so the branches will show the change twice if they're later merged.
Rules
- Never start with a dirty tree or without confirming both the source commit(s) and the destination branch.
- Check whether the change is already present before applying — avoid duplicate or empty commits; surface it if it's already there.
- On conflict, stop and let the user resolve; never guess a resolution. Always offer
--continue/--abortand never abandon the repo in a half-applied state. - Use
-xfor backports so the origin commit is recorded, and prefer cherry-picking the minimal set — for many commits across branches, consider whether a merge or rebase is the right tool instead. - End with the resulting history, confirmation tests pass, and a note that the commits are copies with new SHAs.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

