Each skill is a focused instruction set for coding agents (Cursor, Claude Code, and
similar). Attach the skill that matches your task so the model loads the right contracts,
tooling, and checklists before it writes code.
Prompts
Ready-to-use prompts for common Cartesi tasks. Copy one into your agent chat — each pins
the right skills, stack, and deliverables so the model loads the right docs before it
writes code.
Scaffold a new app
Build a Cartesi Rollups v2 JavaScript app called "echo-app".
Use the cartesi-scaffold and cartesi-backend-js-ts skills. Scaffold with
cartesi create, implement advance/inspect handlers, and give me the exact
commands to build and run locally.
Debug an issue
My Cartesi advance handler rejects every input with status reject.
Use the cartesi-debug skill and Cartesi MCP to find relevant docs.
Show me what to check in my /finish loop and handler validation.
Add a frontend
Add a React frontend to my Cartesi Rollups v2 app using cartesi-frontend.
Wire wallet connect, send inputs via InputBox, and read state via JSON-RPC.
Use @cartesi/wagmi and @cartesi/viem.
Deploy
Walk me through self-hosted deployment for this Cartesi Rollups v2 app.
Use the cartesi-deploy skill and point me to the exact CLI and Docker steps.
Asset handling
Build a Cartesi Rollups v2 app called "cartesi-wallet" that behaves like a simple
custodial wallet inside the Cartesi machine.
Use cartesi-scaffold, cartesi-backend-core, and cartesi-backend-js-ts. Follow
Cartesi Rollups v2 asset handling for ETH, ERC-721, and ERC-1155 (single and
batch) portal deposits and withdrawals.
Requirements:
- Support deposits, internal balances, transfers, and withdrawals for:
1) ETH
2) ERC-721
3) ERC-1155 single transfer
4) ERC-1155 batch transfer
- Define canonical payload schemas for every action (deposit, transfer, withdraw).
- Implement advance handlers with strict validation and deterministic state updates.
- Expose inspect endpoints to query balances, owned NFTs, and transfer history.
- Include replay-safe idempotency rules for repeated messages.
- Add tests for happy path + invalid payloads + double-withdraw prevention.
Implementation guidance:
- Use Cartesi Rollups v2 docs only.
- Scaffold with Cartesi CLI and show exact commands.
- Keep code modular: assets/, ledger/, handlers/, validation/, serialization/.
- For token standards, follow OpenZeppelin interface semantics.
- Return a final checklist: local run, test execution, and next hardening steps.
Bonding curve
Create a Cartesi Rollups v2 module named "bonding-curve-engine" for pricing and
mint/burn settlement.
Use cartesi-scaffold, cartesi-backend-core, cartesi-backend-js-ts, and
cartesi-local-dev.
Requirements:
- Implement at least two curve types:
1) Linear: P(s) = a + b*s (closed-form integral for buy/sell quotes)
2) Non-linear (e.g. exponential): approximate buy/sell cost with Monte Carlo
simulation inside the Cartesi machine (sample price paths or Riemann sums;
document sample count, integration bounds, and convergence tolerance)
- Add quoteBuy(amount), quoteSell(amount), executeBuy, executeSell.
- Floating-point math is acceptable inside the Cartesi machine for simulation and
curve evaluation; use a fixed RNG seed per input so results are reproducible
across runs. Serialize on-chain-facing amounts (notices, vouchers, reports) in
a deterministic integer encoding and document rounding toward the protocol.
- Define rounding policy (always round against trader) and document it.
- Enforce invariants: reserve solvency, monotonic price, non-negative supply.
- Add tests: closed-form checks for linear curves, Monte Carlo stability tests
(same seed => same quote), and edge cases (zero amount, max supply).
Cartesi-specific constraints:
- Deterministic execution across nodes for a given input payload and machine state.
- Explicit serialization format for inputs/outputs.
- Inspect endpoints for quotes, reserves, supply, curve parameters, and last
simulation metadata (samples used, seed, tolerance).
Output:
- Folder structure, implementation plan, and complete code.
- CLI commands to build, run, send sample inputs, and inspect state.