Cursor Crew is a Manifest V3 browser extension (Chrome, Edge, Firefox). It blanks any web page and a crew of cursor “agents” rebuilds it live, takes it apart (reverse mode) and records it to video. It’s an original implementation inspired by Swarm Rebuild (Dhvanil Patel) and Swarm (Joel Califa). Never copy code from those projects. They have no license. Re-implement ideas from scratch.
| Path | What it is |
|---|---|
src/core.js |
Pure logic: task ordering, scheduling, reverse plan, settings, file names. No DOM. Unit tested. |
src/themes.js |
Themes: palettes, cursor SVGs, agent names. Unit tested. |
src/engine.js |
Content script: DOM snapshot → shadow-DOM overlay → agent animation, toolbar, recording, reverse. |
src/background.js |
Popup ON button (toolbar icon) / Alt+Shift+S command (toggle-crew) → click-time media screenshot → inject core.js, themes.js, sound.js, engine.js and toggle. Keeps the auto-play content script registered for granted sites. |
src/sound.js |
The crew’s audio synth (typing, clicks, notes), shared by the engine and the offscreen recorder. Unit tested. |
src/recstore.js |
IndexedDB store for recordings (add, list, get, delete). Used by the offscreen recorder and the Recordings page. |
src/offscreen.* |
Chrome/Edge offscreen document: records the tab stream plus crew sound, saves to recstore. |
src/recordings.* |
Recordings page: play, save, delete and split saved recordings. |
src/popup.* |
Toolbar popup: ON button, quick settings, intro-shape dropdown, Record checkbox (hidden in Firefox). |
src/autoplay.js |
Tiny content script, registered only on auto-play sites; asks the background to start. |
src/options.* |
Options page (theme, crew size, speed, name tags), saved in storage.sync. |
src/manifest.base.json |
Shared manifest; scripts/manifest.mjs adds per-browser fields. |
scripts/build.mjs |
npm run build → dist/chrome, dist/edge, dist/firefox. |
scripts/make-icons.mjs |
Regenerates src/icons/*.png (no dependencies). |
demo/index.html |
Test page. npm run demo serves the repo at http://127.0.0.1:8731/demo/. |
test/*.test.mjs |
node:test unit tests (npm test). |
npm test: unit tests (must pass before any commit).npm run build: build all three browsers into dist/ (git-ignored).npm run demo: static server for demo/ and src/.chrome://extensions → Developer mode → Load unpacked → dist/chrome.
Firefox → about:debugging#/runtime/this-firefox → Load Temporary Add-on → dist/firefox/manifest.json.core.js with a unit test. engine.js stays the only DOM code.core.js and themes.js use the UMD wrapper (global in the browser, module.exports in Node). Keep it.globalThis.browser || globalThis.chrome. Never feature-gate on the user agent.activeTab, scripting, storage; site access is optional_host_permissions,
requested only from the options page for auto-play. Adding one needs a clear reason in the PR.
The one exception: tabCapture and offscreen, in the Chrome and Edge manifests only (never
Firefox), to record the tab with sound without the screen-share picker.task.screen, sx/sy) and drawn in screenRoot, and syncScreen(t) turns
that into page coordinates when an agent picks the task up; consecutive inline nodes in a block with
block children are one text run (emitRun).Sound.unlock), otherwise Chrome logs a warning
into the extension’s Errors list on every run.Core.hudStatus (unit tested); updateHud refreshes it five times a second.demo/index.html has a sticky nav, a fixed pill, lists, a quote, a link with ::after and a
mixed-content block: compare the rebuilt page with the real one at the same scroll position.core.js + themes.js + sound.js + engine.js via the DevTools protocol and call
window.__cursorCrew.toggle(settings, shot). Check Wikipedia and Stripe, not just the demo page.#__cursor-crew-host. Never touch the page’s own DOM or styles.runScript, scaled by Core.timeFactor (2.1–4.5× depending on scroll
speed and backlog, times the 1×/2×/3× setting). Base waits in the scripts are “slow” on purpose.
Removals use timers, not onfinish, because animations stall in background tabs.core.js and is unit tested: readyTasks (once per frame) → pickFromReady
(on-screen first, then top-down), propagateUnlock, crewTarget / shouldSpawn / shouldLeave.
The unlock line (unlockMark) only moves down; scrolling back up never re-locks work.Use the Superpowers skills for every task. Invoke the skill before acting, even for clarifying questions.
superpowers:brainstorming first (understand intent, pick an
approach, short design), then superpowers:writing-plans.superpowers:subagent-driven-development (independent tasks) or
superpowers:executing-plans (inline).superpowers:test-driven-development: failing test first for anything in core.js,
themes.js or scripts/; for engine.js, verify in a real browser on demo/index.html.superpowers:systematic-debugging before proposing a fix.superpowers:verification-before-completion: run npm test and
npm run build, and check the change on the demo page. Report what was and wasn’t verified.superpowers:requesting-code-review, then superpowers:finishing-a-development-branch.superpowers:dispatching-parallel-agents. Isolation → superpowers:using-git-worktrees.Also follow andrej-karpathy-skills:karpathy-guidelines: small, surgical changes, no speculative
abstractions, and state your assumptions.
git@github-iamramishka:iamramishka/Launch_Live.git (SSH alias in ~/.ssh/config → key id_ed25519_iamramishka).main for features. Never force-push or push to main without the user’s OK.This project has a knowledge graph at graphify-out/ with god nodes, community structure, and cross-file relationships.
Rules:
graphify query "<question>" before your first grep, search or source-file read for a codebase question, and put this rule in every subagent prompt that explores code. Read raw files only for lines the graph or an earlier read already located. Use graphify path "<A>" "<B>" for relationships and graphify explain "<concept>" for focused concepts. These return a scoped subgraph, usually much smaller than GRAPH_REPORT.md or raw grep output.graphify update . to keep the graph current (AST-only, no API cost).