Are you the author? Sign in to claim
Code Flow Capture — a black-box browser recorder (Tampermonkey userscript + Claude Code skill) that captures a whole web
Turn "something broke" into a precise, replayable recording. Instead of a vague bug report — a screenshot, a half-remembered console error, a "it didn't work" — you get one JSON file that holds the whole flow: every network request and response (with bodies), every console line, every JS error, and every navigation, timestamped and in order. That file is the bug report.
This repo ships that idea as two products:
Both record the same thing. The difference is who presses record and where the recording goes.
cli-skill/What it is. A self-contained userscript
(code-flow-capture.user.js) you load
into DevTools or Tampermonkey. It records the whole flow to a local JSON, which
you hand to any LLM/CLI (Claude Code, or anything else) to find the failure and
propose a fix. Packaged as a Claude Code skill
with /capture, /start-capture, /stop-capture commands, but the recorder is
plain JS that works anywhere.
Who it's for. Developers and coding agents.
When to use it. You're debugging a flow yourself and want the exact network + console + error trace around the failure, without transcribing anything.
→ cli-skill/README.md ·
analysis playbook
on-site/What it is. An embeddable widget + SDK your app mounts, backed by an ingest
server. When an end-user hits a bug they click the widget, reproduce it, review
what was captured (secrets already redacted client-side), consent, and submit.
The report lands in a database for the operator to triage. Ships as core/
(engine), sdk/ (widget + controller), server/ (Fastify ingest with pluggable
storage/auth), and db/ (schema + provider DDLs).
Who it's for. Your end-users — with an operator/support team on the receiving end.
When to use it. You want real users to report bugs from inside your product, and you want each report to arrive as a replayable session, not a screenshot.
→ on-site/README.md ·
Integrate the widget ·
Self-host the server ·
Build guide
| Product 1 — CLI / agent skill | Product 2 — On-site widget | |
|---|---|---|
| Audience | developer / coding agent | end-user (operator triages) |
| Delivery | paste a userscript (Console / Tampermonkey) | embedded widget + ingest server |
| Output | a local JSON file you hand to your agent | reports stored + triaged in an inbox |
| Redaction | none — mind what you capture | secrets masked client-side before send |
| Best when | you're debugging a flow yourself | a user hits a bug in production |
Both products emit the same { meta, events } JSON, defined once in
PROTOCOL.md (schema 1.1.0). Target that shape and any
producer works with any consumer — so anything that analyses one product's
capture analyses the other's. The agent playbook you use on a developer
capture reads a user-submitted report byte-for-byte the same way.
{
"meta": { "schemaVersion": "1.1.0", "startedAt": "…", "stoppedAt": "…", "url": "…", "events": 128 },
"events": [
{ "t": 0, "kind": "nav", "type": "pushState", "to": "…" },
{ "t": 1420, "kind": "fetch", "method": "POST", "url": "…/rebuild", "status": 422, "ok": false, "reqBody": "…", "resBody": "{\"error\":\"…\",\"code\":\"…\",\"details\":{…}}" },
{ "t": 1421, "kind": "console", "level": "error", "args": ["…"] }
]
}
A failed request carries the server's full { error, code, details } right in
resBody — nothing to transcribe.
Product 1 — record a flow yourself:
cli-skill/code-flow-capture.user.js,
copy it, and paste into DevTools → Console on the page under test (or
install it in Tampermonkey). Recording starts.code-flow-capture-<timestamp>.json downloads.cli-skill/README.md.Product 2 — let end-users report:
import { mountCaptureWidget } from "@code-flow-capture/sdk/widget"
mountCaptureWidget({ ingestUrl: "https://capture.example.com", appKey: "myapp" })
on-site/server/) with a database and env config.on-site/INTEGRATE.md (wire the widget),
on-site/SELF-HOST.md (deploy the server), and
on-site/BUILD-GUIDE.md (how the pieces fit).password / token / api-key, plus JWTs, Bearer …, and card-shaped
strings, are masked. (The paste-in developer recorder does not redact, so
treat its JSON as a private debug artifact and keep captures out of version
control.).gitignore keeps capture
JSON, .env files, and node_modules out of git by default.MIT — see LICENSE.
1000+ skills curated from Anthropic, Vercel, Stripe, and other engineering teams
Agent harness performance optimization with skills, instincts, memory, and security
Design enforcement with memory — keeps your UI consistent across a project
Detects 37 AI writing patterns and rewrites text with human rhythm across 5 voice profiles