diff --git a/cartesi-rollups_versioned_docs/version-2.0/build-with-ai/mcp-server.mdx b/cartesi-rollups_versioned_docs/version-2.0/build-with-ai/mcp-server.mdx
new file mode 100644
index 00000000..661b7dc8
--- /dev/null
+++ b/cartesi-rollups_versioned_docs/version-2.0/build-with-ai/mcp-server.mdx
@@ -0,0 +1,162 @@
+---
+title: MCP Server
+resources:
+ - url: https://modelcontextprotocol.io/docs/getting-started/intro
+ title: MCP Server Standard
+---
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+The Cartesi MCP server is a read-only knowledge service your AI assistant connects to for Cartesi-specific context. Instead of guessing CLI flags or hallucinating APIs, your assistant can query curated documentation routes, repositories, articles, and skills. Many of the resources are returned inline without fetching external URLs.
+
+The server runs at `https://server.mcp.mugen.builders/mcp`. No API key or local install is required; add the URL to your MCP client and connect.
+
+Once connected, your assistant can:
+
+- Look up **CLI commands** matched to the Cartesi CLI version you have installed
+- Pull **step-by-step skills** for local dev bootstrapping, frontend and backend development, asset deposits, L1 contract interactions, and on-chain deployment
+- **Search** documentation routes, repositories, and articles by topic for deeper context
+- Prepare **workflow commands** (`cartesi create`, `cartesi build`, `cartesi run`, deposits, and inputs) as instructions to run on your machine; the MCP server does not execute the CLI for you
+
+## Connect your client
+
+
+
+
+
+1. Open **Settings**.
+2. In the sidebar, click **Tools and MCPs**, then select **New MCP Server**.
+3. Cursor opens your MCP config file (`~/.cursor/mcp.json` globally, or `.cursor/mcp.json` in your project). Add:
+
+```json
+{
+ "mcpServers": {
+ "cartesi-mcp": {
+ "transport": "http",
+ "url": "https://server.mcp.mugen.builders/mcp"
+ }
+ }
+}
+```
+
+4. Restart Cursor, then verify under **Settings → Tools and MCPs** that `cartesi-mcp` is connected.
+
+
+
+
+
+1. Install the [Claude CLI](https://docs.anthropic.com/en/docs/claude-code), then add the server:
+
+```shell
+claude mcp add --transport http cartesi https://server.mcp.mugen.builders/mcp
+```
+
+2. Restart Claude Code (or start a new conversation).
+3. Run `/mcp` and confirm `cartesi` appears in the list of active MCP servers.
+
+
+
+
+
+1. Add the server:
+
+```shell
+codex mcp add cartesi-mcp --url https://server.mcp.mugen.builders/mcp
+```
+
+2. Verify it was added:
+
+```shell
+codex mcp list
+```
+
+
+
+
+
+Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
+
+```json
+{
+ "mcpServers": {
+ "cartesi-mcp": {
+ "type": "streamable-http",
+ "url": "https://server.mcp.mugen.builders/mcp"
+ }
+ }
+}
+```
+
+Restart Claude Desktop after saving.
+
+
+
+
+
+Add to `.vscode/mcp.json` in your project:
+
+```json
+{
+ "servers": {
+ "cartesi-mcp": {
+ "type": "http",
+ "url": "https://server.mcp.mugen.builders/mcp"
+ }
+ }
+}
+```
+
+Restart VS Code after saving. Requires GitHub Copilot with MCP support enabled.
+
+
+
+
+
+For any other MCP-compatible client, point it at `https://server.mcp.mugen.builders/mcp` using HTTP transport.
+
+## Getting started
+
+Once connected, a typical workflow looks like this:
+
+1. **Scaffold or extend an app**, e.g. *"Create a Cartesi Rollups v2 JavaScript echo app using cartesi-scaffold"*
+2. **Run locally**, e.g. *"Give me the exact cartesi build and cartesi run commands for this project"*
+3. **Interact and debug**, e.g. *"How do I send an ERC-20 deposit to my app?"* or *"My advance handler is rejecting inputs; help me debug"*
+
+:::tip Demo
+See the MCP server in action: [demo video](https://drive.google.com/file/d/1a0Ad4qgXY8ebjYtJXt0ycq8vtG95VlsM/view?usp=drive_link). Claude scaffolds a Cartesi app from a single prompt, builds and runs it locally, interacts via text input and token deposits, and deploys to Base Sepolia.
+:::
+
+## Available tools
+
+The server exposes developer-facing tools in three categories:
+
+**Knowledge search**: find curated Cartesi resources and documentation routes:
+
+- `search_knowledge_resources`: search repos, articles, docs, and skills by topic
+- `search_documentation_routes`: find docs pages by keyword
+- `get_resource_detail`: fetch metadata and related doc routes for a resource
+- `list_resources_for_tag` / `list_resources_for_source`: browse by tag or source
+- `list_resource_doc_routes`: list documentation routes linked to a resource
+- `get_knowledge_taxonomy` / `summarize_knowledge_base`: explore what the knowledge base covers
+
+**Workflow helpers**: generate step-by-step instructions to run on your machine:
+
+- `prepare_cartesi_create_command`: scaffold a new app with the correct CLI flags for your CLI version
+- `prepare_cartesi_build_command` / `prepare_cartesi_run_command`: build and run locally
+- `send_input_to_application`: send generic inputs or deposits via the CLI
+- `prepare_erc20_deposit_instructions` / `prepare_erc721_deposit_instructions` / `prepare_erc1155_deposit_instructions`: portal deposit workflows
+- `get_cartesi_app_logic_guidance`: guidance for advance/inspect handlers, address-book usage, and outputs
+- `build_debugging_context`: assemble docs and resources for a debugging query
+
+**Prompts**: reusable prompt templates your assistant can invoke:
+
+- `find_cartesi_docs`: locate the best documentation for a topic
+- `debug_cartesi_issue`: investigate an error using curated knowledge
+- `explain_repository_context`: understand a Cartesi repo before making changes
diff --git a/cartesi-rollups_versioned_docs/version-2.0/build-with-ai/overview.md b/cartesi-rollups_versioned_docs/version-2.0/build-with-ai/overview.md
new file mode 100644
index 00000000..947d31a9
--- /dev/null
+++ b/cartesi-rollups_versioned_docs/version-2.0/build-with-ai/overview.md
@@ -0,0 +1,187 @@
+---
+title: Overview
+---
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+AI coding assistants can scaffold, implement, and debug Cartesi applications quickly, but without Cartesi-specific context they often guess CLI flags, mix up v1 and v2 APIs, or invent workflows.
+
+Using the right tools, you get faster iteration-handlers, contracts, and frontends from natural-language prompts-and less context switching, with version-aware CLI commands and doc links inline instead of hunting through tabs. This section gives your assistant structured knowledge and tools to build and ship applications quickly and reliably.
+
+## How it works
+
+Multiple pieces work together to learn and build with AIs:
+
+1. **[Documentaion](#documentation-indexing-and-usage)**: Usage of [llms.txt](https://docs.cartesi.io/llms.txt) gives your assistant a machine-readable index of all Cartesi docs.
+2. **[MCP server](./mcp-server.mdx)**: Connects your editor to curated Cartesi docs, repos, articles, and skills.
+3. **[Skills](./skills.md)**: Loads focused instructions (scaffold, backend, frontend, deploy, debug)
+4. **[Prompting](./prompting.md)**: Interactive way to put the knowledge and skills of the AI assistant in practice.
+
+## Documentation indexing and usage
+
+Cartesi docs publish machine-readable indexes so AI assistants can discover pages and fetch raw Markdown without scraping HTML. Use these files when your client does not have MCP connected, or when you want a lightweight doc dump in context.
+
+### Documentation index
+
+Fetch the complete documentation index at: [https://docs.cartesi.io/llms.txt](https://docs.cartesi.io/llms.txt)
+
+`llms.txt` lists every indexed page with links to raw Markdown sources, version-priority notes (default to Rollups v2.0), and a documentation map. Agents should read this file first to discover which pages to fetch for a given task.
+
+### Per-page Markdown
+
+Any docs page can be fetched as Markdown by appending `.md` to its URL. For example:
+
+- Page: `https://docs.cartesi.io/cartesi-rollups/2.0/build-with-ai/overview`
+- Source: `https://docs.cartesi.io/cartesi-rollups/2.0/build-with-ai/overview.md`
+
+On any docs page, use the **Copy page** widget in the table of contents sidebar to copy the page as Markdown, open the `.md` URL directly, or send the link to ChatGPT, Claude, or Gemini. Use this when you need a single page in context instead of the full corpus.
+
+### Full documentation file
+
+If your AI tool does not support MCP yet, you can use a static documentation file instead. This gives your assistant the entire Cartesi documentation corpus as one text file.
+
+Download or reference: [https://docs.cartesi.io/llms-full.txt](https://docs.cartesi.io/llms-full.txt)
+
+### Setup Static Documentation
+
+
+
+
+
+[Cursor](https://cursor.com/) can index external documentation for `@docs` references in chat.
+
+1. Open **Cursor Settings** → **Indexing & Docs** → **Docs**.
+2. Click **Add new doc** and paste: `https://docs.cartesi.io/llms-full.txt`
+3. In chat, reference the docs source (for example `@docs` → your Cartesi entry) when you want the assistant to ground answers in official documentation.
+
+For live Cartesi-specific tools (CLI commands, skills, repo search), also connect the [MCP server](./mcp-server.mdx).
+
+
+
+
+
+[Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview) can include static doc files in a session.
+
+1. Download the static documentation file from [https://docs.cartesi.io/llms-full.txt](https://docs.cartesi.io/llms-full.txt), or fetch the index at [https://docs.cartesi.io/llms.txt](https://docs.cartesi.io/llms.txt) and pull individual `.md` pages as needed.
+2. Save the file in your project directory or another known location.
+3. Reference it in chat with `/read` or by attaching the file path so Claude Code has Cartesi documentation for that session.
+
+For ongoing work, add the Cartesi MCP server to your project's `.mcp.json` (see [MCP server](./mcp-server.mdx)) so lookups stay current without re-downloading `llms-full.txt`.
+
+
+
+
+
+[Codex CLI](https://github.com/openai/codex) loads an `AGENTS.md` file from your project root into context for every session.
+
+1. Download the static documentation file to your project:
+
+ ```shell
+ curl -fSL https://docs.cartesi.io/llms-full.txt -o docs/cartesi-llms-full.txt
+ ```
+
+2. Add a pointer in `AGENTS.md` at the repo root so Codex grounds answers in Cartesi docs:
+
+ ```md
+ # Cartesi context
+
+ This project targets **Cartesi Rollups v2**. When answering questions or
+ generating code:
+
+ - Read `docs/cartesi-llms-full.txt` for the full Cartesi documentation corpus.
+ - Default to `/cartesi-rollups/2.0/` routes; do not surface v1.x APIs unless asked.
+ - Prefer fetching individual pages from `https://docs.cartesi.io/.md` when
+ you need fresh, focused context.
+ ```
+
+3. In a session, reference the file directly with `@docs/cartesi-llms-full.txt` when you want the assistant to ground a specific answer in docs.
+
+For live tooling, also connect the [MCP server](./mcp-server.mdx).
+
+
+
+
+
+[Claude Desktop](https://claude.ai/download) supports **Projects** with persistent knowledge files.
+
+1. Download the static documentation file: [https://docs.cartesi.io/llms-full.txt](https://docs.cartesi.io/llms-full.txt)
+2. In Claude Desktop, create a new **Project** (for example, "Cartesi Rollups v2").
+3. Open **Project knowledge** and upload `llms-full.txt` (rename to `cartesi-llms-full.txt` if you keep multiple sources).
+4. Add a short **Project instructions** entry such as:
+
+ > Default to Cartesi Rollups v2.0. Use the attached `cartesi-llms-full.txt` as the source of truth. Do not surface v1.x APIs unless explicitly asked.
+
+5. Start a new chat inside the project; Claude will ground answers in the uploaded docs.
+
+For live tools (CLI commands, skills, repo search), connect the [MCP server](./mcp-server.mdx) in Claude Desktop's MCP config.
+
+
+
+
+
+[GitHub Copilot in VS Code](https://code.visualstudio.com/docs/copilot/overview) reads custom instructions from `.github/copilot-instructions.md` and lets you attach files to chat with `#file:`.
+
+1. Download the static documentation file into your repo:
+
+ ```shell
+ curl -fSL https://docs.cartesi.io/llms-full.txt -o docs/cartesi-llms-full.txt
+ ```
+
+2. Create `.github/copilot-instructions.md` (or extend the existing one) with a Cartesi grounding block:
+
+ ```md
+ This repository builds on **Cartesi Rollups v2**.
+
+ - Use `docs/cartesi-llms-full.txt` as the source of truth for Cartesi APIs,
+ CLI commands, and deployment.
+ - Default to `/cartesi-rollups/2.0/` routes; ignore v1.x guidance unless asked.
+ - When generating CLI steps, prepare commands for the user to run locally.
+ ```
+
+3. In Copilot Chat, attach the file on demand with `#file:docs/cartesi-llms-full.txt` when you want the assistant to cite specific Cartesi docs.
+
+For live, version-aware tooling, also connect the [MCP server](./mcp-server.mdx) via VS Code's MCP support.
+
+
+
+
+
+Alternatively, you can use the [Cartesi MCP server](./mcp-server.mdx) to get the latest documentation and skills.
+
+## Best Practices
+
+AI-assisted development is powerful, but it is not a substitute for good engineering judgment. Treat every generated command, dependency, and deployment step as untrusted until you understand and verify it.
+
+### Security
+
+- **Never paste private keys, mnemonics, or production secrets into prompts.** Use testnet keys, local dev accounts, and environment variables your assistant never sees.
+- **Review before you run.** Agents can propose shell commands, config changes, or contract deployments that look correct but are wrong or harmful. Read diffs and commands before approving them.
+- **Audit generated code.** Especially for Solidity, wallet flows, and anything that moves funds. AI can miss edge cases, use deprecated APIs, or introduce subtle bugs.
+- **Trust your toolchain.** Only install MCP servers, skills, and editor plugins from sources you recognize. A malicious plugin or MCP server could exfiltrate files, env vars, or keys from your machine.
+- **Limit blast radius.** Prefer testnets and disposable wallets for AI-assisted deployment. Do not point agents at mainnet credentials or production infrastructure.
+
+### Costs and model quality
+
+- **Free or lightweight models** are fine for boilerplate and docs lookup, but they hallucinate more often and struggle with multi-step Cartesi workflows.
+- **Frontier models** (paid tiers) are usually better at following skills, chaining CLI steps, and debugging but usage-based billing adds up quickly on long agent sessions.
+- **Token usage grows fast** when you attach large repos, full doc dumps, or long chat histories. Scope context to what the task needs.
+
+### Agent access and sandboxing
+
+- **Agents may read and write files, run terminals, and call MCP tools** depending on your client settings. Understand what your editor allows before enabling auto-run or broad file access.
+- **Use sandboxing where your client supports it**: restrict network access, require approval for terminal commands, and avoid giving an agent unrestricted access to your home directory or `.env` files.
+- **The Cartesi MCP server is read-only**, but other MCP servers or built-in tools in your client may not be. Review every MCP server you connect.
+- **Separate dev from production.** Do not run AI agents in directories that contain production keys, customer data, or unreleased IP you cannot afford to leak.
+
+### Other limitations
+
+- **Models can still guess.** Even with the Cartesi MCP server and skills, assistants may mix API versions, invent flags, or skip steps. Cross-check against official docs.
+- **Early-release tooling.** Cartesi Skills and the MCP server are evolving; expect gaps, breaking changes, and incomplete coverage.
+- **You own the outcome.** AI speeds up scaffolding and iteration; shipping safely still requires tests, manual review, and your own deployment discipline.
\ No newline at end of file
diff --git a/cartesi-rollups_versioned_docs/version-2.0/build-with-ai/prompting.md b/cartesi-rollups_versioned_docs/version-2.0/build-with-ai/prompting.md
new file mode 100644
index 00000000..6818bda2
--- /dev/null
+++ b/cartesi-rollups_versioned_docs/version-2.0/build-with-ai/prompting.md
@@ -0,0 +1,253 @@
+---
+title: Prompting
+---
+
+Effective prompting helps your AI assistant use Cartesi docs, skills, and the MCP server reliably. Clear prompts tell the assistant what to generate and which skill or doc source to follow.
+
+## Anatomy of a strong prompt
+
+The best prompts are as specific as possible. They pin the version, name the stack, define module boundaries, list deliverables, and state constraints. Your prompts should mirror that shape. Vague prompts make the assistant guess while risky prompts let it guess in places where guesses cost money, leak keys, or push bad code.
+
+Use these three tiers as a quick check before sending a prompt.
+
+### Effective: specific, scoped, version-aware
+
+An effective prompt typically:
+
+- Pins **Cartesi Rollups v2** and any relevant chain or network.
+- Names the **skill(s)** to load and the **stack** (language, framework, package versions).
+- Lists **deliverables** (folder structure, CLI commands, tests, inspect routes).
+- States **constraints** (deterministic execution, module boundaries, reproducible simulation seeds where needed).
+- Tells the assistant to **prepare commands for you to run**, not to execute them.
+
+```text
+Build a Cartesi Rollups v2 JavaScript app called "order-book".
+
+Use cartesi-scaffold, cartesi-backend-core, cartesi-backend-js-ts, and
+cartesi-contracts. Stack: JS template, Foundry for any L1 contracts, vanilla CSS
+for any harness. Pin Cartesi alpha packages explicitly.
+
+Deliverables:
+- Folder structure: handlers/, validation/, inspect/, assets/.
+- advance_state for new/cancel order; inspect routes for /book and /trades.
+- README with exact cartesi build / run / send commands.
+- Unit tests for handler validation and double-cancel prevention.
+
+Constraints:
+- Do not execute commands; print them for me to run.
+- Use only v2 APIs (/cartesi-rollups/2.0/...).
+- Reject malformed advances; never silently accept.
+```
+
+### Vague: missing version, stack, or deliverables
+
+Vague prompts force the assistant to guess. It will often pick the wrong API version, the wrong template, or invent CLI flags.
+
+Common symptoms: no v2 pin, no skill name, no stack, no description of what the answer should look like.
+
+```text
+Make me a Cartesi app for an order book. Add a frontend too.
+```
+
+Likely failure modes:
+
+- Mixes v1 and v2 CLI commands.
+- Picks a random template (Python? Rust? JS?) without asking.
+- Skips inspect routes, validation, or tests.
+- Ships a frontend pointed at the wrong port or chain ID.
+
+### Risky: invites the agent into places it shouldn't go
+
+A prompt is risky when it grants the agent power, secrets, or production scope without guardrails. These prompts can produce code or commands that move funds, leak keys, or silently deploy to the wrong network.
+
+Watch for:
+
+- Asking the agent to **execute** rather than **prepare** commands.
+- Pasting **private keys**, **mnemonics**, or `.env` contents into the chat.
+- Pointing at **mainnet** RPCs or keys "just for a quick test".
+- Skipping **review** ("just commit and push it").
+- Asking for **production deployment** from skills that are explicitly testnet-style.
+
+```text
+Deploy my Cartesi app to mainnet now. Here's my private key: 0xabc...
+Use forge script and broadcast everything. Don't ask me to confirm anything.
+Also commit and push to main when you're done.
+```
+
+What to do instead:
+
+- Stay on **testnets** with **dev keys** while iterating.
+- Ask the assistant to **print** CLI / `cast` / `forge` commands; you run them.
+- Have it **diff and explain** changes before any commit.
+- Read [Overview → Exercise caution](./overview.md#exercise-caution) before widening the agent's access.
+
+## Prompt patterns
+
+### Spec-driven development
+
+Use this pattern when you want requirements locked before code: explicit user stories, tests that trace to those stories, a Cartesi Rollups v2 backend implementation, then a verification step where you run the tests locally. This avoids agents inventing APIs, skipping validation, or getting lost during vibe coding.
+
+```text
+Drive this work spec-first for a Cartesi Rollups v2 app called "voting-app".
+
+Use cartesi-scaffold, cartesi-backend-core, cartesi-backend-js-ts, and
+cartesi-local-dev. Scope: Cartesi machine backend only (advance/inspect,
+validation, state). No frontend unless I ask later.
+
+Step 1 — Spec and user stories:
+- Read my requirements below and produce SPEC.md with:
+ - User stories (required), each with ID US-001, US-002, ...
+ Format: "As a , I want , so that ."
+ Add acceptance criteria (Given / When / Then) per story.
+ - Map each story to advance actions, inspect routes, or reject paths.
+ - Actors, inputs, and state transitions.
+ - Payload schemas for every advance input and inspect route.
+ - Invariants (one vote per address per proposal, no votes after deadline).
+ - Error cases and how each is rejected.
+- Stop after SPEC.md and wait for my approval.
+
+Step 2 — Plan and test scripts:
+- After I approve SPEC.md, generate PLAN.md (folder layout, modules, data flow).
+- Add a failing test suite that covers every user story in SPEC.md:
+ - Name tests after story IDs (e.g. US-003_reject_vote_after_deadline).
+ - Cover happy path, validation failures, and inspect responses per story.
+ - Use the project's test runner (e.g. npm test / pytest) for handler and
+ validation logic; document any Cartesi CLI smoke checks separately.
+- Do not implement production handlers yet.
+
+Step 3 — Cartesi backend implementation:
+- Only after I approve PLAN.md, implement the Rollups v2 backend to make tests
+ pass: advance_state, inspect handlers, validation/, serialization as needed.
+- Deliver backend code plus the test files from Step 2 (updated to pass).
+- Keep changes scoped to SPEC.md and user story IDs. Flag gaps; do not guess.
+- Do not run tests or cartesi commands in this step.
+
+Step 4 — Verify (I run locally):
+- Print exact commands for me to run, in order:
+ 1) Install deps (if needed)
+ 2) Run the full test suite
+ 3) cartesi build and cartesi run (if applicable)
+ 4) Sample cartesi send / inspect commands to manually confirm one story
+- Summarize expected outcomes per user story ID after each command group.
+
+Constraints:
+- Cartesi Rollups v2 only. Pin alpha packages explicitly.
+- Every test and code change must trace to a user story ID in SPEC.md.
+- Print CLI commands for me to run; do not execute them.
+
+Requirements:
+- Proposals with a title, options, and a deadline.
+- advance_state actions: create_proposal, cast_vote, close_proposal.
+- inspect routes: /proposals, /proposals/:id, /results/:id.
+```
+
+### Scaffold a new app
+
+```text
+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
+
+```text
+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
+
+```text
+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
+
+```text
+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.
+```
+
+## Application prompts
+
+Use these prompts when you want practical, production-oriented building blocks instead of toy examples.
+
+### Build a simple Cartesi wallet (multi-asset)
+
+```text
+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.
+```
+
+### Build bonding curve math in Cartesi
+
+```text
+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.
+```
+
+### Other DeFi essentials to prompt next
+
+- **AMM core (x*y=k)**: swaps, LP mint/burn math, fee accounting, slippage checks
+- **Lending risk engine**: collateral factors, health factor, liquidation thresholds
+- **Perps/funding module**: mark/index price handling, funding-rate accrual, margin checks
+- **Staking + rewards distributor**: epoch accounting, reward debt math, emergency withdraw
+- **Treasury + timelock governance**: queued actions, execution delays, role-based controls
diff --git a/cartesi-rollups_versioned_docs/version-2.0/build-with-ai/skills.md b/cartesi-rollups_versioned_docs/version-2.0/build-with-ai/skills.md
new file mode 100644
index 00000000..a4a13c2f
--- /dev/null
+++ b/cartesi-rollups_versioned_docs/version-2.0/build-with-ai/skills.md
@@ -0,0 +1,65 @@
+---
+title: Skills
+resources:
+ - url: https://agentskills.io/home
+ title: Agent Skills standard
+ - url: https://skills.mugen.builders/
+ title: Browse and copy Cartesi skills
+ - url: https://youtu.be/wep_ZEPKt8s
+ title: Cartesi skills setup walkthrough
+---
+
+**Cartesi Skills** are lightweight, specialized instructions for AI agents. Each skill covers a focused task: scaffolding a new app, building backend logic, wiring a frontend, interacting with L1 contracts, or deploying to a self-hosted node.
+
+Cartesi Skills follow the open [Agent Skills](https://agentskills.io/home) format. For a similar pattern in the broader Ethereum ecosystem, see [eth-skills](https://www.ethskills.com/).
+
+## What's included
+
+The current release ships **10 skills plus a workflow skill** that routes you to the right skill for each phase:
+
+- **`cartesi-workflow`**: map a full-stack application build and pick the next skill
+- **`cartesi-scaffold`**: create a new Rollups v2 app with `cartesi create`
+- **`cartesi-backend-core`**: implement advance/inspect handlers and the `/finish` loop
+- **`cartesi-backend-js-ts`**: build a JavaScript or TypeScript backend
+- **`cartesi-backend-py`**: build a Python backend
+- **`cartesi-frontend`**: wire wallet, InputBox, JSON-RPC, and inspect in a UI
+- **`cartesi-contracts`**: write Solidity/Foundry contracts that call InputBox and portals
+- **`cartesi-local-dev`**: run `cartesi build` / `cartesi run`, test locally or on a fork
+- **`cartesi-jsonrpc`**: query a running node over JSON-RPC
+- **`cartesi-deploy`**: deploy and operate a self-hosted rollups node
+- **`cartesi-debug`**: diagnose errors across the stack
+
+## Get started
+
+### Install into your project
+
+The recommended way to use Cartesi Skills is to install them into your project so your assistant loads them from `.agents/skills/` automatically.
+
+From your project root, add the Cartesi skills package:
+
+```shell
+npx skills add Mugen-Builders/cartesi-skills
+```
+
+Confirm the skills appear under `.agents/skills/` (one folder per skill, each with a `SKILL.md`). Restart your editor or start a new agent session so the client picks up the new files. In your next prompt, name the skill you need (for example `cartesi-scaffold` or `cartesi-backend-js-ts`); see [Prompting](./prompting.md) for examples.
+
+Watch the **[skills setup walkthrough](https://youtu.be/wep_ZEPKt8s)** for a full install-and-verify flow in Cursor or another Agent Skills-compatible client.
+
+### Use skills with MCP or on their own
+
+Once installed, you can still use skills in two ways:
+
+- **Through the [Cartesi MCP server](./mcp-server.mdx)**: skills are bundled in the knowledge base and returned inline when your assistant queries the server, so you do not have to paste skill text into every chat.
+- **On their own**: your assistant reads skill files directly from `.agents/skills/` when you name them in a prompt. You do not need to connect to the MCP server in this case.
+
+### Browse and copy (optional)
+
+If you prefer to inspect or copy a single skill without installing the full set, use [skills.mugen.builders](https://skills.mugen.builders/) to browse each skill and paste the content into your agent context.
+
+### Source and contributions
+
+The canonical source lives in the [cartesi-skills](https://github.com/Mugen-Builders/cartesi-skills) repository on GitHub. Open an issue or pull request there if you spot gaps, want a new skill, or have fixes to existing instructions. Contributions are welcome.
+
+:::caution Early release
+Cartesi Skills v0.1.0 is an early release for testing and feedback. Be cautious when using private keys or mainnet credentials with AI-assisted workflows.
+:::
diff --git a/cartesi-rollups_versioned_sidebars/version-2.0-sidebars.json b/cartesi-rollups_versioned_sidebars/version-2.0-sidebars.json
index 99facf74..ab060dd9 100644
--- a/cartesi-rollups_versioned_sidebars/version-2.0-sidebars.json
+++ b/cartesi-rollups_versioned_sidebars/version-2.0-sidebars.json
@@ -170,6 +170,17 @@
"deployment/self-hosted"
]
},
+ {
+ "type": "category",
+ "label": "Build with AI",
+ "collapsed": true,
+ "items": [
+ "build-with-ai/overview",
+ "build-with-ai/mcp-server",
+ "build-with-ai/skills",
+ "build-with-ai/prompting"
+ ]
+ },
{
"type": "category",
"label": "Tutorials",
diff --git a/docusaurus.config.js b/docusaurus.config.js
index adba332d..0ffcc7af 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -351,6 +351,7 @@ const config = {
}),
plugins: [
require.resolve("./plugins/serve-markdown.js"),
+ require.resolve("./plugins/copy-page-button"),
[
"@docusaurus/plugin-content-docs",
{
diff --git a/package.json b/package.json
index 69330f6b..711b5cae 100644
--- a/package.json
+++ b/package.json
@@ -27,6 +27,7 @@
"autoprefixer": "^10.4.20",
"classnames": "^2.5.1",
"clsx": "^2.1.1",
+ "docusaurus-plugin-copy-page-button": "^0.5.2",
"docusaurus-plugin-hotjar": "^0.0.2",
"docusaurus-plugin-openapi-docs": "^4.2.0",
"docusaurus-plugin-sass": "^0.2.5",
@@ -69,11 +70,8 @@
"prettier": "^3.4.0",
"typescript": "^5.7.2"
},
- "engines": {
- "node": ">=18.0"
- },
- "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
"engines": {
"node": ">=20.0.0"
- }
+ },
+ "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
diff --git a/plugins/copy-page-button/CopyPageButton.js b/plugins/copy-page-button/CopyPageButton.js
new file mode 100644
index 00000000..bfd472cb
--- /dev/null
+++ b/plugins/copy-page-button/CopyPageButton.js
@@ -0,0 +1,378 @@
+import React, { useState, useEffect, useRef } from "react";
+import IconCopy from "@theme/Icon/Copy";
+import IconSuccess from "@theme/Icon/Success";
+import styles from "./styles.module.css";
+const {
+ extractPageMarkdownFromDocument,
+ getMarkdownRouteUrl,
+} = require("./htmlToMarkdown");
+
+// Utility function to merge custom styles with default classes
+const mergeStyles = (defaultClassName, customStyleConfig = {}) => {
+ const { className: customClassName, style: customStyle } = customStyleConfig;
+
+ const finalClassName = customClassName
+ ? `${defaultClassName} ${customClassName}`
+ : defaultClassName;
+
+ return {
+ className: finalClassName,
+ style: customStyle || {}
+ };
+};
+
+// Utility function to separate positioning styles from other styles
+const separatePositioningStyles = (styleObject = {}) => {
+ const positioningProps = ['position', 'top', 'right', 'bottom', 'left', 'zIndex', 'transform'];
+ const positioning = {};
+ const nonPositioning = {};
+
+ Object.entries(styleObject).forEach(([key, value]) => {
+ if (positioningProps.includes(key)) {
+ positioning[key] = value;
+ } else {
+ nonPositioning[key] = value;
+ }
+ });
+
+ return { positioning, nonPositioning };
+};
+
+export default function CopyPageButton({
+ customStyles = {},
+ enabledActions = ['copy', 'view', 'chatgpt', 'claude', 'gemini'],
+ generateMarkdownRoutes = false
+}) {
+ const [isOpen, setIsOpen] = useState(false);
+ const [copied, setCopied] = useState(false);
+ const [pageContent, setPageContent] = useState("");
+ const [dropdownPosition, setDropdownPosition] = useState({ top: 0, left: 0 });
+ const dropdownRef = useRef(null);
+ const buttonRef = useRef(null);
+ const copyTimeoutRef = useRef(undefined);
+
+ // Extract custom style configurations
+ const containerStyleConfig = customStyles.container || {};
+ const buttonStyleConfig = customStyles.button || {};
+ const dropdownStyleConfig = customStyles.dropdown || {};
+ const dropdownItemStyleConfig = customStyles.dropdownItem || {};
+
+ useEffect(() => {
+ const handleClickOutside = (event) => {
+ if (
+ dropdownRef.current &&
+ !dropdownRef.current.contains(event.target) &&
+ buttonRef.current &&
+ !buttonRef.current.contains(event.target)
+ ) {
+ setIsOpen(false);
+ }
+ };
+
+ if (isOpen) {
+ document.addEventListener("mousedown", handleClickOutside);
+ }
+
+ return () => {
+ document.removeEventListener("mousedown", handleClickOutside);
+ };
+ }, [isOpen]);
+
+ useEffect(() => {
+ if (isOpen && buttonRef.current) {
+ const rect = buttonRef.current.getBoundingClientRect();
+ setDropdownPosition({
+ top: rect.bottom + 8,
+ left: rect.right - 300, // Align dropdown right edge with button
+ });
+ }
+ }, [isOpen]);
+
+ useEffect(() => {
+ if (typeof window === 'undefined') return;
+
+ const content = extractPageContent();
+ if (content) {
+ setPageContent(content);
+ }
+ }, []);
+
+ useEffect(() => () => window.clearTimeout(copyTimeoutRef.current), []);
+
+ const extractPageContent = () => {
+ return extractPageMarkdownFromDocument(document, window.location.href);
+ };
+
+ const copyToClipboard = async (text) => {
+ // If no content, try to extract it now
+ if (!text || text.trim() === '') {
+ const extractedContent = extractPageContent();
+ if (extractedContent) {
+ setPageContent(extractedContent);
+ text = extractedContent;
+ } else {
+ return false;
+ }
+ }
+
+ try {
+ if (navigator.clipboard && navigator.clipboard.writeText) {
+ await navigator.clipboard.writeText(text);
+ } else {
+ // Fallback for older browsers
+ const textArea = document.createElement('textarea');
+ textArea.value = text;
+ document.body.appendChild(textArea);
+ textArea.select();
+ document.execCommand('copy');
+ document.body.removeChild(textArea);
+ }
+ return true;
+ } catch (err) {
+ return false;
+ }
+ };
+
+ const handleCopyPage = async () => {
+ const ok = await copyToClipboard(pageContent);
+ if (!ok) return;
+ setIsOpen(false);
+ setCopied(true);
+ window.clearTimeout(copyTimeoutRef.current);
+ copyTimeoutRef.current = window.setTimeout(() => setCopied(false), 1000);
+ };
+
+ const openInAI = (baseUrl, queryParam = 'q', extraParams = {}) => {
+ try {
+ const currentUrl = getMarkdownRouteUrl(window.location.href);
+ const prompt = `Please read and explain this documentation page: ${currentUrl}
+
+Please provide a clear summary and help me understand the key concepts covered in this documentation.`;
+ const params = new URLSearchParams({ [queryParam]: prompt, ...extraParams });
+ window.open(`${baseUrl}?${params.toString()}`, "_blank");
+ } catch (err) {
+ // Silently fail
+ }
+ };
+
+ const viewAsMarkdown = () => {
+ try {
+ const mdUrl = getMarkdownRouteUrl(window.location.href);
+ window.open(mdUrl, "_blank");
+ } catch (err) {
+ // Silently fail
+ }
+ };
+
+ const allDropdownItems = [
+ {
+ id: "copy",
+ title: "Copy page",
+ description: "Copy the page as Markdown for LLMs",
+ icon: (
+
+ ),
+ action: handleCopyPage,
+ },
+ {
+ id: "view",
+ title: "View as Markdown",
+ description: "View this page as plain text",
+ icon: (
+
+ ),
+ action: viewAsMarkdown,
+ },
+ {
+ id: "chatgpt",
+ title: "Open in ChatGPT",
+ description: "Ask questions about this page",
+ icon: (
+
+ ),
+ action: () => openInAI("https://chatgpt.com/"),
+ },
+ {
+ id: "claude",
+ title: "Open in Claude",
+ description: "Ask questions about this page",
+ icon: (
+
+ ),
+ action: () => openInAI("https://claude.ai/new"),
+ },
+ {
+ id: "gemini",
+ title: "Open in Gemini",
+ description: "Ask questions about this page",
+ icon: (
+
+ ),
+ action: () => openInAI("https://www.google.com/search", "q", { udm: "50" }),
+ },
+ ];
+
+ // Filter dropdown items based on enabled actions
+ const dropdownItems = allDropdownItems.filter(item =>
+ enabledActions.includes(item.id)
+ );
+
+ // Handle positioning styles - if button config has positioning, move it to container
+ const { positioning: buttonPositioning, nonPositioning: buttonNonPositioning } =
+ separatePositioningStyles(buttonStyleConfig.style);
+
+ // Create final style configs
+ const finalContainerConfig = {
+ ...containerStyleConfig,
+ style: {
+ ...containerStyleConfig.style,
+ ...buttonPositioning, // Apply button positioning to container
+ }
+ };
+
+ const finalButtonConfig = {
+ ...buttonStyleConfig,
+ style: buttonNonPositioning, // Apply only non-positioning styles to button
+ };
+
+ // Merge custom styles with default styles
+ const containerProps = mergeStyles(styles.copyPageContainer, finalContainerConfig);
+ const buttonProps = mergeStyles(
+ copied ? `${styles.copyPageButton} ${styles.copyPageButtonCopied}` : styles.copyPageButton,
+ finalButtonConfig
+ );
+ const dropdownProps = mergeStyles(styles.copyPageDropdown, dropdownStyleConfig);
+ const dropdownItemProps = mergeStyles(styles.dropdownItem, dropdownItemStyleConfig);
+
+ return (
+ <>
+