capture-app-flow
БесплатноБез исполняемых скриптовНе проверенCapture ivc-inputs.msgpack from an external/third-party Aztec app's transaction flow so it can be proven and benchmarked like a pinned Chonk flow. Use when…
от AztecProtocol★ 458 звёзд на GitHubОб этом скилле
Capture an external app's flow as Chonk IVC inputs
An external app (consuming published @aztec/* npm packages) proves its private txs client-side via Chonk IVC. To benchmark or debug that proving — or to find why it got slower after an Aztec version bump — capture the app's flow into ivc-inputs.msgpack files, then prove them with bb exactly like the pinned flows in barretenberg/cpp/chonk-pinned-flows/.
This skill covers the capture (the novel part). For the downstream proving/benchmarking, hand the resulting msgpack files to the benchmark-chonk skill; for the pinned-input machinery, see chonk-inputs.
Two modes. Capturing a flow (Steps 1–4) is single-version: point the toolchain at the app's pinned @aztec/* version, capture, and you have the msgpacks. Chasing a regression (Step 5) is an optional overlay — capture the same flow from two versions and compare. If you only need the msgpacks (e.g. adding a flow to the benchmark set), stop after Step 4.
Measure cheapest-first: native bb for the trend, gate counts to explain it, and WASM only when the change is prover-side — Step 5 has the decision logic.
Mental model
Capture goes through the public aztec.js API only: profile() (on ContractFunctionInteraction/DeployMethod) returns executionSteps, which serializePrivateExecutionSteps (from @aztec/stdlib/kernel) writes to ivc-inputs.msgpack. The one catch: profile() simulates and proves but does not send, so in a stateful flow you capture, then send each step on its correct pre-state:
import { serializePrivateExecutionSteps } from '@aztec/stdlib/kernel';
const i = contract.methods.step(...args);
const r = await i.profile({ profileMode: 'full', skipProofGeneration: false, from });
await writeFile(`${OUT}/<flow>_<step>/ivc-inputs.msgpack`, serializePrivateExecutionSteps(r.executionSteps));
await i.send({ from }); // land it so the next step sees the right pre-state
The in-repo bench harness works exactly this way — captureProfile in client_flows/benchmark.ts (called by the client_flows/*.test.ts flows) is a concrete reference — writing one file per labelled step under $CAPTURE_IVC_FOLDER/<label>/.
Step 1 — Identify the flow and the versions
In the app repo:
- Find the end-to-end flow that already drives the private txs against a local network. It's usually a single test file — one
describewith per-steptest()blocks and sharedbeforeAllsetup — that calls.send({ from })on each interaction in order, with all wallet/authwit/setup plumbing done. Instrument it rather than rebuild the flow. - Pin the app's Aztec version from the relevant
package.json(@aztec/aztec.jsetc.). Record it exactly — it is not interchangeable with aztec-packages repo HEAD. (Regression overlay: pin two versions, the "before" and "after", often on separate branches — e.g. a stable branch vs a version-bump branch.)
Typical shape. A multi-step app lifecycle (
step_1 → step_2 → … → step_n, each a private tx) driven by one*.e2e.test.ts(under whatever runner the app uses —bun:test,vitest,jest, …) againstaztec start --local-network. (For a regression, the same flow is captured once per pinned version.)
If the flow is only reachable in the browser
Prefer a local node environment whenever one is usable — a node-runnable test/script driven against aztec start --local-network (Steps 2–3) is by far the cheapest and most reliable path, and is what the rest of this skill assumes. Many apps that ship as a web app still have a node-side test, CLI, or script that exercises the same contract interactions; use that. Only fall back to the browser when the private txs are genuinely reachable only through the web UI.
In the browser case, capture still goes through the same aztec.js API — the only new problem is getting the bytes out of the page:
- Find where the app builds and proves the interaction (the wallet/PXE call that turns
contract.methods.foo(...)into a proof). The sameinteraction.profile({ profileMode: 'full', skipProofGeneration: true })runs client-side and returnsexecutionSteps; serialize them withserializePrivateExecutionStepsexactly as in Step 2. The browser WASM proving path is also the fidelity ground-truth — it captures precisely what the app proves in production. - Exfiltrate each step's msgpack from the page, gated behind a flag (a
?capture=1query param or a build-time env). Pick whichever the app makes easiest: trigger aBlob+ anchor download per step,fetch('http://localhost:9000/<label>', { method: 'POST', body })to a tiny local sink server, or stash into IndexedDB and read it out afterwards. Keep the same one-folder-per-step layout (<flow>_<step>/ivc-inputs.msgpack) once the files land on disk.
From there, proving and benchmarking (Steps 4–5) are identical — the msgpack is the same artifact regardless of where it was c
Установить capture-app-flow в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл capture-app-flow?
Capture ivc-inputs.msgpack from an external/third-party Aztec app's transaction flow so it can be proven and benchmarked like a pinned Chonk flow. Use when investigating a client-side proving perf regression in an app that consumes published @aztec/* packages (e.g. across a major version bump), or when adding a new app flow to the Chonk benchmark set.
Как установить скилл capture-app-flow?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл capture-app-flow запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic