project-capture
Skill10 starsChanged 2 months agoApache-2.0View on GitHub
Create portable page-analysis project folders (project.json, page.json, regions/, dom/, screenshots/, commands/, diffs/, metadata/, instructions/) with cleaned DOM snapshots, evidence-based auto-naming, and agent handoff packaging.
In this repository16 other files it gives its agents.
- browser-forensicsSkill
- browser-interactionSkill
- browser-state-recoverySkill
- dom-inspectionSkill
- dom-mutationSkill
- dom-targetingSkill
- extension-troubleshootingSkill
- human-like-interactionSkill
- mcp-troubleshootingSkill
- page-annotationSkill
- project-reconstructionSkill
- regression-testingSkill
- selector-recoverySkill
- tab-managementSkill
- viewport-testingSkill
- visual-dom-comparisonSkill
The file
Files
Skill: Project Capture
PURPOSE
Persist everything known about a page into a portable, plain-file folder that survives the browser session and can be consumed by any agent. The DOM snapshot is captured CLEANED — MCPDOM-injected artifacts excluded, secrets redacted before anything touches disk.
WHEN TO USE
- Starting multi-region analysis work that must outlive the current tab/session.
- Packaging page knowledge for another agent or another machine (
export_agent_package). - Rebuilding knowledge after a page redesign (compare old project vs new capture).
PREREQUISITES
- MCP server running with Node filesystem access (projects live under
.mcpdom_projects/). - Live page reachable (extension) or the Node simulation fixture for metadata defaults;
simulated: truepage data is used for url/title/viewport defaults when no browser is connected. - A unique project name (names are sanitized to lowercase kebab:
Checkout Redesign→checkout-redesign).
WORKFLOW
create_page_project {name, description?, url?, title?}— creates.mcpdom_projects/<name>/with the standard layout:project.json— manifest (schemaVersion, projectId, pages, regionCount, commandRecordingCount, timestamps, toolVersion)page.json— page manifest: url, title, capturedAt, viewport, domSnapshotFile, region list, browserStateregions/— region annotation JSON filesscreenshots/— region screenshots (PNG/JPEG)dom/— cleaned DOM snapshots:page_<pageId>.htmlplus per-region<regionId>.htmland<regionId>_context.htmlcommands/— command recordings (replayable)diffs/— DOM diff artifactsmetadata/—blueprint.json,reconstruction-spec.jsoninstructions/— agent-facing README with the reading order and semantics guarantee- url/title/viewport default from the live page when omitted.
- Capture regions into the project (page-annotation skill:
capture_page_region/annotate_element); each capture updatespage.jsonandproject.json(regionCount, updatedAt). - Let the naming engine work: regions get stable snake_case auto-names from role/text/aria-label/nearby headings/position evidence (
sidebar_navigation, neverelement_12345); user display names are stored alongside,autoNameis always preserved. - Record workflows into the project:
record_commands_start/record_commands_stop(recordings persist intocommands/). - Enrich:
get_page_blueprint {projectName}(metadata/blueprint.json) andgenerate_reconstruction_spec {projectName}(metadata/reconstruction-spec.json) — see the project-reconstruction skill. list_projects {}/get_project {projectName}— audit manifests, page and all region annotations.export_agent_package {projectName, outputDir?}— self-contained handoff package (default./mcpdom_agent_packages/<name>/): README.md, PROJECT.md, agent-instructions.md, project.json, pages/, regions/, snapshots/, diffs/, commands/, assets/, schemas/, verification/ — fully separating OBSERVED FACTS / USER REQUESTS / EXPECTED CHANGES / VERIFICATION CONDITIONS.- On the receiving side:
import_project {projectDir}restores manifest, page, regions, diffs and command recordings into working storage.
TOOLS
create_page_project, list_projects, get_project, delete_project, capture_page_region, annotate_element, get_page_blueprint, generate_reconstruction_spec, export_agent_package, import_project, record_commands_start, record_commands_stop
EXAMPLES
tools/call create_page_project { "name": "checkout-redesign", "description": "Regions and intended changes for the checkout page" }
tools/call capture_page_region { "projectName": "checkout-redesign", "selector": "form.payment", "intendedChange": "Two-column layout on desktop", "screenshot": true }
tools/call get_project { "projectName": "checkout-redesign" }
tools/call export_agent_package { "projectName": "checkout-redesign" }
tools/call import_project { "projectDir": "./mcpdom_agent_packages/checkout-redesign" }FAILURE MODES
- PROJECT_EXISTS — a project with that sanitized name already exists; choose another name or capture regions into the existing project.
- PROJECT_NOT_FOUND — region/spec/graph operations against a missing or misspelled name;
list_projectsto confirm the sanitized form. - Captured DOM looks "wrong" — injected extension UI is excluded by design and secrets are redacted; this is the clean contract, not data loss. Raw DOM is available via
get_live_dom_snapshotif truly needed (handle secrets yourself). - delete_project — irreversible file removal; export a package first if the knowledge must survive.
- Corrupt manifest in listing — corrupt project folders are skipped without crashing the listing; fix or delete them.
VALIDATION
get_projectreturns manifest + page + all regions in one payload; regionCount inproject.jsonmust equalpage.regions.length.- Region files exist under
regions/, their DOM underdom/with matching ids; screenshots underscreenshots/reference real bytes. - The package's README/agent-instructions document the reading order:
project.json→metadata/blueprint.json→regions/*.json→metadata/reconstruction-spec.json.
RECOVERY
- Wrong project name/sanitization surprise:
list_projectsshows the actual folder names; names map to[a-z0-9-_]kebab, max 60 chars. - Partial capture interrupted: the manifests update per region, so re-capture the missing regions — the project is always in a consistent state.
- Package import on another machine:
import_projectthen verify withget_projectbefore replaying anything.
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.

