undercover: Instructions file for GitHub Copilot

.github/copilot-instructions.md

undercover copilot-instructions.md is an instructions file for GitHub Copilot from anasfik/undercover. It costs 463 tokens per session, scanned C, original, MIT.

A set of instructions for an undercover mode that removes writing patterns associated with AI from source comments and commit messages. It is intended for the Undercover project.

In plain words
What is it for?
Use it after phrases such as “go undercover” or “clean before PR” to remove scripted comment narration, vague TODOs, verbose documentation, and similar patterns.
Why use it?
It helps make public code and commits read more like ordinary human-maintained work while leaving program logic unchanged.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file.

This is anasfik/undercover's own configuration. It tells GitHub Copilot how to work on undercover 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 undercover configures →

Reuse

Borrowing it

Nothing to install: this file belongs to anasfik/undercover. 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/anasfik/undercover/main/.github/copilot-instructions.md
Clone the repo
git clone --depth 1 https://github.com/anasfik/undercover

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 undercover copilot-instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/anasfik/undercover/copilot-instructions/github.svg)](https://agentmods.dev/instructions/anasfik/undercover/copilot-instructions)
Your own site
<a href="https://agentmods.dev/instructions/anasfik/undercover/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/anasfik/undercover/copilot-instructions/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 undercover copilot-instructions.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/anasfik/undercover/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/anasfik/undercover/copilot-instructions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 463 This file is loaded in full into every session.
When invoked 463 The same file — it is already loaded in full.
Security scan C 1 finding. 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.00463 $0.00463
Opus 5.5 $0.00185 $0.00185
Sonnet 5.5 $0.00093 $0.00093
Haiku 4.5 $0.00046 $0.00046

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

Security

Grade C, and why

undercover copilot-instructions.md scanned grade C with 1 finding 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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- GitHub Copilot custom instructions -->
.github/copilot-instructions.md · 48 lines

What it actually says

Undercover Mode

You have an undercover mode for stripping AI-characteristic patterns from code before commits to public repositories.

Trigger phrases

Activate when the user says any of: "go undercover", "undercover mode", "clean before PR", "strip AI signatures", "make this look human", "prep for open source", "clean commits", "remove AI comments".

What to strip from source files

Remove or rewrite lines matching these patterns (only in comment lines — never touch logic, strings, or variable names):

Remove the whole line:

  • // Step N: / // Phase N: step-numbered headers
  • // First, we ... / // Next, we ... / // Now we ... flow narration
  • // Let's ... / // We can ... / // We need to ... first-person-plural
  • // Get the X / // Check if X / // Initialize X obvious restatements
  • // Implementation / //──────────── section banners
  • // TODO: add error handling / // TODO: add tests vague placeholder TODOs
  • @param foo - The foo / @returns The result verbose JSDoc

Strip prefix, keep the rest:

  • // Note that X → // X
  • // Note: X → // X
  • // Worth noting: X → // X
  • // Important: X → // X

Strip emoji only:

  • // 🚀 Launch server → // Launch server

What to fix in commit messages

Convert to imperative mood:

  • This commit adds X → Add X
  • Added X → Add X, Removed X → Remove X, Fixed X → Fix X
  • Remove trailing periods from the subject line

Protocol

  1. Scan and show findings first — never silently modify without showing the user what will change
  2. Get confirmation before editing files or amending commits
  3. Re-scan after to confirm signal dropped
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 · 48 lines · 463 tokens per session scan C b304a51abd23

Subscribe to this mod's changes

undercover copilot-instructions.md is an instructions file published in the GitHub repository anasfik/undercover (2 stars, last pushed 6mo ago), licensed MIT. It adds 463 tokens to every session, about $0.0019 per session on Opus 5.5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories