vscode-peacock copilot-instructions.md

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

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

Made for: GitHub Copilot.

Per session 851 This file is loaded in full into every session.
When invoked 851 The same file — it is already loaded in full.
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 $0.00851 $0.00851
Opus 5 $0.00426 $0.00426
Sonnet 5 $0.00170 $0.00170
Haiku 4.5 $0.00085 $0.00085

Measured yesterday against content hash 81bc238f0548, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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 · 59 lines

How it starts

The opening of the file, as written. The whole thing — 59 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

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

Maintenance Matrix

When this changes... Also update...
New command added package.json (contributes.commands + menus), src/models/enums.ts (Commands enum), src/commands.ts, src/extension.ts (register), src/test/, docs/guide/, docs/changelog/README.md
New StandardSettings setting added package.json (contributes.configuration), src/models/enums.ts (StandardSettings enum), src/configuration/read-configuration.ts (add reader), src/test/, docs/guide/, docs/changelog/README.md
New AffectedSettings setting added package.json (contributes.configuration), src/models/enums.ts (AffectedSettings + ColorSettings enums), src/models/interfaces.ts (IPeacockAffectedElementSettings), src/configuration/read-configuration.ts (getAffectedElements + collect* function), src/configuration/update-configuration.ts (updateAffectedElements), src/test/suite/affected-elements.test.ts, docs/guide/, docs/changelog/README.md
Bug fix src/test/ (add a regression test that fails without the fix), docs/changelog/README.md
Color application logic src/apply-color.ts, src/color-library.ts, related unit tests
Live Share integration src/live-share/, src/live-share/liveshare-commands.ts, package.json (vsls dependency), related tests, run npm run test-all
Remote features src/remote/, related tests
Docs content docs/ (update pages), docs/_sidebar.md (if new page), e2e/ (if screenshots change)
Dependencies updated package.json, package-lock.json, verify webpack build, run full test suite
Version bump package.json (version field only), docs/changelog/README.md

Read the full file on GitHub · 59 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. yesterday 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,174 stars, last pushed 11d ago), licensed MIT. It adds 851 tokens to every session, about $0.0043 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-30.