# Use TryYourSize with AI tools

> Point Cursor, Claude Code, ChatGPT or Claude at our docs with llms.txt and Markdown pages, use ready-made integration prompts, and drop a rules file into your repo.

Source: https://docs.tryyoursize.com/guides/ai-tools/

Every page of these docs is also available as clean Markdown, so an AI assistant can read exactly what you read, including the full SDK and HTTP API reference.

| URL | What it is |
|---|---|
| [`/llms.txt`](https://docs.tryyoursize.com/llms.txt) | Index in the [llms.txt](https://llmstxt.org) format: every page, as a link to its Markdown |
| [`/llms-full.txt`](https://docs.tryyoursize.com/llms-full.txt) | All the docs in one Markdown file: guides, quickstarts, SDK reference and HTTP API reference |
| `/llms/<sdk>.txt` | One SDK's whole reference: [`web`](https://docs.tryyoursize.com/llms/web.txt), [`react`](https://docs.tryyoursize.com/llms/react.txt), [`node`](https://docs.tryyoursize.com/llms/node.txt), [`python`](https://docs.tryyoursize.com/llms/python.txt), [`ios`](https://docs.tryyoursize.com/llms/ios.txt), [`android`](https://docs.tryyoursize.com/llms/android.txt), [`react-native`](https://docs.tryyoursize.com/llms/react-native.txt), [`flutter`](https://docs.tryyoursize.com/llms/flutter.txt) |
| `<page>.md` | Any page as Markdown: add `.md` to its URL, for example [`/quickstarts/web.md`](https://docs.tryyoursize.com/quickstarts/web.md) |
| [`/openapi.json`](https://docs.tryyoursize.com/openapi.json) | The public OpenAPI spec |

On every page, **Copy page** copies its Markdown, and the menu next to it opens the page in ChatGPT or Claude with a prompt that names only the page's public URL.

## Cursor

Add the docs once as a source: **Settings → Indexing & Docs → Add doc**, with `https://docs.tryyoursize.com/llms-full.txt`. Then mention `@TryYourSize` in chat. For a project rule, save the [rules file](#rules-file-for-your-repo) as `.cursor/rules/tryyoursize.mdc`.

## Claude Code

Add the [rules file](#rules-file-for-your-repo) to your repo's `CLAUDE.md`, or ask directly:

```text
Read https://docs.tryyoursize.com/llms.txt, then the pages you need, and add the TryYourSize size guide to our product page.
```

Claude Code fetches the Markdown pages it needs from the index.

## ChatGPT and Claude

Use **Open in ChatGPT** or **Open in Claude** in the page menu, or paste one of the prompts below. For long tasks, attach `llms-full.txt`.

## Ready-made prompts

Replace the values in angle brackets. Each prompt asks the assistant to read our docs first, so it uses only real APIs.

### Shopify (no code)

```text
Read https://docs.tryyoursize.com/quickstarts/shopify.md. Walk me through installing the TryYourSize app on my Shopify store, adding the "Size guide" block next to the size picker on the product template of my theme <theme name>, and checking that orders reach TryYourSize. I don't write code; give me clicks, not code.
```

### React (Next.js, Remix, Vite)

```text
Read https://docs.tryyoursize.com/quickstarts/react.md and https://docs.tryyoursize.com/llms/react.txt.
In this repo, add the TryYourSize size guide next to the size picker of the product page (<path to the component>):
- load the client once with loadTryYourSize("<pk_test_…>") from @tryyoursize/sdk/loader and wrap the page in <TryYourSizeProvider client={…}>;
- render <SizeGuide product={sku} /> where the "Size guide" link is today;
- preselect the size from onRecommendation when status is "ready", but never override a size the shopper picked;
- keep it SSR-safe; use only APIs that exist in the docs.
```

### iOS (SwiftUI)

```text
Read https://docs.tryyoursize.com/quickstarts/ios.md and https://docs.tryyoursize.com/llms/ios.txt.
In this app, create one TryYourSize client with try TryYourSize(publishableKey: "<pk_test_…>"), and put SizeGuide(client:product:) next to the size picker in <view name>. Preselect the size from the onRecommendation closure when rec.status == .ready, without overriding the shopper's own choice. Tell me which app origin (ios-app://…) to register in Studio. Use only APIs that exist in the docs.
```

### Server (Node.js or Python)

```text
Read https://docs.tryyoursize.com/quickstarts/server.md and https://docs.tryyoursize.com/guides/outcomes.md.
Add a job to <service> that sends every order and return to TryYourSize with @tryyoursize/node (or the tryyoursize Python package), with the secret key from the environment variable TRYYOURSIZE_SECRET_KEY, idempotent by order ID, including visitor_id from the cart. Send no customer data.
```

## Rules file for your repo

Save it as `.cursor/rules/tryyoursize.mdc` (Cursor), add it to `CLAUDE.md` (Claude Code), `AGENTS.md`, or `.github/copilot-instructions.md` (GitHub Copilot).

```markdown
# TryYourSize integration rules

- Docs: https://docs.tryyoursize.com/llms.txt (index) and https://docs.tryyoursize.com/llms-full.txt (everything).
  Read the relevant page before writing TryYourSize code. Use only methods, props and endpoints that exist there.
- Keys: publishable keys (pk_test_… / pk_live_…) in browsers and apps only. Secret (sk_…) and restricted (rk_…)
  keys on the server only, from environment variables. Never commit keys.
- The store receives sizes only (in its own size labels), never measurements or body data. Do not try to read,
  store or log shopper measurements.
- Preselect the recommended size only when status === "ready", and never override a size the shopper chose.
- Web: allow script-src https://js.tryyoursize.com and frame-src https://embed.tryyoursize.com in the CSP.
- Apps: register ios-app://<bundle id> / android-app://<package> for the key (test mode).
- Server: send orders and returns without customer data; make POSTs idempotent (the SDKs do it); verify webhook
  signatures on the raw body.
- Describe fit with numbers (cm of ease, kPa of pressure), not with verdict words.
```

> **Note**
>
> The docs describe what TryYourSize does and how to integrate it. Assistants do not get, and should not guess, anything about how sizes are computed.
