cloudcloak
Copilot instructions152 starsChanged 8 months agoMITView on GitHub
The file
We split this copilot-instructions.md into the rules it gives an agent
12 rules. About 0 are common, 9 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 5
Keep changes lightweight and dependency-free unless a new dependency is clearly necessary.
- Distinctive: line 6
Prefer small, focused edits that fit the existing style of the codebase.
- Very specific: line 17
Use ES modules when modifying shared code because background.js and popup.js import from common.js.
- Distinctive: line 18
Avoid introducing a build step, transpiler, or framework for routine changes.
- Distinctive: line 20
Prefer simple DOM operations and defensive null checks because the extension runs against many third-party pages with changing markup.
- Distinctive: line 21
Keep regex and masking logic readable and narrowly scoped to the sensitive data being targeted.
- Very specific: line 26
Use Node's built-in test runner for automated coverage in tests/*.test.mjs.
- Distinctive: line 29
If test coverage is added, keep it lightweight, dependency-free, and focused on the changed behavior.
- Distinctive: line 36
Do not alter permissions, host access, or injection behavior unless the task explicitly requires it.
- Very specific: line 37
Do not duplicate masking rules across files.
- Distinctive: line 38
When adding new masking behavior, consider both applying and removing the mask so toggling remains reversible.
- Distinctive: line 39
Update README or user-facing documentation only when the change affects usage or setup.
≈ “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
Copilot instructions for Cloud Cloak
Repository overview
- This repository is a Manifest V3 browser extension written in plain JavaScript, HTML, and static assets.
- Keep changes lightweight and dependency-free unless a new dependency is clearly necessary.
- Prefer small, focused edits that fit the existing style of the codebase.
Key files
manifest.jsondefines the extension entry points, permissions, and web-accessible resources.common.jsis the shared source of truth for supported domains and cloakable pattern definitions.background.jshandles tab events, script injection, and badge updates.popup.jsrenders and persists toggle state for masking options.cloak.jscontains the DOM-masking logic that runs in the page context.
Coding guidance
- Preserve compatibility with browser extension APIs used in this repo (
chrome.*APIs, MV3 service worker, content script injection). - Use ES modules when modifying shared code because
background.jsandpopup.jsimport fromcommon.js. - Avoid introducing a build step, transpiler, or framework for routine changes.
- Reuse existing shared data structures from
common.jsinstead of duplicating domain or pattern definitions. - Prefer simple DOM operations and defensive null checks because the extension runs against many third-party pages with changing markup.
- Keep regex and masking logic readable and narrowly scoped to the sensitive data being targeted.
Test guidance
- The repo includes a minimal
package.jsonwithtype: moduleso Node treats.jsfiles as ES modules during validation and tests. - Pull requests are validated by
.github/workflows/pull-request-ci.yml, which runs syntax checks, manifest validation, the Node test suite, and the extension packaging step. - Use Node's built-in test runner for automated coverage in
tests/*.test.mjs. - For documentation-only or metadata-only changes, do not add tests.
- For behavior changes, prefer extracting small pure functions from DOM-heavy code so they can be tested with minimal setup.
- If test coverage is added, keep it lightweight, dependency-free, and focused on the changed behavior.
- Prioritize tests for:
- regex detection and matching behavior
- supported-domain logic
- toggle-state or masking decisions that can be validated without a browser
Change expectations
- Do not alter permissions, host access, or injection behavior unless the task explicitly requires it.
- Do not duplicate masking rules across files; update the shared definition in
common.jswhen appropriate. - When adding new masking behavior, consider both applying and removing the mask so toggling remains reversible.
- Update README or user-facing documentation only when the change affects usage or setup.
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.

