ai-agents-for-beginners: Command for GitHub Copilot

.github/prompts/git-cherrypicking.prompt.md

git-cherrypicking is a command for GitHub Copilot from microsoft/ai-agents-for-beginners. It costs 16 tokens per session (235 once invoked), scanned A, original, MIT.

A Git procedure for restoring one deleted file from a particular commit onto another branch. Git is a version-control system that records project history and supports moving changes between branches.

In plain words
What is it for?
Use it to identify the relevant commit, retrieve the file with Git, and prepare the result for the user to stage and commit.
Why use it?
It avoids bringing an entire commit across when only one deleted file is needed, and handles cases where the file is absent from the named commit.

Command for GitHub Copilot ✓ vendor

Written for GitHub Copilot: a Copilot chat mode or prompt.

This is microsoft/ai-agents-for-beginners's own configuration. It tells GitHub Copilot how to work on ai-agents-for-beginners itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ai-agents-for-beginners configures →

About the project

AI Agents for Beginners is a course that teaches the fundamentals of building AI agents through a sequence of lessons. People learning generative AI and agent development use it to study topics and frameworks including AutoGen and Semantic Kernel. The catalogue entries provide skills, instructions, and an agent related to the course.

microsoft/ai-agents-for-beginners · 77,700 stars · on GitHub · aka.ms

Reuse

Borrowing it

Nothing to install: this file belongs to microsoft/ai-agents-for-beginners. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/microsoft/ai-agents-for-beginners/main/.github/prompts/git-cherrypicking.prompt.md
Clone the repo
git clone --depth 1 https://github.com/microsoft/ai-agents-for-beginners

Made for: GitHub Copilot.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for git-cherrypicking

README.md
[![agentmods](https://agentmods.dev/badge/commands/microsoft/ai-agents-for-beginners/git-cherrypicking/github.svg)](https://agentmods.dev/commands/microsoft/ai-agents-for-beginners/git-cherrypicking)
Your own site
<a href="https://agentmods.dev/commands/microsoft/ai-agents-for-beginners/git-cherrypicking"><img src="https://agentmods.dev/badge/commands/microsoft/ai-agents-for-beginners/git-cherrypicking/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for git-cherrypicking

Your own site · 80×15
<a href="https://agentmods.dev/commands/microsoft/ai-agents-for-beginners/git-cherrypicking"><img src="https://agentmods.dev/badge/commands/microsoft/ai-agents-for-beginners/git-cherrypicking.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 235 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00016 $0.00235
Opus 5.5 $0.00006 $0.00094
Sonnet 5.5 $0.00003 $0.00047
Haiku 4.5 $0.00002 $0.00023

Measured 1mo ago against content hash 1b240446fd4f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

git-cherrypicking scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/prompts/git-cherrypicking.prompt.md · 21 lines

What it actually says

Cherry-picking a File Between Branches Using Git

Your goal is to cherry-pick a specific file deleted from a given commit between branches in a Git repository. Use the Git command line interface to accomplish this task.

Inputs

  • Commit Hash: $COMMIT - The hash of the commit from which to cherry-pick the file.
  • File Path: $FILE_PATH - The path of the file to be cherry-picked.

If you don't have the commit hash or file path, please ask the user for these details.

Instructions

  1. Identify the Commit: Determine the commit hash from which you want to cherry-pick the file.
  2. Cherry-pick the File: Use the git checkout command to cherry-pick the specific file from the identified commit. If the file doesn't exist in the given commit, find the closest commit where the file exists.
  3. Commit the Changes: Ask the user to stage and commit the changes to finalize the cherry-pick.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 21 lines · 16 tokens per session scan A 1b240446fd4f

Subscribe to this mod's changes

git-cherrypicking is a command published in the GitHub repository microsoft/ai-agents-for-beginners (77,700 stars, last pushed yesterday), licensed MIT. It adds 16 tokens to every session and 235 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-10.