Skip to content

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/cli installed globally (or via pnpm exec from the LXPack monorepo)
  • Cursor with Claude Code enabled
  • Comfort with Terminal, YAML, and HTML

From the LXPack repo (or your fork), install agent skills once:

./library-skills/install.sh --global
./library-skills/install.sh --global

Or per course project:

./library-skills/install.sh --project --directory ./...
./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

lxpack init product-training
lxpack init product-training
cd product-training
cursor .

Open the whole course folder — not individual files in isolation — so Claude sees course.yaml, lessons/, and assessments/ together.

product-training/
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

  1. Describe the change in Cursor chat (“Add lesson glossary after welcome, link in course.yaml”).
  2. Let Claude edit multiple files; review the diff.
  3. Run in the integrated terminal:
lxpack validate
   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:

pnpm examples:validate
pnpm examples:validate

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 validate and paste stderr on failure.
  • For HTML interactions, require the window.parent.lxpack.track hook from Building interactions.
  • Do not invent CLI subcommands beyond: init, preview, validate, build with --target scorm12|scorm2004|standalone|xapi|cmi5 (repair is 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/*.yaml stays 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.