create-workflow
Turn a short natural-language test description into a new getlark workflow. The user supplies the description (target + steps). This skill derives a concise workflow name, surfaces optional settings (mode, secret contexts, group), and calls getlark workflows create.
getlark workflows can test any surface — web UIs, HTTP/GraphQL APIs, CLIs, shell scripts, data pipelines, or mixed flows. Do not assume the target is a browser URL.
Inputs
- Description (required) — free-form text containing a target (URL, API base, CLI binary, script path, etc.) and ordered steps. Examples:
- Browser: "Go to https://app.example.com/login, sign in with the
stagingcredentials, click 'New project', confirm the modal, assert dashboard loads." - API: "POST https://api.acme.test/v1/orders with
staging_apicreds and a sample cart payload, assert 201 and that the responseorder.statusispending." - CLI: "Run
mytool import ./fixtures/sample.csv --dry-run, assert exit code 0 and stdout contains3 rows parsed."
- Browser: "Go to https://app.example.com/login, sign in with the
If the user invoked /getlark:create-workflow <text>, treat <text> as the description. Otherwise ask for it.
Procedure
Step 1 — Collect / confirm the description
Ensure the description contains a target (URL, API endpoint, CLI command, script path, etc.) and at least one action step. If either is missing, ask one targeted follow-up. Do not pad thin descriptions with invented steps — confirm with the user first.
Step 2 — Derive a name
Generate a short, Title-Case name (3–6 words) that captures the intent. Heuristic:
- Start from the primary verb + object in the description ("Sign In Flow", "Guest Checkout", "Create New Project").
- Keep under ~50 characters.
- Avoid URL fragments, credentials, or timestamps.
Show the derived name to the user before creating. Offer to accept or override.
Step 3 — Ask about optional fields (only if relevant)
Ask only the questions that matter for this workflow. Skip the rest.
- Mode — default
ai_driven. Only ask if the user mentioned "deterministic", "scripted", "locked", or similar. - Secret contexts — ask if the description references credentials, API tokens, or anything named in quotes that looks like a context (e.g., "the
stagingcredentials"). Offer to list existing contexts viagetlark secret-contexts list. - Group — ask if the user has mentioned organizing tests, or if
getlark workflow-groups listhas existing groups. Otherwise skip.
Use AskUserQuestion for a single batched prompt when more than one optional field is in play.
Step 4 — Invoke the CLI
Build the command with properly quoted arguments:
getlark workflows create \
--name "<derived name>" \
--description "<full description>" \
[--mode deterministic] \
[--secret-contexts name1 name2] \
[--group-id <id>]
Description is passed verbatim — getlark's generation step parses the target and steps server-side. Do not restructure or bullet-ify it.
Note: --secret-contexts takes space-separated values (variadic), not comma-separated.
Step 5 — Report result
The CLI prints the new workflow JSON to stdout. Extract and report:
- Workflow
id status(will typically bepending_generationinitially)- Link:
https://dashboard.getlark.ai/workflows/<id>
Tell the user the workflow is now queued for generation and suggest they run /getlark:invoke-workflow once the workflow status reaches active (or generation_successful). They can check status via getlark workflows get <id>.
Failure modes
--nameor--descriptionmissing: the CLI hard-errors. This skill must always supply both.- Unknown
--group-id: verify withgetlark workflow-groups listbefore passing. - Unknown
--secret-contextsname: verify withgetlark secret-contexts list. The API will reject unknown contexts.
Example
User says: /getlark:create-workflow Go to https://app.example.com/signup, fill the form with a new email, submit, verify confirmation email message appears.
Derive: name = "Signup Flow Confirmation"
Run:
getlark workflows create \
--name "Signup Flow Confirmation" \
--description "Go to https://app.example.com/signup, fill the form with a new email, submit, verify confirmation email message appears."
Report id + dashboard link.