> ## Documentation Index
> Fetch the complete documentation index at: https://docs.upsidemax.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Skills Plugin

> Install the open-source Upside skills plugin so your AI coding assistant (Claude Code or Codex) can register, trade, and stream on the Upside QA testnet from plain-language requests — no setup.

The **Upside skills plugin** is an open-source bundle that teaches an AI coding
assistant — [Claude Code](https://claude.com/claude-code) or Codex — how to drive
Upside for you. Ask in plain language ("let me try it", "buy BTC", "show my
positions", "stream trades") and the assistant runs the real, signed API calls
against the QA testnet. It's the fastest way to experience the exchange without
writing any code first.

<Note>
  Everything runs on the **QA testnet** (`https://dev.upsidemax.xyz`). Wallets are
  generated at runtime and funded by the auto-airdrop — no real funds, no mainnet
  risk, nothing to configure.
</Note>

<Card title="chain-dex/dex-skill" icon="github" href="https://github.com/chain-dex/dex-skill">
  Open-source. Clone it, read the code, or contribute. MIT licensed.
</Card>

## What's in the plugin

Five skills. Start with **`dex-playground`** — it's the guided, one-command
experience layer over the others.

| Skill            | What it does                                                                                                          |
| ---------------- | --------------------------------------------------------------------------------------------------------------------- |
| `dex-playground` | **Start here.** Try the whole product in single commands — register, trade, positions, live market — with zero setup. |
| `dex-onboarding` | Create an account, receive the test airdrop, verify balances.                                                         |
| `dex-trading`    | Market data, place / modify / cancel orders, leverage.                                                                |
| `dex-websocket`  | Subscribe to live order book, trades, candles, and account streams.                                                   |
| `dex-advanced`   | Agent-wallet delegation, TP/SL, and decoding numeric error codes.                                                     |

## Install

<Steps>
  <Step title="Clone the plugin">
    Pick the tab for your assistant.

    <CodeGroup>
      ```bash Claude Code theme={null}
      git clone https://github.com/chain-dex/dex-skill.git \
        ~/.claude/plugins/upside-dex-skills
      ```

      ```bash Codex / Cursor theme={null}
      # Clone anywhere, then open it as your workspace. The agent reads AGENTS.md
      # (declared by .codex-plugin/plugin.json) and routes requests to the skills.
      git clone https://github.com/chain-dex/dex-skill.git
      cd dex-skill
      ```

      ```bash Any other agent theme={null}
      # Point any assistant at the repo — each skills/*/SKILL.md is self-describing.
      git clone https://github.com/chain-dex/dex-skill.git
      cd dex-skill
      ```
    </CodeGroup>
  </Step>

  <Step title="Install the Python dependencies">
    From the cloned directory, run the one-shot installer.

    ```bash theme={null}
    ./install.sh
    ```

    Requires Python 3.9+. Installs `eth-account`, `eth-keys`, `eth-utils`,
    `eth-hash[pycryptodome]`, `requests`, and `websocket-client`.
  </Step>

  <Step title="Activate">
    * **Claude Code** — restart; the five skills appear in `/skills` and activate
      automatically when your request matches.
    * **Codex / Cursor** — start the agent in the repo directory; it loads
      `AGENTS.md` and routes your request to the matching skill.
  </Step>
</Steps>

## Use it

Just describe what you want. A few examples:

| You say                        | The assistant does                                                                       |
| ------------------------------ | ---------------------------------------------------------------------------------------- |
| "Let me try Upside" / "我想体验一下" | Runs the full lifecycle: account → test funds → a real filled position → close, in \~30s |
| "Register an account"          | Creates a wallet and claims the airdrop                                                  |
| "Buy 1 BTC" / "下一单"            | Places the order and reports whether it filled or is resting                             |
| "Show my positions" / "查一下仓位"  | Prints your open positions and balances                                                  |
| "Stream live trades" / "看实时行情" | Opens a live WebSocket feed                                                              |
| "What's leverage?"             | Explains the concept in plain language                                                   |

You don't have to memorize commands — the assistant maps your intent to the right
flow and keeps the interaction to a single step wherever possible. Replies come
back in your language.

<Tip>
  Prefer to see the code behind a step? Ask the assistant to "show the request" —
  the playground can print the exact signed `POST /exchange` envelope it sent, so
  you can lift it straight into your own integration. From there, the
  [Authentication](/guide/authentication) and [Exchange API](/exchange/overview)
  pages cover the full signing scheme and every action.
</Tip>

## Good to know

* **QA only.** The plugin targets the QA testnet by default; production access is
  arranged with the Upside team.
* **Keys stay local.** Wallets are generated at runtime and stored in a local
  session file — you're never asked to paste a private key into chat.
* **It's a starting point.** Use it to learn the flows quickly, then build your
  own integration against the REST and WebSocket APIs documented in the rest of
  these docs.
