testsprite-onboard
Skill3 starsChanged 29 days agoMITView on GitHub
Stand up a complete, runnable TestSprite test suite for the current repo at first use — create a project (with a target URL and auth), derive a coherent set of tests from the codebase, batch-create them, and smoke-run a few to a green verdict so the user immediately has something worth running. Use ONLY when a repo has no TestSprite tests yet (a fresh project), right after `testsprite setup`, or when the user asks to "set up / bootstrap / seed tests". This is first-run setup, NOT change verification — once a project already has tests, use the testsprite-verify skill instead.
In this repository11 other files it gives its agents.
- .agents/AGENTS.mdAGENTS.md
- templates/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- ai-mind-mapSkill
- codebase-security-auditSkill
- git-diffSkill
- testsprite-verifySkill
- ai-mind-mapSkill
- git-diffSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 42
Read the repo to establish, concretely:
- Distinctive: line 48
Prefer code-derived routes/handlers over guessing — you have the source.
- Very specific: line 99
Assertion rule (this is the whole game for FE): every assertion step must name a
- Distinctive: line 133
Do not run the whole suite automatically — a 20-test FE suite is ~40 credits and a free account only has 150.
- Distinctive: line 157
Don't auto-run the full suite (credit wall / surprise 402).
- Distinctive: line 158
Don't write narrative assertions an AI judge can't fail.
- Very specific: line 159
Don't call backend endpoints directly — only the testsprite CLI.
- Distinctive: line 160
Don't create a FE project without a URL.
- Distinctive: line 161
Don't re-seed a project that already has tests — that's not this skill's job.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!--
User-facing content for `testsprite agent install` (skill: testsprite-onboard).
Body only — name + description frontmatter is emitted by the install wrapper.
The cursor (.mdc), cline (.clinerules), and antigravity (experimental)
wrappers reuse this body verbatim and swap only the frontmatter/header.
-->TestSprite: onboard a repo with a seed test suite
Your job is to take a repo that has no TestSprite tests yet and leave it with a coherent, runnable suite plus a couple of already-green smoke tests — in one pass. A new user who can immediately run a real, passing test is an activated user; an empty project is the #1 drop-off.
This skill only uses shipped CLI commands. It works the same whether the user is on the V2 or V3 backend — the CLI routes internally. Do not call backend APIs directly.
When to use
- Right after
testsprite setup, or any time the active project has 0–1 tests. - The user says "set up tests", "bootstrap", "seed a suite", "get me started", or similar.
When NOT to use
- The project already has tests — that's the
testsprite-verifyskill's job, not this one. - The user only changed code and wants it checked — again,
testsprite-verify.
Prerequisites
testsprite setup has run (an API key is configured). If testsprite project list errors on
auth, stop and tell the user to run testsprite setup first — don't try to configure for them.
Steps
1. Understand the app (don't skip — this is where coverage quality comes from)
Read the repo to establish, concretely:
- Frontend: the deployed/local URL, the 4–8 most important user flows (auth, core CRUD, checkout, search, settings…), and whether flows need login.
- Backend: the key API endpoints and their success/error contracts.
Prefer code-derived routes/handlers over guessing — you have the source; use it. This beats a blind crawl.
2. Create the project (FE must have a URL)
Frontend:
testsprite project create --type frontend --name "<repo name>" --url <app-url> \
[--username <user> --password-file <path-to-secret>]Backend:
testsprite project create --type backend --name "<repo name>"Capture the returned projectId.
Critical for FE: a frontend test with no resolvable target URL fails immediately with
No environment URL configured— the suite goes all-red. Always pass--url. If flows need login, pass--username/--password-filenow so authenticated pages are reachable.
3. Author the tests (quality over quantity)
Frontend — one JSON plan file per flow, in a directory (e.g. ./testsprite-plans/).
Each file is a COMPLETE plan and must include projectId (from step 2), type: "frontend",
name, and planSteps — create-batch reads the project from each file, not from a flag:
{
"projectId": "<projectId from step 2>",
"type": "frontend",
"name": "Checkout — guest can complete a purchase",
"planSteps": [
{ "type": "action", "description": "Navigate to /products and open the first product" },
{ "type": "action", "description": "Click 'Add to cart', then go to /cart" },
{
"type": "assertion",
"description": "The cart shows exactly 1 line item with the product's name and price"
},
{ "type": "action", "description": "Proceed to checkout as guest and submit the test payment" },
{ "type": "assertion", "description": "A confirmation page appears showing an order number" }
]
}Backend — one .py file per endpoint, using requests with concrete assertions on
status code and response body.
Assertion rule (this is the whole game for FE): every assertion step must name a
concrete, observable outcome — an element, text, URL, count, or status. Never write
"verify it works", "check the page loads", or other narrative that an AI judge can
rubber-stamp. Vague assertions are how false-PASS sneaks in.
Aim for ~8–15 tests covering the core flows. Don't pad.
4. Batch-create
Frontend (one call, up to 50 plans from the directory — create-batch is FE-only and has
no --project flag; the project comes from each plan file's projectId):
testsprite test create-batch --plan-from-dir ./testsprite-plansBackend (one call per file — create-batch is FE-only; --name is required):
testsprite test create --type backend --name "<behavior being tested>" \
--code-file ./tests/<endpoint>.py --project <projectId>Capture the created testIds from the output.
5. Smoke-run a few — NOT all (protect credits)
Pick the 2–3 highest-value happy-path tests (prefer ones you're most confident are green) and run only those:
testsprite test run <testId> --waitDo not run the whole suite automatically — a 20-test FE suite is ~40 credits and a free account only has 150. Running the full suite is the user's explicit choice.
6. Report
Tell the user, plainly:
- "Your project now has N tests covering:
<list the flows>." - "I smoke-ran M — here's the result: <pass/fail + the dashboard link from the run output>."
- "To run the rest (≈X credits — state the cost so they choose knowingly):
- frontend — run each remaining test by id:
testsprite test run <testId> --wait(there is no--allfor frontend); - backend —
testsprite test run --all --project <id>(wave-ordered, runs every BE test)."
- frontend — run each remaining test by id:
Quality checklist (self-check before reporting done)
- FE project has a real
--url; login configured if the app needs it. - Every FE assertion names a concrete, observable outcome (no "verify it works").
- Tests cover the core flows you found in the code, not just one page.
- Smoke-ran 2–3 happy-path tests, not the whole suite.
- Reported test count, smoke result + dashboard link, and the cost to run the rest.
Don'ts
- Don't auto-run the full suite (credit wall / surprise 402).
- Don't write narrative assertions an AI judge can't fail.
- Don't call backend endpoints directly — only the
testspriteCLI. - Don't create a FE project without a URL.
- Don't re-seed a project that already has tests — that's not this skill's job.
Hand off to verify
This skill's job ends once the project has a seeded suite and a first green run. From here on,
the testsprite-verify skill takes over: after the user changes code, it runs the tests
covering that change before they report the work done. Onboard once; verify continuously.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

