/kane-cli-testmu:kane-write-e2efrom Kane CLI Agent Tests
Use only when the user asks to add, write or generate end-to-end, UI or browser tests for approved acceptance criteria. Writes the tests in whatever the repo already uses: idiomatic Playwright, Cypress or another framework if one is present, or plain-English Kane CLI objectives if the repo already uses Kane tests. Local file writing only; it runs nothing. Use after scaffold-agent-tests. Not for unit tests, and never when the user has not asked for tests.
Ships in Kane CLI Agent Tests. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Input: an approved intent block from scaffold-agent-tests. If there is none, run that skill first; do not write a test without criteria.
The criteria are the contract. This skill only decides how to express them.
If the official kane-cli skill is also loaded: repo convention decides the format of committed tests (this skill). The kane-cli skill decides how a Kane CLI run is launched and reported.
Check, in order, and use the first that applies:
*_test.md files, or a .testmuai/ folder): write Kane tests. Go to "Kane CLI path".playwright.config.*, cypress.config.*, wdio.conf.*, a tests/e2e folder, or an e2e script in package.json. Write tests in that framework. Go to "Framework path".command -v kane-cli succeeds): offer Kane objectives. Go to "Kane CLI path".Never mix two E2E frameworks in one PR. Never convert a team's existing tests to another framework unless asked.
Kane CLI tests are plain English. There are no selectors to write.
Writing objectives is local. Any kane-cli command sends data to TestMu AI, so run one only after the gate in run-kane-tests (Steps 1 and 2 there) has passed. If it has not, write the objectives into the conversation and stop.
If the official kane-cli skill is installed (a kane-cli/SKILL.md exists under .claude/skills, .agents/skills, ~/.claude/skills, ~/.agents/skills or ~/.gemini/skills): follow it for authoring. It routes test-case creation through the assurance commands. The approved intent block from scaffold-agent-tests is the requirements file it asks for:
kane-cli context ingest tests/kane/<slug>.md --mode agent
kane-cli design tests --use-case <use-case-ref> --mode agent
Take <use-case-ref> from the ingest/extract output; do not invent one. Kane CLI designs its own acceptance criteria from the file. After design tests, compare the designed criteria with the approved intent block, one to one. If Kane CLI added, dropped or reworded a criterion, or changed an expected value, show the difference to the user and wait for a yes before running. With no person to ask, run only the designed tests that match an approved criterion and list the rest as not covered.
For a quick check without a saved suite, turn each [e2e] criterion into one objective. Pattern: start URL, actions as intent, literal data, end on a check of what is on screen.
Go to https://staging.example.com/cart, apply the promo code "SPRING10",
then verify the discount line shows "-$4.20" and the total shows "$37.80"
Rules for objectives (from the Kane CLI agent guide):
--url.verify or assert on the resulting state. A check on a button that disappears on success fails exactly when the feature works.store ... as 'name' to capture a value; refer to it later in plain English ("the stored order_id value"), not {{order_id}}."secret": true. Never inline them.Hand the objectives to run-kane-tests.
Match the repo first: folder, file naming, fixtures, page objects, baseURL, test data helpers. Read two existing tests before writing one.
Then follow these rules. They are what keeps a test from breaking on every UI tweak:
test('expired promo code shows an error and keeps the total', ...).getByRole with an accessible name, getByLabel, getByPlaceholder, getByText, then getByTestId if the repo uses test ids. No CSS class or XPath selectors unless nothing else identifies the element.await expect(locator).toHaveText(...), toBeVisible(), toHaveURL(...). Never page.waitForTimeout(...) or fixed sleeps.kane-failure-triage, not a fix.See references/playwright-patterns.md for a full example built from an intent block.
At the end, print a table the PR skill will reuse:
| # | Criterion | Test |
|---|-----------|------|
| 1 | Valid code shows -$4.20 and total $37.80 | tests/e2e/promo.spec.ts > "valid code applies discount" |
| 2 | Expired code shows error, total unchanged | tests/e2e/promo.spec.ts > "expired promo code ..." |
Every criterion gets a row. A criterion with no test is listed with not covered and a reason. Do not hide gaps.
Run them with run-kane-tests. Do not claim they pass until run-kane-tests reports a real result.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
5 skills in this plugin
/kane-failure-triageUse only when the user asks to fix, debug or triage a failing or flaky end-to-end, UI, browser, Playwright, Cypress or Kane CLI test, or a red build caused by one. Classifies the failure first, as a real product bug, a changed UI path, a changed requirement, an environment problem, a flaky test or a wrong test, then applies the fix that matches. Repairs how a test reaches its target, never what it checks. Reads the evidence already on disk. Reruns framework tests with the repo's own runner, and reruns Kane CLI tests only through the run-kane-tests gate./kane-pr-evidenceUse only when the user asks what was tested, or asks for the testing section of a pull request description, and tests were run in this session. Writes a short Tested section: the acceptance criteria, what passed or failed, how it ran and where the evidence is. Reuses results from run-kane-tests and never claims a check that did not run. Adds no credit line or promotion. Skip docs-only, dependency-only and config-only PRs./run-kane-testsUse only when the user asks to run, execute, verify or check end-to-end tests, agent tests or the criteria in tests/kane/. Runs tests written in the repo's own framework with the repo's own runner, locally. Runs Kane CLI checks in a real browser only after checking that cloud runs are allowed in this plugin's settings and that the user is signed in, and after showing exactly what a run sends. Reports a verdict only from real evidence. Needs a real terminal; Kane CLI runs also need network access. Not for writing tests, not for unit tests, and never when the user has not asked to run tests./scaffold-agent-testsUse only when the user asks to set up, scaffold, plan or write agent tests, end-to-end tests or Kane tests for the app in this repository, for example "set up agent tests for this app". Reads the repo, proposes test intents with acceptance criteria a user could observe, and writes them to tests/kane/ only after the user agrees. Fully local, needs no account, runs nothing. Not for unit tests, refactors with no behaviour change, or docs-only and config-only changes, and never when the user has not asked about testing.npx claudepluginhub lambdatest/kane-cli-plugin --plugin kane-cli-testmu