/langium-ai:lai-gen-language-skillfrom langium-ai
Generates a standalone skill document for a Langium-based DSL, covering syntax, semantics, patterns, and pitfalls. Use after descriptor and system prompt generation.
Ships in langium-ai. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This guide instructs an agent on how to generate a comprehensive, standalone skill document (a markdown file) for working with a specific Langium-based DSL. The output skill should give any agent or developer a deep understanding of the target language — its syntax, semantics, use cases, patterns, and pitfalls — without requiring access to the original project sources at runtime.
You may also use the lai and langium skills to achieve a better understanding of langium-ai and the Langium-based DSL in question that we wish to generate a skill for.
lai gen descriptor, lai gen sysprompt)Gather these from the project before generating the skill:
language.descriptor.yml) — the structured YAML descriptor produced by lai gen descriptor.langium) — the full grammar definitionThe generated skill must be placed in the project's existing skills directory, following the standard skill folder convention:
Detect the skills directory. Check for these paths in order and use the first that exists:
.claude/skills/ (Claude Code projects).agents/skills/ (generic agent projects).claude/skills/ by default.Create a named folder. Inside the skills directory, create a folder named after the language (lowercase), e.g., .claude/skills/latria/.
Write SKILL.md. The skill document must be named SKILL.md inside that folder.
Include YAML frontmatter. The file must begin with frontmatter so agent frameworks can discover and register the skill:
---
name: <language-name>
description: <one-line description of what the skill covers>
user-invocable: false
---
The name should match the folder name (lowercase). The description should summarize the skill's scope concisely. Set user-invocable: false for language knowledge skills (they are reference material, not callable actions).
Example output path: .claude/skills/latria/SKILL.md
The generated skill should be a single markdown file (after the frontmatter) with the following structure. Not all sections are required — include only those that apply to the target language.
# <Language Name> Language Skill
A comprehensive guide to understanding and working with the <Language Name> DSL.
---
## Overview
What the language is for, its domain, and its primary use cases.
Who uses it, what problems it solves, and where it fits in a larger toolchain.
## Core Concepts
The fundamental abstractions and mental model of the language.
Define the key terms and how they relate to each other.
This section should let a reader build an accurate mental model before seeing any syntax.
## Syntax Reference
### Entry Rule and Program Structure
What a valid program looks like at the top level.
### Key Grammar Rules
The most important grammar constructs, explained with examples.
Not a dump of the full grammar — a curated walkthrough of the rules that matter most.
### Literals, Types, and Primitives
Built-in types, literal syntax, and type system basics (if applicable).
### Keywords and Reserved Words
List of keywords with brief descriptions of what they do.
## Semantics
### Validation Rules
What the validator enforces — the semantic constraints beyond syntax.
List each rule with a brief explanation and an example of code that violates it.
### Scoping and Name Resolution
How cross-references resolve. What names are visible where.
Include examples of valid and invalid reference patterns.
### Linking Behavior
How the linker connects references to declarations.
Any custom linking behavior specific to this language.
### Type System
Type checking rules, type compatibility, inference (if applicable).
## Examples
### Minimal Valid Program
The smallest program that parses and validates without errors.
### Common Patterns
Idiomatic patterns that appear frequently in real usage.
Each pattern should have a name, a code example, and a brief explanation.
### Advanced Patterns
More complex constructs that combine multiple language features.
## Dos and Don'ts
### Do
- Concrete, actionable guidelines for writing correct and idiomatic code.
- Each item should explain *why*, not just *what*.
### Don't
- Common mistakes and anti-patterns with explanations.
- Each item should include an example of the mistake and how to fix it.
## Common Errors and Fixes
A table or list of frequent errors (parser errors, validation errors),
what causes them, and how to resolve them.
## Edge Cases
Surprising or non-obvious behaviors. Boundary conditions.
Things that look like they should work but don't (or vice versa).
## Interoperability
How the language interacts with external systems, file formats,
or other languages in the toolchain (if applicable).
## Glossary
Key terms specific to this language, briefly defined.
Follow these steps to produce the language skill:
Load the language.descriptor.yml and the grammar file it references. The descriptor gives you the project structure; the grammar gives you the authoritative syntax definition.
Load each custom service file referenced in the descriptor's services section:
examples arraytests directoryIf a system prompt has already been generated, read it. It contains a curated, LLM-refined view of the language that can serve as a foundation — but the skill should go deeper and broader.
Assemble the skill using all gathered information. Follow these principles:
Before finalizing, verify:
LangiumEvaluator if possible)Person, Order, Item) and use it throughout so examples feel connected.entity Person { // <-- entry point.| Artifact | Purpose | Scope |
|---|---|---|
| Descriptor | Machine-readable project structure | Paths and metadata |
| System prompt | LLM generation instructions | Focused on producing valid code |
| Language skill | Comprehensive language knowledge | Full understanding for agents and developers |
The descriptor drives generation. The system prompt is optimized for a single task (code generation). The language skill is a broader teaching document that covers understanding, not just generation.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
7 skills in this plugin
/laiGuide for using the langium-ai (LAI) CLI to generate language descriptors, synthesize system prompts, run evaluations, and iteratively refine AI-powered tooling in Langium projects. Use when working with lai commands, descriptors, or evaluation files./lai-gen-descriptorGenerate or refine a language descriptor for a Langium DSL project. Bootstraps a new descriptor via `lai gen descriptor` if none exists, then guides refinement of paths, services, examples, documentation, and structure./lai-gen-evalsExpand and refine the evaluation suite for a Langium DSL project. Generates comprehensive eval files that cover syntactic correctness, semantic validity, user intent matching, edge cases, and language understanding.npx claudepluginhub eclipse-langium/langium-ai --plugin langium-aiOther plugins' skills for the same job