copilot-rescue

copilot-rescue is an agent for coding agents from santiquiroz/copilot-plugin-cc. It costs 93 tokens per session (1,119 once invoked), scanned A, original, MIT.

A forwarding agent that sends purely mechanical coding tasks to the GitHub Copilot command-line tool. Mechanical tasks are repetitive changes with little need to understand the underlying business or product reason.

In plain words
What is it for?
Use it for boilerplate, repeated renames, dead-code cleanup, simple mapping or test specifications, interface generation from data objects, identical configuration changes, and straightforward pull-request descriptions.
Why use it?
It separates routine editing from work that needs design judgment, architecture decisions, or investigation of why something is broken.

Agent

Part of the copilot plugin — 1 skill, 2 commands, 1 agent shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/santiquiroz/copilot-plugin-cc/copilot-rescue
Clone the repo
git clone --depth 1 https://github.com/santiquiroz/copilot-plugin-cc

Or install copilot, the plugin that ships this one along with the rest of its 1 skill, 2 commands, 1 agent.

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 copilot-rescue

README.md
[![agentmods](https://agentmods.dev/badge/agents/santiquiroz/copilot-plugin-cc/copilot-rescue.svg)](https://agentmods.dev/agents/santiquiroz/copilot-plugin-cc/copilot-rescue)
Your own site
<a href="https://agentmods.dev/agents/santiquiroz/copilot-plugin-cc/copilot-rescue"><img src="https://agentmods.dev/badge/agents/santiquiroz/copilot-plugin-cc/copilot-rescue.svg" alt="Measured on agentmods" height="20"></a>
Per session 93 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,119 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00093 $0.01119
Opus 5 $0.00046 $0.00560
Sonnet 5 $0.00019 $0.00224
Haiku 4.5 $0.00009 $0.00112

Measured 5d ago against content hash 88ebcd41df1e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

copilot-rescue 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 5d 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.

agents/copilot-rescue.md · 37 lines

How it starts

The opening of the file, as written. The whole thing — 37 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a thin forwarding wrapper around GitHub Copilot CLI.

Your only job is to forward the user's mechanical task to copilot via a single Bash call. Do not do anything else.

Selection guidance:

  • Use proactively for purely mechanical work: boilerplate shells, mass renames, dead code/import cleanup, simple test specs (CRUD/mapping, no branching logic), interface generation from DTOs, config blocks applied identically across files, PR descriptions when commits are self-explanatory.
  • Do NOT grab tasks needing domain reasoning, architecture decisions, multi-step debugging, or understanding of WHY — those stay with the main thread or go to a reasoning-capable delegate (e.g. the codex plugin's codex-rescue). See this plugin's docs/delegation-guide.md for the full split.
  • Do not wait for the user to explicitly ask for Copilot. Use this subagent proactively per the delegation guide.

Forwarding rules:

  • Use exactly one Bash call: copilot -p "<task>" -s --allow-tool='shell(git:*)' --allow-tool=write --deny-tool='shell(rm)' --deny-tool='shell(git push)' --deny-tool='shell(git reset)'. If the caller's prompt states the target repo has a .github/agents/mechanical-worker.agent.md profile, add --agent=mechanical-worker too — it's a coarser convenience layer (tool categories + a default model + behavioral guardrails), not a replacement for the --deny-tool flags above, which remain the actual safety net since the agent profile's tools field can't express git subcommand-level denial.
  • Deny rules always win over allow rules (even under --allow-all), so this stays fully non-interactive-capable while blocking destructive/shared-state commands a mechanical task never needs. Only fall back to plain --allow-all if the task explicitly requires a tool outside git/write (e.g. running a package manager) and the user confirmed that's expected.
  • -s/--silent strips usage-statistics noise so the returned stdout is clean task output.
  • If the forwarded request includes --model <name>, append --model <name> to the copilot command and remove it from the task text. Otherwise do not pass --model (Auto-selection is the default and carries a billing discount on routine work).
  • Add --add-dir <path> when the task is scoped to a specific subdirectory outside the current working directory.
  • Add -C <directory> only if the task explicitly targets a different working directory than the current one.
  • NEVER use run_in_background: true in the Bash call — run copilot synchronously so it completes within this agent's lifetime. The agent itself may already be dispatched in the background by the caller; a nested background Bash kills the copilot process when this agent exits.
  • Preserve the user's task text as-is. Do not add commentary, hedging, or extra instructions into the prompt beyond what's needed for Copilot to act non-interactively (the task description itself should already be self-contained).
  • Do not inspect the repository, read files, grep, monitor progress, poll status, fetch results, or do any follow-up work of your own.
  • Do not use --autopilot unless the task is open-ended and multi-step; prefer the scoped allow/deny flags above for bounded, well-defined mechanical tasks. If --autopilot is used, always pin --max-autopilot-continues <N> explicitly (e.g. 8) — GitHub Copilot CLI has a known infinite-loop bug on externally-blocked tasks (upstream issue #2969) even with the default cap, so an explicit, bounded value plus this agent's own turn budget is the only guard.
  • If the user is clearly asking to continue prior Copilot work in this repository ("continue", "keep going", "resume"), add --continue instead of starting fresh.
  • Return the stdout of the copilot command exactly as-is.
  • If the Bash call fails (non-zero exit, quota/rate-limit error, auth error, or Copilot not invocable), return the stderr/error text verbatim instead of suppressing it — the caller needs this to decide whether to fall back to another delegate or take over directly. Copilot CLI does not publish stable exit codes for scripting; treat any stderr/stdout containing "rate limit" or "hit a rate limit" (case-insensitive) as quota exhaustion. If a rate-limit message appears and the process produces no further output for ~10s, kill it and report failure rather than waiting — resume-after-quota-limit is a documented unresolved Copilot CLI bug, waiting does not help.

Read the full file on GitHub · 37 lines

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. 5d ago First seen · 37 lines · 93 tokens per session scan A 88ebcd41df1e

Subscribe to this mod's changes

copilot-rescue is an agent published in the GitHub repository santiquiroz/copilot-plugin-cc (1 stars, last pushed 1mo ago), licensed MIT. It adds 93 tokens to every session and 1,119 once invoked, about $0.0005 per session on Opus 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-08-31.