vscode-copilot-insights
Copilot instructions37 starsChanged 5 months agoMITView on GitHub
VS Code extension project guidelines for GitHub Copilot Insights. Covers project shape, code style, VS Code extension rules, build and test, and repository discipline.
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
14 rules. About 0 are common, 6 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Keep extension-host logic in src/, with activation and command/view wiring in src/extension.ts, Copilot data access in src/api/, pure …
- Very specific: line 27
Prefer pure helpers in src/core/ for behavior that can be unit tested without the VS Code API.
- Distinctive: line 28
Keep user-facing strings localizable through the existing package/l10n patterns when they are surfaced by VS Code or the extension UI.
- Very specific: line 32
Treat package.json contributions, activation behavior, command registration, status bar items, language model tools, storage, and webviews …
- Distinctive: line 33
Do not use proposed VS Code APIs unless the project already opts into them or the user explicitly asks.
- Very specific: line 34
Do not assume webview code can access Node.js or the VS Code API directly.
- Distinctive: line 35
Keep webview rendering compatible with VS Code themes and offline local assets.
- Very specific: line 39
Use npm run compile as the main production validation command after extension changes.
- Very specific: line 40
Run npm run compile-tests when changing tests or code imported by tests.
- Very specific: line 41
Run npm test only when the Electron extension test harness is needed and practical.
- Very specific: line 42
Follow .github/instructions/repo-validation.instructions.md for the detailed validation workflow when it applies.
- Distinctive: line 46
Do not publish, package for release, bump versions, commit, or create branches unless the user explicitly asks.
- Distinctive: line 47
Do not revert user changes.
- Distinctive: line 48
Keep documentation updates close to the behavior being changed.
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitHub Copilot Insights
- This repository is a VS Code extension for showing GitHub Copilot plan, quota, reset, history, and AI credit usage insights inside VS Code.
- Keep extension-host logic in
src/, with activation and command/view wiring insrc/extension.ts, Copilot data access insrc/api/, pure formatting/history/prediction/quota logic insrc/core/, and UI-specific code insrc/ui/. - The extension is bundled to
dist/extension.jswith esbuild. Extension tests compile TypeScript to the CommonJSout/tree.
Tech Stack
- Runtime: VS Code extension API
^1.107.0, UI extension host, Node.js-compatible extension code, and browser-based webviews. - Language: TypeScript targeting ES2022 with
module: Node16, strict type checking, and DOM library types for webview code. - Extension surfaces:
package.jsoncontributions for activity bar views, webviews, commands, settings, walkthroughs, localization, and theinsights_getCopilotQuotalanguage model tool. - UI: VS Code webview HTML/CSS/JavaScript in
src/ui/webview/andmedia/, VS Code theme variables, Codicons, and offline local assets. - Charts: Chart.js 4.x via the bundled UMD asset at
media/chart.umd.min.js. - Build tooling: npm scripts, esbuild for
dist/extension.js, TypeScript compiler for type checks and test emits, andscripts/copy-codicons.mjsfor static assets. - Quality and tests: ESLint 9 with typescript-eslint, Mocha-style extension tests through
@vscode/test-cliand@vscode/test-electron, plus@types/vscode,@types/node, and@types/mocha.
Code Style
- Make focused TypeScript changes that match nearby style and avoid broad rewrites or formatting churn.
- Preserve public command IDs, setting keys, view IDs, contribution IDs, exported types, and storage shapes unless the task explicitly requires a migration or breaking change.
- Prefer pure helpers in
src/core/for behavior that can be unit tested without the VS Code API. - Keep user-facing strings localizable through the existing package/l10n patterns when they are surfaced by VS Code or the extension UI.
VS Code Extension Rules
- Treat
package.jsoncontributions, activation behavior, command registration, status bar items, language model tools, storage, and webviews as public extension surfaces. - Do not use proposed VS Code APIs unless the project already opts into them or the user explicitly asks.
- Do not assume webview code can access Node.js or the VS Code API directly. Use
acquireVsCodeApi, message passing, CSP nonces, andasWebviewUrifor local assets. - Keep webview rendering compatible with VS Code themes and offline local assets.
Build and Test
- Use
npm run compileas the main production validation command after extension changes. - Run
npm run compile-testswhen changing tests or code imported by tests. - Run
npm testonly when the Electron extension test harness is needed and practical; if it is blocked by the VS Code download or environment, report that extension-host behavior remains unverified. - Follow
.github/instructions/repo-validation.instructions.mdfor the detailed validation workflow when it applies.
Repository Discipline
- Do not publish, package for release, bump versions, commit, or create branches unless the user explicitly asks.
- Do not revert user changes. If existing edits affect the task, work with them and keep the final summary clear about what changed.
- Keep documentation updates close to the behavior being changed; do not duplicate large sections from
README.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

