Skip to content

Use Luthor with AI coding agents

A coding agent that has not seen Luthor tends to invent methods or write 0.x calls. The Luthor skill teaches agents the Luthor API and code generation.

Terminal window
npx skills add exaby73/luthor

The command adds the skill to your project’s agent skills directory, where tools that read the skills format pick it up. The skill lives in the Luthor repository under skills/luthor/.

The skill covers the API. Your project still has to say which setup it uses, because the generator supports several. One line in your agent instructions is enough:

Models use freezed with @luthor. Run `dart run build_runner build` after changing a model.

Or, for a project without a generator:

Validation uses hand-written luthor schemas in lib/validation/. Do not add luthor_generator.

Generated or hand-written, the same checks apply. dart analyze catches a 0.x call, because the renamed methods no longer exist in 1.0. For the rest, Upgrading to 1.0 lists the behaviour changes an agent trained on older examples is most likely to get wrong: unknown keys are stripped, custom validators are not called for null, and errors are a flat map keyed by path.