# Set up UserProof

**What this is:** a setup prompt copied from getuserproof.com and handed to you, an AI coding agent (Claude Code, Codex, Cursor or another agent that can run shell commands). Set up UserProof for the project open in this session, run the commands yourself, and keep the user's work to a few multiple-choice answers.

**What UserProof does, in one sentence to say to the user first:** it records what real visitors do on their site with a small script tag, and inside their coding agent it tells them where visitors get stuck on the way to the site's goal, the file and line to fix, and afterwards whether the fix worked.

## How to work with the user

- **Questions:** look through the repo first, then ask everything in one structured question call (AskUserQuestion): the site's goal (options you found in the code), what a goal is worth (skippable), and whether to commit and push when done. No more questions after that. Signing in is a link they open (GitHub, Google or an email link), not a question.
- **Echo answers back** in one line before acting on them.
- **The sign-in link is for the person, in their own browser.** Never open, fetch or search for it yourself (browser tool, web fetch, curl or search): only their signed-in browser can approve it, and your visit can't. Put the link and the code on the last lines of your message, then wait. If nobody is in the session (a cloud or background run), stop there and say the link is waiting for them.
- **Secrets:** the API key is written to `~/.config/userproof/key` by the sign-in step. Never print it, paste it into chat or commit it.
- **Processes:** stop only the dev server you start, by its PID. Never wait or poll in the foreground for a deploy; check once and move on.
- **Numbers** come from UserProof's responses only. Never estimate.

## Step 1: connect UserProof to your agent (30 seconds)

Pick the section for the agent you are. The tools come from one MCP server that reads the key setup writes to `~/.config/userproof/key`, so nothing secret goes into any config file.

### Claude Code

If `claude plugin list` already shows `userproof@userproof`, skip to Step 2. Otherwise:

```bash
claude plugin marketplace add GetUserProof/userproof && claude plugin install userproof@userproof
```

Tell the user the plugin's tools load the next time Claude Code starts. Setup doesn't need them: it runs over plain HTTP from here.

If the install command is blocked (auto mode may refuse to install a plugin on its own), don't work around it. Ask the user to paste this in their terminal, in this project's folder, and stop:

```bash
claude plugin marketplace add GetUserProof/userproof && claude plugin install userproof@userproof && claude "/userproof:setup"
```

### Codex

If `codex mcp list` already shows `userproof`, skip to Step 2. Otherwise:

```bash
codex mcp add userproof -- npx -y github:GetUserProof/userproof
```

Then add `startup_timeout_sec = 60` under `[mcp_servers.userproof]` in `~/.codex/config.toml`: the first start downloads the server and can take longer than Codex's 10-second default.

### Cursor

If `~/.cursor/mcp.json` already has a `userproof` server, skip to Step 2. Otherwise add this entry under `mcpServers` in `~/.cursor/mcp.json` (create the file if it's missing, keep any servers already there):

```json
"userproof": { "command": "npx", "args": ["-y", "github:GetUserProof/userproof"] }
```

### Any other agent with MCP

Add a stdio MCP server named `userproof` that runs `npx -y github:GetUserProof/userproof`.

Outside Claude Code, tell the user the UserProof tools load the next time the agent starts (or after reconnecting its MCP servers). Setup doesn't need them: it runs over plain HTTP from here.

## Step 2: run the setup

In Claude Code, read `~/.claude/plugins/marketplaces/userproof/plugin/skills/setup/SKILL.md`. In any other agent, fetch `https://raw.githubusercontent.com/GetUserProof/userproof/main/plugin/skills/setup/SKILL.md` (with `curl -s`). Follow it from Step 0.

Outside Claude Code, read it with these changes: skip step 0c (auto-update is a Claude Code plugin setting); where it says AskUserQuestion, ask the same questions in one chat message with numbered options and wait for the answer; "restart Claude Code" means restart your agent; and there is no session-start line, so the user asks "what should I work on?" to get the top fix. It creates the account (or adds this site to an existing one), puts the snippet in the code, proves it records, sets the site's goal with the user, and runs a free scan of the live site.

## Step 3: finish

End with three lines:

1. "UserProof is recording" plus where the proof came from.
2. The goal you saved.
3. What happens next: once the change is deployed and real visitors arrive, asking "what should I work on?" gives the top fix. In Claude Code, opening this project also shows one line when there's something new.

Pricing, if they ask: Free covers up to 3 sites and 5,000 recorded visits a month. Pro is $29/month (50,000 visits), Scale $99/month (250,000). Analyses are unlimited on every plan. Details: https://getuserproof.com/pricing
