2 minutes Claude Code, Cursor
Install Orwel with your agent
Your agent detects the framework, installs the SDK and wires your forms. You just review.
-
Add the Orwel skill
Works with Claude Code, Cursor and agents that support skills. It teaches the agent the SDK rules.
terminalnpx skills add hyperlabs-ai/hyper-skills/orwel -
Ask it to install Orwel
Paste this prompt into your agent from the project root. It already carries your key if you are signed in.
prompt.md# Install Orwel in this project Orwel records the visitors, leads and conversions of this site. Install it and wire lead capture with these steps. ## 1. Install and configure - Detect the framework and package manager. Install the SDK: `npm i orwel@latest` (or the yarn or pnpm equivalent). - If the site has no build step (plain HTML, WordPress, Shopify, Webflow), use the CDN script in the <head>: `https://cdn.jsdelivr.net/npm/orwel@1/dist/orwel.umd.js`, then `orwel.init({ apiKey })`. - Store the key in a public env var for the framework (PUBLIC_ORWEL_KEY in SvelteKit and Astro, NEXT_PUBLIC_ORWEL_KEY in Next.js, VITE_ORWEL_KEY in Vite) with this value: orwel_pk_TU_KEY - Add the empty var to .env.example and make sure .env is in .gitignore. Never write the literal key in code. - Create a module (for example src/lib/orwel) that reads the var, warns and skips init when it is missing, and re-exports `orwel` so it is imported from one place. - Call `orwel.init({ apiKey })` once, client side, when the app boots (root layout or main), before any event. ## 2. Capture leads - Find every form that captures a contact: contact, demo, quote, signup, newsletter. - On submit, after validation: `orwel.identify({ email, name, phone, company })` with whatever it has, and `await orwel.conversion('<code>', { ...form data })`. - Use descriptive snake_case codes: contact_form, demo_request, quote_request, signup, newsletter_signup. - Await the conversion before redirecting, showing the success message or unmounting the form. - If the form is a purchase or payment, include `amount` (number) and `currency` (for example USD) in the properties. - Do not use `orwel.form()` on those same forms: every submit would count twice. ## 3. Verify - To test locally use the workspace development key (Orwel, Dev mode): its events are flagged as test. - Open Orwel, Dev mode, load the site and submit a form. The session, the identify and the conversion must show as accepted. - When done, list the files you changed and which conversion code each form fires. -
Verify it live
Use the dev key instead of the production one while you test. Those events are flagged as test and never count in your reports.
Open your site with the dev key and watch every event arrive in Dev mode Open Dev mode
No key yet?
Create your workspace and this guide fills in your keys.