undercover copilot-instructions.md

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

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 instructions/anasfik/undercover/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/anasfik/undercover

Made for: GitHub Copilot.

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. 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 $0.00463 $0.00463
Opus 5 $0.00231 $0.00231
Sonnet 5 $0.00093 $0.00093
Haiku 4.5 $0.00046 $0.00046

Measured 2d ago against content hash b304a51abd23, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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 XAdd X
  • Added XAdd X, Removed XRemove X, Fixed XFix 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. 2d 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 5mo ago), licensed MIT. It adds 463 tokens to every session, about $0.0023 per session on Opus 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