/mabl:mabl-test-editfrom mabl
Edits existing mabl tests: renames, relabels, enables/disables, or modifies steps (replace/insert/delete/move). Routes to the cheapest deterministic lane — metadata, structured step, or live browser agent.
Ships in mabl. 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.
None: SKILL.md is the whole skill.
Change an existing mabl test. Three lanes, cheapest first — the skill's real job is picking the right one.
# Check the mabl CLI is installed and recent enough; install/upgrade if not
MIN_MABL_CLI_VERSION=2.111.0
command -v mabl >/dev/null 2>&1 || npm install -g @mablhq/[email protected]
[ "$(printf '%s\n%s' "$MIN_MABL_CLI_VERSION" "$(mabl --version)" | sort -V | head -1)" = "$MIN_MABL_CLI_VERSION" ] || npm install -g @mablhq/[email protected]
mabl auth login --auto # one-time OAuth in browser — required before any command
mabl auth info # verify you're logged in and the token hasn't expired
The metadata and structured-step lanes run entirely on the hosted mabl MCP
server (no local browser). The step lanes are a preview, so they aren't enabled
in every workspace — see Lane availability for what to do
when they're off.
Every edit starts by reading the test so you know what you're changing and which lane can change it:
mcp__mabl__get_mabl_test_steps({ testId: "<*-j>" })
That returns the test's flows[], and each flow is tagged with a kind —
this tag is the whole routing decision for step edits:
kind | What it is | Step edits go to |
|---|---|---|
structural | steps that live directly in this test | edit_mabl_test_steps |
reusable | a shared flow reused by other tests (carries a usedBy sample) | edit_mabl_flow_steps |
legacy_unsupported | a flow in an older format | neither — see Legacy flows |
Pick the lane by the kind of change, then confirm the target:
| The change is… | Lane | Tool |
|---|---|---|
| name, description, a label, enabled/disabled | Metadata | edit_mabl_test_metadata |
| a step edit you can already name exactly (which step, what it becomes) | Structured step | edit_mabl_test_steps / edit_mabl_flow_steps |
| anything you can't specify without looking at the live app (pick a new selector, "make it work again", "add a check that the toast appears" where you don't know the DOM) | Agent | mabl_authoring_edit |
Rule of thumb: if you can write the exact JSON for the changed step, stay in the structured lane — it's instant, branch-aware, pre-validated, and never opens a browser. If the change is described in terms of the running app rather than the step definition, it belongs in the agent lane.
The always-available lane — every workspace has it. One atomic call; a list of operations applied in order, saved in a single PATCH — if any operation is invalid, nothing is saved.
mcp__mabl__edit_mabl_test_metadata({
testId: "<*-j>",
operations: [
{ op: "set_name", name: "Checkout — guest user" },
{ op: "add_label", label: "smoke" },
{ op: "set_enabled", enabled: false }
]
})
Operations and their required field:
op | Field | Notes |
|---|---|---|
set_name | name (non-empty) | empty name is rejected, saves nothing |
set_description | description | empty string clears the description |
add_label | label | |
remove_label | label | |
set_enabled | enabled (boolean) |
Returns the updated { id, name, description, enabled, labels }. There is no
branch parameter — metadata is edited on the test directly.
Confirm before disabling. set_enabled: false takes the test out of every
plan run — it silently stops running in CI, which is a coverage change, not a
cosmetic one. Tell the user that and get an explicit OK before sending it (the
rename/description/label ops are cheap and reversible, so they don't need it).
Deterministic step edits, no browser. You name the exact edit; the tool validates against the flow's real steps, PATCHes the owning flow, verifies it persisted, and rebinds the test to the new flow variant.
Where the step goes depends on the flow's kind from the router:
structural flow → edit_mabl_test_stepsreusable flow → edit_mabl_flow_steps (see Reusable flows)If you send a reusable-flow step through edit_mabl_test_steps, it refuses
with reason: "wrong_authoring_boundary" and hands you the redirect (the
flow id + acknowledgeShared: true) — that's a routing correction, not a
failure. Follow it.
Same four verbs and the same field names in both tools. The only difference is
routing: a test-level op takes an optional flowId to say which flow it targets,
while a flow-level op is already scoped to one flow.
edit_mabl_test_steps — mode: "edits", indices into each flow's original
step array:
mcp__mabl__edit_mabl_test_steps({
testId: "<*-j>",
mode: "edits",
edits: [
{ op: "replace", flowId: "<*-f>", index: 3, step: { /* new step */ } },
{ op: "insert_after", flowId: "<*-f>", index: 3, step: { /* step */ } }, // index -1 prepends
{ op: "delete", flowId: "<*-f>", index: 5 },
{ op: "move", flowId: "<*-f>", from: 5, to: 2 }
]
})
flowId is optional only when the test has exactly one editable flow (the
tool infers it); otherwise omitting it returns reason: "no_editable_flow" or
"ambiguous_flow" — pass the id from the router read. Use mode: "whole" with
flows: [{ flowId, steps: [...] }] to replace a flow's steps wholesale (and
to seed the first flow of an empty test).
edit_mabl_flow_steps — same verbs, index / from / to:
mcp__mabl__edit_mabl_flow_steps({
flowId: "<*-f>",
mode: "edits",
edits: [
{ op: "replace", index: 2, step: { /* new step */ } },
{ op: "move", from: 4, to: 1 }
]
})
This tool only edits reusable (shared) flows, so a behavior-changing save
needs acknowledgeShared: true — but don't add it to the first call. Send
the edit without it, read the blast radius the tool hands back, confirm with the
user, then resend with the flag (see Reusable flows).
step object looks likeThe step payload is the same JSON shape get_mabl_test_steps /
get_mabl_flow_steps return for existing steps. Read the neighbours first
and mirror their shape rather than inventing fields. For the authoritative
schema and the catalog of step types, ask the server:
# how steps/flows are structured (also: mabl-author://save-tool-mechanics, mabl-author://selector-fields)
mcp__mabl__mabl_get_authoring_guide({ uri: "mabl-author://authoring-patterns" })
# index of every step type; use mabl-schema://step/<TypeName> (e.g. .../Click) for one type's schema
mcp__mabl__mabl_get_schema_resource({ uri: "mabl-schema://step" })
(Both reference tools ship with the same preview as the step-edit tools, so they're available exactly when Lane 2 is.)
Steps are canonicalized on save (e.g. variable aliases are normalized); the
response reports this under canonicalization.
A reusable flow is shared — editing it changes every test that uses it.
Before you write, know the blast radius:
mcp__mabl__list_mabl_tests_using_flow({ flowId: "<*-f>" })
Then acknowledge it explicitly. edit_mabl_flow_steps refuses a
behavior-changing save without acknowledgeShared: true, returning
reason: "shared_flow_requires_acknowledgement" and a usedBySample[] of
impacted tests. Surface that list to the user and get their OK before
re-sending with acknowledgeShared: true. Don't silently acknowledge on
the user's behalf — the point of the gate is that the user sees who else is
affected.
Two more reusable-flow guards worth knowing:
reason: "new_required_parameter" +
blockedParameters[]. This is not bypassable with acknowledgeShared;
give the parameter a default, or make the change in the agent lane.ifMatch: "<versionToken>" (the token from
get_mabl_flow_steps) for optimistic concurrency. If the flow changed since
you read it, the save is rejected with reason: "version_conflict" and the
current steps + a fresh token, instead of forking a variant. Re-read, reapply,
retry.edit_mabl_flow_steps can also edit flow metadata — omit mode and pass
description and/or parameters (note: parameters replaces the declared
list).
Both step tools take an optional branch name and default to master
(mabl's default branch; main is accepted as an alias). List branches with
mcp__mabl__list_mabl_branches({ testId: "<*-j>" }).
Confirm with the user before writing to the default branch. When branch
is omitted, master, or main, the edit lands on the shared mainline that
plans run against — say so and get an explicit OK first. Writing to a named
non-default branch doesn't need that confirmation. (The agent lane manages its
own branching — don't apply this rule there.)
edit_mabl_test_steps is not atomic across flows. When one edit batch
touches several flows, each flow is PATCHed independently, so a mid-batch
failure can leave some flows saved and others not. The response is built for
recovery, not silence:
reason: "partial_save" with flowsPersisted[] and flowsFailed[]reason: "all_flows_failed" when nothing landedReport exactly which flows saved and which didn't, then retry only the failed
ones. Never describe a partial_save as "done." (A single-flow edit, or any
edit_mabl_flow_steps call, is one PATCH — atomic — so this only applies to
multi-flow test-level batches.) A reason: "pre_validation_failed" means the
tool rejected the batch before writing anything — safe to fix and resend.
When the change can't be pinned to exact step JSON — it needs the running app to choose a selector, discover the DOM, or "just make it pass again" — hand it to the cloud authoring agent, which opens the test in a real browser and edits it the way a person would.
mcp__mabl__mabl_authoring_edit({
workspaceId: "<workspace id>",
testInformation: {
testId: "<*-j>",
testCase: "On the search page, after step 4, wait until the results spinner disappears before asserting the row count.",
deploymentId: "<optional — resolves url/app/env>",
branch: "<optional — defaults to the workspace default>"
}
})
This is the only lane that needs a workspaceId (the others key off the test or
flow id). Get it from mcp__mabl__get_current_user or
mcp__mabl__list_mabl_workspaces — or reuse the workspace already saved in your
agent memory.
Returns { sessionId, viewTaskUrl }. It's an async cloud session (minutes, real
compute), not a deterministic edit — poll mcp__mabl__get_agent_session({ sessionId, messageLimit: 0 }), answer any question with mcp__mabl__send_agent_message, and
once it completes verify with mcp__mabl__run_mabl_test_cloud. Write the testCase the way you
would an authoring intent: concrete about what to change and what to verify.
The agent lane runs its own branch handling (a branch name in
testInformation, resolved server-side), so the Lane 2 confirmation mechanic
doesn't apply. The footgun is the same, though: omitting branch lands the edit
on the default branch. Don't spin up a mainline edit silently — tell the user a
no-branch agent edit targets the default branch before you start the session.
The lanes are gated independently, so "just fall back to the agent lane" isn't always possible — one lane being closed tells you nothing about the other. Check what's actually available before promising a change:
| Lane | If unavailable |
|---|---|
| Metadata | always available |
| Structured step | the edit_mabl_*_steps tools aren't listed; calling one returns "Mabl test authoring tools are not enabled for this workspace. Contact mabl support to join the preview." |
| Agent | mabl_authoring_edit isn't listed / returns a not-enabled error |
Degrade honestly. You can't see which previews a workspace has — so judge a lane by what you can see: a lane is open when its tool is in your tool list, and closed when the tool is absent or returns the not-enabled error above.
edit_mabl_*_steps tools aren't in your tool list, the structured
lane is closed — fall to the agent lane only if mabl_authoring_edit is
present.A flow tagged legacy_unsupported (an older flow format) can't be edited by
the structured lanes — edit_mabl_test_steps returns
reason: "wrong_authoring_boundary" and edit_mabl_flow_steps returns
reason: "legacy_format_unsupported". Route these to the agent lane, or to the
Trainer GUI.
mabl tests edit opens the test in the Trainer GUI — an interactive desktop
editor a person drives by hand. It isn't agent-drivable, so this skill doesn't
use it, but it's the right answer when every automated lane is closed (the
previews aren't enabled, a legacy flow, or a change too fiddly to describe).
Mention it to the user as the fallback; don't try to script it.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
9 skills in this plugin
/mabl-debugDiagnose and fix failures detected by mabl end-to-end tests. Forensic
inspection of an already-failed run (`mabl agent debug steps`,
`mabl agent debug artifact`) plus an interactive live session that
re-runs the test step-by-step in a real Chrome attached to the agent
via CDP (`mabl agent debug session …`).
Fire when the user mentions a mabl test failure, gives a test run ID
(`*-jr`) or plan run ID (`*-pr`), asks to investigate / debug / fix /
reproduce a failing test, or pairs "mabl" with words like "failing",
"broken", "regression", "step through".
/mabl-initOne-time project setup for mabl. Discover this user's mabl workspace,
applications, environments, and credentials over the mabl MCP server, then
save everything an AI agent needs to create and run mabl cloud tests where the
user wants it — an agent memory file (CLAUDE.md / AGENTS.md /
.github/copilot-instructions.md), a rule, or a skill.
Fire when the user says "set up mabl", "mabl init", "initialize mabl",
"configure mabl for this project", "save my mabl workspace / application /
environment / credentials", "add mabl to my CLAUDE.md", or "/mabl-init".
Run this once per project, before authoring or running tests. For creating a
single test use mabl-test-authoring; for a whole suite use
mabl-test-coverage-design.
/mabl-playwright-exportTurn a mabl browser test into a Playwright spec that runs in the user's own
Playwright project. The mabl CLI translates the test step by step, choosing
locators from what mabl learned about the page; this skill then fits the
file to the project (config, login, credentials, shared flows), writes the
steps the CLI could not translate where Playwright can express them, and
runs the spec locally, repairing failures until it passes or it can say why
not. The spec runs on this machine, not in the mabl cloud.
Fire when the user wants a mabl test "in Playwright", asks to "export",
"convert" or "migrate" a mabl test or plan to Playwright, or wants mabl
coverage in their own Playwright suite, with a test id (`*-j`), several, or
a plan, or to pick up an export left unfinished. Browser tests only.
To CREATE a mabl test use mabl-test-authoring; to debug a FAILING mabl run
use mabl-debug.
/mabl-test-authoringCreate a SINGLE mabl browser or API test through conversational planning
and cloud authoring. Plan one test with an AI agent, refine the plan
iteratively, initiate cloud (or local) test generation, then validate that
the test it built actually matches what you asked for and fix it if not.
Fire when the user wants to create one mabl test, asks to "plan a test",
"create a test for <one scenario>", "generate a mabl test", "author a
test", or mentions testing a single URL / ticket with mabl.
For broad coverage of a whole feature / page / flow with MULTIPLE tests,
use mabl-test-coverage-design instead — it explores the feature, designs
the suite, and calls THIS skill once per test.
/mabl-test-coverage-designUse when asked to create MULTIPLE mabl tests / a whole suite for a feature area — "add mabl coverage for X", "cover the X page/feature with mabl tests", "design a mabl test suite for X", "let's create tests for X", "explore X and create tests", or "/mabl-test-coverage-design". For testing a page, screen, form, flow, or feature broadly, not one specific scenario. This skill explores the feature, designs the set of tests, then authors each one in the mabl cloud. For a SINGLE test, use mabl-test-authoring directly.
/mabl-test-edit-verifyCERTIFIES an edit already made to a mabl test, without trusting the green
run. NOT for reporting what changed between two versions — that is
mabl-version-compare, which states the diff and leaves the verdict alone.
This one holds the intent and rules on it. Diffs against the version before
the change to catch a pass bought by deleting coverage, re-runs it
isolated on a branch when that version still needs a run, requires more than
one clean run for a flaky test, and reports verified / problem found /
can't verify / verified-but-not-green. Never edits, never merges.
Fire after a test was changed — by an agent, in the Trainer, by anyone — and
someone asks "did that actually fix it", "verify this fix", "is this branch
safe to merge", or whether the edits match the intent the editor was given:
"do these edits match what was asked", "did the agent do what I told it to".
Also fires on a handed-over branch carrying an edited test.
To make the edit use mabl-test-edit; to find what is wrong use mabl-debug.
npx claudepluginhub mablhq/skills --plugin mablOther plugins' skills for the same job