@guidia/skills
Generate Tour Studio workflows from an AI agent
The `@guidia/skills` package lets Cursor, Claude, Codex or any Node script scaffold and validate JSON bundles (pages + actions + flows), then import them with **Import JSON** on `/admin/tours`.
Installation
Install globally or as a project dependency: `npm i -g @guidia/skills` or `npm i @guidia/skills`. The `guidia` binary is available after a global install.
Typical agent workflow
1. `guidia init my-bundle.json --locale en`: valid starter with sample pages, actions and a demo flow.
2. The agent edits the JSON (or uses the TypeScript `workflow()` builder).
3. `guidia validate my-bundle.json`: runs Zod schema + cross-ref checks (exit 1 on blocking errors).
4. On `/admin/tours`, select the app, then **Import JSON**: pick the file, choose `merge` or `replace`.
Programmatic API
Import `workflow` and `validateBundle` from `@guidia/skills`. The builder auto-slugifies keys, deduplicates and renumbers `sort_order`. The validator flags dangling references (`action_key`, `page_key`) as warnings.
Write the bundle to disk, then import it in Tour Studio via **Import JSON** on `/admin/tours` (same path as console export).
Route coverage (`meta.coverage`)
Each app has its own routes: they are not taken from `frontend/src/app/`. Use `guidia coverage --mode bundle` to audit a bundle (pages without actions, orphan refs). Compare against your inventory with `--mode custom --inventory routes.json`. Mode `repo` is for guidia.dev reference bundles only.
Details: dedicated section on `/docs/tour-studio-bundle`. Examples: `examples/guidia-admin-console.bundle.json` and `guidia-home-vitrine.bundle.json`.
Docs and schema
Full guide: `/docs/tour-studio-bundle`. JSON Schema for IDE autocomplete: `@guidia/skills/schema.json`. SKILL.md ships inside the package for Cursor agent skills.
Ready-made example: `examples/onboarding.workflow.json` in the `sdk/skills` repo folder.