# Agent skills

`npx splithub init` (and `npx splithub skills`) installs six skills into the project. A skill is a Markdown file with a front-matter description that a coding agent loads when the task matches. They go to `.claude/skills/<name>/SKILL.md` for Claude Code, to `.cursor/rules/` for Cursor, and a short section in `AGENTS.md` (or an existing `CLAUDE.md`) points Codex and other agents at them.

| Skill | Loaded when | Teaches |
|---|---|---|
| `splithub` | the user asks to A/B test something, or asks which variant wins | where things live (config, credentials, results), how to create each kind of experiment, how to read a verdict, what never to do |
| `ab-testing` | before creating a test or interpreting results | hypothesis and primary metric, sample size rule of thumb, SRM, peeking, when to stop, vocabulary |
| `splithub-api` | writing a server, a script or a non-JS client | the HTTP API: public-key ingest, API-key endpoints, overrides JSON, errors |
| `splithub-mcp` | connecting SplitHub to Claude Code, Cursor or Codex | how to register the MCP server, the tools, working rules |
| `splithub-self-hosted` | the user wants data in their infra, asks about tables or reports | the events table, the Store interface, Postgres/MySQL/Prisma/Drizzle/Supabase notes, attribution SQL, pulling cloud summaries into a warehouse |
| `splithub-ship` | a test has a verdict and the user says ship it, roll out the winner or remove the test | finish first, then keep only the winning value, component or page, delete the losers, clean the config, verify, never reuse the id |

## What the main skill says, in short

- `splithub.config.ts` is the source of truth; it ships to the browser, so no secrets.
- Credentials come from `npx splithub login` (a link the human approves). Never ask the user to paste keys.
- Prefer `value` experiments (data only) over `component` ones; `redirect` for whole pages.
- Create the test (running by default), wire the code, run `doctor` and `push`. Then always tell the user it goes live when they deploy, and that Pause in the dashboard or `npx splithub pause <id>` holds it.
- To check a draft before it starts: `runDraftsInDev: true` in the config (development only), `?sh_force=<id>:<variant>` on any page, `?sh_debug=1` for the decisions.
- Report `verdict.message` verbatim with the numbers behind it. `srm_detected` means fix the setup first.
- Never change `seed`, weights or variants of a running experiment; never nest experiments; keep 2–3 tests per page at most.

## Reading the full text

The skills are plain files in your project after `init`. They are also what the dashboard's "Copy for your agent" prompt refers to, and this documentation covers the same ground page by page. For a single file with everything: [llms-full.txt](/llms-full.txt).

## Updating

`npx splithub skills` rewrites the skill files from the installed CLI version. They are safe to commit; agents on the team get the same rules.
