| name | webwright-to-intuned |
| description | Transform a Webwright "Crafted CLI" (the parameterized final_script.py produced by a `webwright craft` run) into a deployed, hosted Intuned project. Use when the user wants to port, convert, host, or deploy a Webwright craft/reusable CLI to the cloud — Intuned is the hosting target — or says "turn this craft into an Intuned project", "host this on Intuned", "host this webwright on the cloud", "deploy this craft to the cloud", "run this webwright in the cloud". Faithfully maps one parameterized craft function to one Intuned `automation` API, scaffolds the project, runs it locally, deploys it, and verifies a standalone platform run. |
Webwright → Intuned
Port a Webwright Crafted CLI into a deployed Intuned project and verify
it end to end. The contract is a faithful 1:1 port: one craft function →
one Intuned automation API, re-fitted only at Intuned's boundary.
Prerequisites
- The Intuned CLI is installed and authenticated. If the
intuned command isn't
found, install it first: npm i -g @intuned/cli. Then confirm auth with
intuned auth whoami (it should show a workspace). The skill never logs the
user in or creates accounts — if whoami fails, stop and ask the user to
authenticate.
- Input is a Webwright craft output directory (contains
final_script.py
with an argparse wrapper, plan.md, task.json). If it isn't, stop and say so.
Read first
Supporting docs live in resources/ beside this file.
resources/transformation-rules.md — the step-by-step transform and gates.
resources/intuned-contract.md — the exact target (API signature, SDK, CLI,
manifest), all verified against real scaffolds.
resources/gotchas.md — the hardening layer. Re-read before every port and
add to it after every failure.
resources/CONTEXT.md — canonical vocabulary. resources/DECISIONS.md — why
the key decisions hold.
Workflow (one port)
- Validate the input is a real craft; else fail loudly.
- Scaffold
intuned dev init <task_id> --template <python-starter | python-starter-auth> --language python --install-deps --non-interactive [--stealth] into
intuned_projects/<task_id>/.
- Transform per
resources/transformation-rules.md:
- strip the browser bootstrap +
asyncio.run wrapper; the inner async body
becomes async def automation(page, params=None, **_kwargs);
- map surviving params (snake_case preserved, harness params dropped+logged)
into
Params, a pydantic schema if needed, and .parameters/.../default.json
so empty params reproduce the task;
- replace
page.goto → go_to_url; drop screenshots/file-writes; log()→print();
return substantive data minus harness fields;
- set
apiAccess.enabled: true and the Playground default input in Intuned.jsonc.
- Local gate:
intuned dev run api <name> '{}'; compare output to the craft's
final_runs/ known-good shape/count. If the run is blocked by anti-bot
defenses, don't keep fighting it locally — stealth/captcha/proxy only apply on
the deployed platform (see step 6 and the bot-detection note below).
- Deploy: after the local gate passes, ask the user whether to deploy to
Intuned (surface the target workspace when you ask). Only on a yes, run
intuned dev deploy --non-interactive; otherwise stop here.
- Platform run (final gate):
intuned platform runs start '{"api":"<name>","parameters":{}}' -p <task_id>; poll intuned platform runs get <id> until terminal.
- On any failure, root-cause into a
resources/gotchas.md entry, fix, re-run.
Exceptions to faithful-port (decide deliberately)
- Auth craft → AuthSessions (resources/DECISIONS.md §2): decompose login into
auth-sessions/create.py + a derived check.py, enable authSessions; the
automation assumes a valid session. Test with dev run authsession create
then --auth-session.
- Bot-detection block (resources/DECISIONS.md §3): if a run is blocked by
anti-bot defenses, don't conclude the port is broken — stealth, captcha solving,
and proxies run only on the deployed platform. Set
headful + stealthMode in
the manifest and verify with a deployed run; add captchaSolver/proxy if the
deployed run is still walled. Configure per the Intuned docs:
https://intunedhq.com/docs/main/02-features/stealth-mode-captcha-solving-proxies
- No crawl fan-out by default — a crawl returns a flat list from one API;
extend_payload is opt-in only.
Guardrails
- Never launch a browser in
automation (page is injected).
- Never invent Intuned APIs the craft didn't imply; this is a port, not a rewrite.
- Deploy goes to the user's own workspace — surface which workspace before first deploy.
- Don't try to beat bot-detection locally; that's what the deployed run is for.