Skip to content

Add a cherry-pick skill for copilot#8586

Open
alsepkow wants to merge 4 commits into
microsoft:mainfrom
alsepkow:alsepkow/copilot-instructions-cherry-pick
Open

Add a cherry-pick skill for copilot#8586
alsepkow wants to merge 4 commits into
microsoft:mainfrom
alsepkow:alsepkow/copilot-instructions-cherry-pick

Conversation

@alsepkow

@alsepkow alsepkow commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Adds a cherry-pick skill at .github/skills/cherry-pick/SKILL.md.

Rather than putting the convention in .github/copilot-instructions.md (which is injected into every prompt), a skill is auto-discovered from the repo and only loaded on demand when a cherry-pick is actually being done. The skill captures:

  • Cherry-pick commits using git cherry-pick -x so the source SHA is recorded in git's standard format.
  • Keep the cherry-pick commit message as git generates it by default.
  • Prefix the PR title with [Cherry-Pick].

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Document the convention for cherry-pick PRs: cherry-pick commits (not PRs) using git cherry-pick -x, prefix PR titles with [Cherry-Pick], and make the PR description match the cherry-picked commit message verbatim so the squash-merge commit message is correct.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@alsepkow alsepkow marked this pull request as ready for review June 23, 2026 16:44
@damyanp

damyanp commented Jun 23, 2026

Copy link
Copy Markdown
Member

This seems like a lot of text to add to every single prompt. I think this might be something we'd want to do as a skill. But really I think we don't need much more than "Use git cherry-pick -x for cherry picks". I actually think we shouldn't diverge too much from the commit message that git generates by default for this. I think instructions about how to create topic branches and stuff don't need to be explicit here.

Per review feedback, trim the cherry-pick guidance to the essentials: use git cherry-pick -x and keep git's default commit message, dropping the topic-branch and verbatim-description boilerplate that added too much text to every prompt.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@bob80905 bob80905 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Per review feedback, move the cherry-pick convention out of .github/copilot-instructions.md (which is injected into every prompt) and into an on-demand skill at .github/skills/cherry-pick/SKILL.md. The skill is auto-discovered from the repo and only loaded when relevant, keeping it out of unrelated prompts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@alsepkow alsepkow changed the title Add Copilot instructions for cherry-picking commits Add a cherry-pick skill Jun 23, 2026
@alsepkow alsepkow changed the title Add a cherry-pick skill Add a cherry-pick skill for copilot Jun 23, 2026
@alsepkow

Copy link
Copy Markdown
Contributor Author

This seems like a lot of text to add to every single prompt. I think this might be something we'd want to do as a skill. But really I think we don't need much more than "Use git cherry-pick -x for cherry picks". I actually think we shouldn't diverge too much from the commit message that git generates by default for this. I think instructions about how to create topic branches and stuff don't need to be explicit here.

Swapped to a skill. Confirmed locally that it loads automatically on copilot startup

Drop the topic-branch and squash-merge boilerplate from the skill body since the agent already knows those steps; keep only the non-obvious conventions (git cherry-pick -x, keep git's default message, [Cherry-Pick] title prefix). The descriptive frontmatter is retained so the skill still triggers reliably.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

3 participants