Workflow with Claude Code¶
Clipboard icons
Commands and prompts on this page use fenced blocks with a copy button (top-right). Click to copy the full text for Terminal, Claude, or Cursor.
This track is for developers and power users who work in Cursor (or VS Code) with Claude Code (or Cursor Agent with Claude), use Git optionally, and may contribute to LXPack itself.
Using Cursor without AI?
If you want Cursor only as an editor — no Claude — follow Workflow with Cursor (without Claude) instead.
The validate → preview → build loop is identical to the Claude Design workflow; differences are tooling, AI-assisted edits, and repository hygiene.
Prerequisites¶
- Node.js 18 or 20,
@lxpack/cliinstalled globally (or viapnpm execfrom the LXPack monorepo) - Cursor with Claude Code enabled
- Comfort with Terminal, YAML, and HTML
Install Library Skills (recommended)¶
From the LXPack repo (or your fork), install agent skills once:
Or per course project:
./library-skills/install.sh --project --directory ./product-training
Skills include lxpack-author, lxpack-interaction, lxpack-export, and lxpack-migrate-legacy. They load on demand so Claude does not need a megaprompt every session. Details: Library Skills.
Open your course in Cursor¶
Open the whole course folder — not individual files in isolation — so Claude sees course.yaml, lessons/, and assessments/ together.
Recommended workspace layout¶
product-training/
course.yaml
lxpack.config.json
lessons/
interactions/
assessments/
assets/
components/ # optional overrides
.lxpack/ # gitignore this
Add .lxpack/ to .gitignore if you use Git.
Daily loop with Claude Code¶
- Describe the change in Cursor chat (“Add lesson
glossaryafter welcome, link in course.yaml”). - Let Claude edit multiple files; review the diff.
- Run in the integrated terminal:
lxpack validate
lxpack preview
```
4. For export-specific rules:
```bash title="lxpack validate --target scorm2004"
lxpack validate --target scorm2004
lxpack build --target scorm2004
```
5. Commit when satisfied:
```bash title="git add course.yaml lessons/ assessments/"
git add course.yaml lessons/ assessments/
git commit -m "Add glossary lesson"
```
## Working inside the LXPack monorepo
When developing LXPack from source:
```bash title="git clone https://github.com/eddiethedean/lxpack.git"
git clone https://github.com/eddiethedean/lxpack.git
cd lxpack
corepack enable
pnpm install
pnpm build
cd examples/security-awareness
pnpm exec lxpack preview
pnpm exec lxpack validate
pnpm exec lxpack build --target scorm12
Use pnpm exec lxpack so you run the workspace CLI, not only the global install.
Validate all examples:
When to read developer docs vs user reference¶
| Question | Read |
|---|---|
| How do I author a course? | User guides and Reference |
| How does validation work internally? | SPEC |
| Package boundaries, analytics | ARCHITECTURE |
| Roadmap / phases | ROADMAP |
Claude Code tips¶
- Reference example courses in prompts: “Match the flow pattern in
examples/branching-demo/course.yaml.” - Ask Claude to run
lxpack validateand paste stderr on failure. - For HTML interactions, require the
window.parent.lxpack.trackhook from Building interactions. - Do not invent CLI subcommands beyond:
init,preview,validate,buildwith--target scorm12|scorm2004|standalone|xapi|cmi5(repairis not implemented).
Git workflow for teams¶
| Practice | Why |
|---|---|
One repo per course (or monorepo with courses/*) |
Clear ownership |
PR review on course.yaml + content |
Catch broken ids before build |
CI running lxpack validate |
Same checks locally — add to your pipeline if needed |
Never commit .lxpack/ output |
Reproducible builds |
Security reminders for implementers¶
- Author
assessments/*.yamlstays in Git; exports embed learner-safe bundles. - Do not fetch assessment YAML in custom HTML — use embedded config only.
- Path traversal: keep all assets inside the course directory.
See SPEC — security for full requirements.
Related¶
- Cursor without Claude — same IDE, no AI authoring
- Claude Design workflow — share with non-coder teammates
- Prompts for Claude & Cursor
- Developer index