vscode-peacock: Instructions file for GitHub Copilot

.github/copilot-instructions.md

vscode-peacock copilot-instructions.md is an instructions file for GitHub Copilot from johnpapa/vscode-peacock. It costs 931 tokens per session, scanned A, original, MIT.

Coding rules for Peacock, a TypeScript extension that changes Visual Studio Code’s workspace colour so developers can tell editor windows apart.

In plain words
What is it for?
Use it when adding commands or settings, changing colour handling, working with VS Code configuration, or writing unit and browser tests.
Why use it?
It keeps new extension code consistent with the project’s TypeScript settings, VS Code extension conventions, colour utilities, and test structure.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file.

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

About the project

Peacock is a Visual Studio Code extension that changes a workspace’s color so users can distinguish between multiple editor windows or shared and remote sessions. It is for developers who need a quick visual way to identify their VS Code workspaces. Its catalogue entries provide instructions and an MCP integration related to the extension.

johnpapa/vscode-peacock · 1,192 stars · on GitHub

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/johnpapa/vscode-peacock/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/johnpapa/vscode-peacock/copilot-instructions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 931 This file is loaded in full into every session.
When invoked 931 The same file — it is already loaded in full.
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.00931 $0.00931
Opus 5.5 $0.00372 $0.00372
Sonnet 5.5 $0.00186 $0.00186
Haiku 4.5 $0.00093 $0.00093

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

Security

Grade A, and why

vscode-peacock copilot-instructions.md 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/copilot-instructions.md · 60 lines

How it starts

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

Copilot Instructions — Peacock

Project Type

VS Code extension written in TypeScript, bundled with Webpack, published to the VS Code Marketplace.

TypeScript Conventions

  • Strict mode enabled (tsconfig.json)
  • Use explicit types for function parameters and return values
  • Use import type for type-only imports
  • All source code lives in src/

VS Code Extension Patterns

  • Use vscode.commands.registerCommand() for command registration
  • Use vscode.workspace.getConfiguration('peacock') for reading settings
  • Use vscode.window.showQuickPick() and vscode.window.showInputBox() for user input
  • All commands must be declared in package.json under contributes.commands
  • All settings must be declared in package.json under contributes.configuration.properties

Color Handling

  • All color manipulation uses tinycolor2 via the helpers in src/color-library.ts
  • Never manipulate hex strings directly — always go through the color library
  • Colors are stored as hex strings (e.g., #ff0000) in VS Code configuration

Test Conventions

  • Unit tests: Mocha + Sinon, located in src/test/
  • E2E tests: Playwright, located in e2e/ (primarily for docs screenshots)
  • Run unit tests: npm test
  • Run e2e tests: npm run test:e2e
  • Tests use testworkspace/ as the VS Code workspace
  • Every bug fix must include a regression test that fails without the fix and passes with it
  • Every new feature must include unit tests covering the happy path and relevant edge cases
  • Don't accept "this can't be tested" claims at face value. Grep src/test/ for the exact vscode API/state the change depends on — if any existing suite already stubs it (host lane can sinon.stub(vscode.env, ...)), reuse that lane/pattern instead of skipping the test. See PR #757 for a worked example.

Code Style

  • ESLint + Prettier (config in .eslintrc and .prettierrc.js)
  • Husky pre-commit hook runs Prettier automatically
  • Lint: npm run lint
  • Fix: npm run lint-fix

Read the full file on GitHub · 60 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. 1mo ago Changed · +1 lines · +80 tokens per session d40b97ec5924
  2. 2mo ago First seen · 59 lines · 851 tokens per session scan A 81bc238f0548

Subscribe to this mod's changes

vscode-peacock copilot-instructions.md is an instructions file published in the GitHub repository johnpapa/vscode-peacock (1,192 stars, last pushed 7d ago), licensed MIT. It adds 931 tokens to every session, about $0.0037 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-08-30.

Related

vscode-peacock copilot-instructions.md compared with instructions from other repositories

vscode-peacock copilot-instructions.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
vscode-peacock copilot-instructions.mdjohnpapa/vscode-peacockInstructions file1.2k7d agoMITA931GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode