> For the complete documentation index, see [llms.txt](https://docs.xyo.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xyo.network/ai-sdk/xyo-ai-sdk-quick-start.md).

# XYO AI SDK - Quick Start

## Install for Claude Code

Use Claude Code's built-in plugin marketplace to install the XYO skills, then build a full XL1 dApp from a single prompt.

> If you use a different AI coding agent (Cursor, Codex, Copilot, Windsurf, etc.), please follow the [skills.sh](https://www.skills.sh/) instructions with a CLI instead. This page covers the Claude Code–specific install path.

### Before you start

You'll need:

* [**Claude Code**](https://claude.com/product/claude-code) installed on your machine (desktop app or CLI — the marketplace flow works the same in both)
* **An X/Twitter account** to request testnet tokens later from the XL1 Token Faucet
* **Some time** — the install takes a few minutes seconds; the example prompt was crafted by our XYO developers to build an entire dApp in about an hour.

### 1. Install the XYO Skills

If you use just the desktop UI, please skip the CLI instructions and instead move to the "Claude Desktop app" Instructions.

#### **Claude Code CLI**

```
# Add the marketplace
/plugin marketplace add XYOracleNetwork/xyo-claude-plugin

# Install the XL1 skill stack
/plugin install xyo-skills
```

#### **Claude Desktop app**

The `/plugin` slash commands aren't available in the Claude Code desktop app — use the **Customize** panel instead:

1. Click **Customize** in the left sidebar.

   [![Customize in the sidebar](https://github.com/XYOracleNetwork/xyo-skills/raw/main/docs/images/claude/install/01-customize.png)](https://github.com/XYOracleNetwork/xyo-skills/blob/main/docs/images/claude/install/01-customize.png)
2. Under **Personal plugins**, click the **+** button.

   [![Personal plugins add button](https://github.com/XYOracleNetwork/xyo-skills/raw/main/docs/images/claude/install/02-personal-plugins-add.png)](https://github.com/XYOracleNetwork/xyo-skills/blob/main/docs/images/claude/install/02-personal-plugins-add.png)
3. Choose **+ Create plugin**.

   [![Create plugin menu option](https://github.com/XYOracleNetwork/xyo-skills/raw/main/docs/images/claude/install/03-create-plugin.png)](https://github.com/XYOracleNetwork/xyo-skills/blob/main/docs/images/claude/install/03-create-plugin.png)
4. Choose **Add marketplace**.

   [![Add marketplace submenu option](https://github.com/XYOracleNetwork/xyo-skills/raw/main/docs/images/claude/install/04-add-marketplace.png)](https://github.com/XYOracleNetwork/xyo-skills/blob/main/docs/images/claude/install/04-add-marketplace.png)
5. In the URL field, paste [`https://github.com/XYOracleNetwork/xyo-claude-plugin`](https://github.com/XYOracleNetwork/xyo-claude-plugin) and click **Sync**.

### 2. Create a Folder to Your Demo Output

Claude will ask you for a folder or destination for the output of your prompt. Create a new folder on your computer. We recommend creating a folder named `xyo-ai-sdk-prediction-market-demo` .

You'll use this new folder on the next step.

### 3. Open a new Claude Code session

For Claude Code to pick up the newly installed skills, **open a fresh session**. In the desktop app, open a new tab in the same project. In the CLI, exit and re-launch `claude` in the same directory.&#x20;

This step matters — Claude Code only scans for skills at session start.

Make sure you select the new folder you just created so Claude builds your demo there!

<figure><img src="/files/gD9o7OIvz6Y9296KS8p2" alt=""><figcaption></figcaption></figure>

### 4. Run the Prediction Market Prompt

This prompt is designed to run a prediction market-esque dApp on XYO Layer One's Sequence testnet.&#x20;

Note: This prompt is lengthy, because we added lots of extra details to help explain what's happening on XYO Layer One. Feel free to give it a read! You'll get to review some of the phrases we use to trigger behaviors in the XYO AI SDK to keep it optimal and efficient.

Paste this prompt into the new session:

{% code overflow="wrap" %}

```
Build a two-player number-prediction guessing game called "XYO Prediction Market dApp" on XL1 (Sequence testnet, not mainnet). Use commit-reveal so the secret number is cryptographically locked and hidden before the player guesses and can't be changed afterward. Player 1 is a backend bot: when a round starts it randomly picks a secret 1–5 and commits hash(secret + salt) on-chain — never reveal or hint at the number anywhere in the UI until the round settles. Player 2 is the human in the UI, who submits a guess; record the guess, the reveal, and the outcome (correct/incorrect) on-chain.

Sign all moves on the backend from a mnemonic in a generated .env (account 0 = bot, account 1 = human) — no browser wallet. Do all chain indexing on the backend: walk finalized blocks from a floor block captured at build time, and make sure the indexer actually retrieves the off-chain payloads it wrote — fetch them from the same datalake you inserted into (a RestDataLakeViewer on that endpoint), not via the gateway block viewer, which won't resolve them. The frontend only reads the backend's REST API and presents current round state, round detection, and history.

UI: anyone can browse past rounds and results without a wallet; the player can start and play rounds. The moment a round is started or a guess is submitted, show a "waiting to be recorded on-chain" state (with the tx) instead of re-showing the buttons, so there's no double-submit. Display both accounts' addresses and live XL1 balances, auto-refreshing every few seconds so I can watch faucet funding land — and make clear BOTH accounts need funding (the bot pays to commit/settle, the human to guess) via the XL1 Token Faucet on Twitter/X.

On every settled round, include a "provably fair" panel that recomputes hash(secret + salt) in the browser, checks it against the on-chain commitment, and gives direct block-explorer links to each on-chain record (commit, guess, and the reveal payload showing the secret + salt, and the settlement/outcome). Add a short explainer for someone who knows what prediction markets are, like Polymarket/Kalshi, but may not know the inner workings of developing on XYO.

When an action fails, show a readable panel with labeled sections — a plain-language summary, the affected account, the balance and fee involved, and how to fix it — plus the complete, untruncated raw error in a collapsible block with a copy button.

To finish, please run the dApp on localhost:3001
```

{% endcode %}

Claude pulls from the skills automatically:

* `xl1-scaffold` lays down a pnpm monorepo with a React frontend, an `xl1-service` backend, and a shared TypeScript library
* `xl1-patterns` wires up the commit-reveal flow and splits the chain indexing between browser and service
* `xl1-knowledge` derives accounts zero and one from the generated mnemonic and constructs the gateway
* `xyo-knowledge` shapes the Bound Witness payloads that go on the sequence
* `xy-toolchain` and `xy-development` apply the ESLint, TypeScript, and Vitest baseline

### 5. Fund Your Wallet & Wait for the Build to Complete

Once the demo is done building, you'll need to fund the local wallets that are generated for the demo. We recommend downloading the XL1 Wallet, so you can fund them on the fly.&#x20;

1. [Download & Create an XL1 Wallet](https://chromewebstore.google.com/detail/xl1-wallet/fblbagcjeigmhakkfgjpdlcapcgmcfbm)
2. [Request Sequence Testnet Tokens](https://x.com/xl1faucet) (The instructions are pinned on this X Account)
3. Go grab a snack!

The demo normally takes about 30-40 minutes to build on our computers, so now's the perfect time to go watch an episode of your favorite television show, grab a quick coffee, or find a late-night snack!

### 6. Fund the New dApp Wallets & Test the dApp!

When the build finishes, the UI displays the **wallet addresses that can play your dApp**. To submit transactions to the XL1 sequence (testnet), that wallet needs test tokens.

Copy the address, then use your newly funded XL1 wallet from step #5 to manually send 1-2 testnet XL1 on Sequence to the wallet addresses on the UI. Due to the daily cap on the XL1 Faucet, we don't recommend sending the 100 testnet XL1 to the dApp wallets, just to your separate wallet so you can fund test dApp wallets on the fly.

Once you have sent the tokens using the XL1 Wallet UI, refresh the dApp. You're ready to play!

Part of the fun of creating a dApp with the XYO AI SDK is that you may end up with slightly different versions, designs, and interfaces depending on how your AI makes decisions that lead to a final game! Here's an example of what we've seen when we've run this in the past:

<figure><img src="/files/DItXxOG89LTTUAOmMZ76" alt="" width="563"><figcaption></figcaption></figure>

<div><figure><img src="/files/QMV1RUXSZsLctgvWwV7g" alt=""><figcaption></figcaption></figure> <figure><img src="/files/DwYuTxlazjVx1PCCaeUz" alt=""><figcaption></figcaption></figure></div>

### Troubleshooting

**The plugin \[XYO Skills] doesn't appear after install.** Make sure you opened a new session — Claude Code only scans for skills at session start, not mid-session.

**Claude completed the prompt, but the preview of the dApp isn't appearing.** If you see the image below, you may have to close and reopen the preview. You can reopen the preview using the top right button for "Views" and selecting "Preview". If you'd like to use the dApp, we recommend opening the localhost website on Google Chrome to check out the new dApp you have created! Normally it goes to <http://localhost:3000/>.&#x20;

<figure><img src="/files/LvdzFBpcTwhxQVJ8x4qa" alt="" width="350"><figcaption></figcaption></figure>

<figure><img src="/files/WnUxCcdQZtmfL5hfhaxM" alt="" width="98"><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.xyo.network/ai-sdk/xyo-ai-sdk-quick-start.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
