Guides users in building software with the BESSER low-code model-driven platform. Covers creating B-UML domain models (classes, attributes, associations, enumerations, generalizations), running generators (Django, FastAPI, SQLAlchemy, Pydantic, React, etc.), modeling state machines, chatbot agents, GUI models, and other B-UML model types.
Ships in besser. 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.
Read when SKILL.md points to them; scripts run unread.
BESSER is a model-driven platform: describe your domain as a model, then generators turn that model into running code. The model is the source of truth — when requirements change, update the model and regenerate. Never hand-edit generated code as your primary change.
1. Define requirements
2. Build a B-UML model (Python API, PlantUML, or web editor)
3. Validate the model: model.validate()
4. Pick a generator for your target platform
5. Generate code
6. Verify the output (run, test, inspect)
7. Iterate: update the model, regenerate
A B-UML model is useful even if you never run a generator. Feed it to a
generator for code, or embed it in a README/design doc as a correct,
validate()-checked class diagram that documents any project. So
reach for this skill whenever you need an accurate class diagram — not only
when the project will use BESSER's generators.
Deliver it accordingly: default to a runnable .py file, or embed the same
B-UML in Markdown when the request is documentation-oriented. For the full
how-to — making the file self-contained, and the two ways the user runs or
imports it — see references/delivering-models.md.
Don't deliver the diagram as a Mermaid block. This skill exists so the diagram is a real,
validate()-checked B-UML model — not a throwaway```mermaid classDiagram```that drifts from the code. When asked for a class diagram, the deliverable is B-UML (the.pymodel and/or the same model embedded in Markdown); when a rendered image is wanted, produce an SVG/PNG from the B-UML — one call to BESSER's headlessB-UML → SVGendpoint (POST https://editor.besser-pearl.org/besser_api/get-svg, send the.py), or Import → B-UML in the web editor, then export. A quick ASCII sketch is fine as an inline preview, but the authoritative artifact is always the B-UML model — not Mermaid.
This skill keeps SKILL.md short. Reach into references/ and scripts/
when you need depth. All references are verified against the BESSER version shown in the README
badge; where behaviour changed after it, the reference says so.
| You need | Read |
|---|---|
| Class diagram modeling (classes, attributes, associations, enums, generalizations, methods, validation) | references/class-diagram.md |
PlantUML notation and the plantuml_to_buml() call | references/plantuml.md |
| State machine modeling | references/state-machines.md |
| Chatbot/agent modeling and the BAFGenerator | references/agents.md |
| GUI modeling for WebAppGenerator/DjangoGenerator | references/gui-models.md |
How to deliver a model (.py vs. Markdown diagram) and code-vs-docs outcomes | references/delivering-models.md |
| Object/instance models (objects, attribute values, links; OCL test data) | references/object-models.md |
| Feature models (software product lines: features, groups, configurations) | references/feature-models.md |
OCL constraints (writing/attaching Constraints; bocl validation) | references/ocl.md |
| Deployment models (clusters/nodes/services for the TerraformGenerator) | references/deployment.md |
| Neural-network models (layers, tensor ops; Pytorch/TF generators) | references/neural-networks.md |
| Quantum circuits (gates; QiskitGenerator) | references/quantum.md |
| Project models (bundling models + metadata) | references/project.md |
| Per-generator options, output paths, customization | the besser-generators skill |
| Errors and diagnostics | the besser-troubleshooting skill |
To bootstrap a new model quickly:
python scripts/scaffold_model.py Library Book Author
# prints ready-to-edit Python that builds a DomainModel with those classes
python -m venv venv
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate
pip install besser
# OR for the latest development version:
git clone https://github.com/BESSER-PEARL/BESSER.git
cd BESSER
pip install -e .
Verify:
python -c "from besser.BUML.metamodel.structural import DomainModel; print('OK')"
Python 3.11+ required.
Most projects only need classes, attributes, and associations. Here is the
minimum that gets you to a runnable generator. For the full reference (all
multiplicities, generalizations, enumerations, methods, OCL constraints),
read references/class-diagram.md.
from besser.BUML.metamodel.structural import (
DomainModel, Class, Property, Multiplicity,
BinaryAssociation, StringType, IntegerType,
)
# Classes
title = Property(name="title", type=StringType)
pages = Property(name="pages", type=IntegerType)
book = Class(name="Book", attributes={title, pages})
author_name = Property(name="name", type=StringType)
author = Class(name="Author", attributes={author_name})
# Association: a Book has 1..* Authors; an Author writes 0..* Books
written_by = Property(name="writtenBy", type=author, multiplicity=Multiplicity(1, "*"))
publishes = Property(name="publishes", type=book, multiplicity=Multiplicity(0, "*"))
book_author = BinaryAssociation(name="book_author", ends={written_by, publishes})
model = DomainModel(name="Library", types={book, author}, associations={book_author})
assert model.validate()["success"]
Naming rules: no spaces, no hyphens. My_Class and my_attribute,
not My Class or my-attribute.
PlantUML imports are also supported via plantuml_to_buml() — see
references/plantuml.md if needed. The Python API is the recommended
path.
| Goal | Generator | Input | Output |
|---|---|---|---|
| Python classes | PythonGenerator | DomainModel | classes.py |
| Java classes | JavaGenerator | DomainModel | .java files |
| Pydantic models | PydanticGenerator | DomainModel | pydantic_classes.py |
| SQLAlchemy ORM | SQLAlchemyGenerator | DomainModel | sql_alchemy.py |
| Raw SQL DDL | SQLGenerator | DomainModel | tables_<dialect>.sql |
| JSON Schema | JSONSchemaGenerator | DomainModel | json_schema.json |
| FastAPI backend | BackendGenerator | DomainModel | API + ORM + Pydantic |
| Django app | DjangoGenerator | DomainModel + optional GUIModel | Django project |
| Full-stack web app | WebAppGenerator | DomainModel + GUIModel | React + FastAPI + Docker |
| Conversational agent | BAFGenerator | Agent | Agent script + config |
| Quantum circuit | QiskitGenerator | QuantumCircuit | qiskit_circuit.py |
| RDF vocabulary | RDFGenerator | DomainModel | vocabulary.ttl |
| Terraform infra | TerraformGenerator | DeploymentModel | .tf files |
| Neural network | PytorchGenerator / TFGenerator | NN model | PyTorch/TF script |
| Flutter app | FlutterGenerator | DomainModel + GUIModel | Dart files |
PythonGenerator or PydanticGenerator.SQLAlchemyGenerator (ORM) or SQLGenerator (raw DDL).BackendGenerator — gives you FastAPI + SQLAlchemy + Pydantic in one shot.WebAppGenerator — React + FastAPI + Docker Compose, but you must also build a GUIModel (see references/gui-models.md).DjangoGenerator.FlutterGenerator — also needs a GUIModel (see references/gui-models.md).Agent (state machine + intents) and use BAFGenerator (see references/agents.md).This table is a starting-point overview, not the full catalog. For every generator, option, gotcha, and exact output path — the authoritative matrix — defer to the besser-generators skill.
All generators share the same shape — construct with the model, call
generate():
from besser.generators.python_classes import PythonGenerator
generator = PythonGenerator(model=my_model, output_dir="./output")
generator.generate()
Each call to generate() overwrites prior output — that is intentional;
the model is the source of truth. Output usually goes to <cwd>/output/
when output_dir is omitted, but some generators differ (e.g.
BackendGenerator uses ./output_backend/, WebAppGenerator requires an
explicit output_dir, DjangoGenerator creates a project folder).
Per-generator constructor options and exact output paths — dbms for
SQLAlchemy, http_methods/nested_creations for the backend,
containerization for Django, the required gui_model for WebApp/Flutter,
and the rest — live in the besser-generators skill. Reach for it whenever
you need more than the bare generate() call above.
The visual editor at https://editor.besser-pearl.org lets users build models graphically and generate code without writing Python:
You can also import an existing model instead of starting from a
blank diagram: use Import and select the B-UML format to load a
.py model file (or JSON). This means a model you build with the Python
API can be opened in the editor, edited visually, and exported again — so
handing the user a .py file (see references/delivering-models.md)
doubles as a web-editor import.
The editor uses the same generators as the Python API — the backend
converts the visual diagram to a B-UML model, runs the generator, and
streams the result. Any generator that registers in SUPPORTED_GENERATORS
(see the besser-dev skill) shows up in the dropdown.
After generate() returns:
python -c "import ast; ast.parse(open('output/classes.py').read())".cd output && pip install -r requirements.txt && uvicorn main_api:app.Multiplicity(0, 1)), inheritance hierarchies.docker-compose up --build.If something is missing or wrong, the besser-troubleshooting skill maps symptoms to fixes.
generate() replaces output files. Customizations live in separate files (see the besser-generators skill for safe customization patterns).model.validate() before generating.DomainModel feeds multiple generators — Python classes, SQL, REST API, etc. — so it is rarely worth maintaining target-specific models.PascalCase for classes/enums and snake_case or camelCase for attributes are conventions, not requirements.references/agents.md (opens in a new tab)references/class-diagram.md (opens in a new tab)references/delivering-models.md (opens in a new tab)references/deployment.md (opens in a new tab)references/feature-models.md (opens in a new tab)references/gui-models.md (opens in a new tab)references/neural-networks.md (opens in a new tab)references/object-models.md (opens in a new tab)references/ocl.md (opens in a new tab)references/plantuml.md (opens in a new tab)references/project.md (opens in a new tab)references/quantum.md (opens in a new tab)references/state-machines.md (opens in a new tab)scripts/scaffold_model.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
/besser:besser-userfrom besser
npx claudepluginhub besser-pearl/besser-skills --plugin besser4 skills in this plugin
/besser-devContributor guide for developing BESSER itself (https://github.com/BESSER-PEARL/BESSER). Use this skill whenever the user is working *inside* the BESSER source tree — adding a new generator (the most common contribution), adding a new metamodel or sub-DSL under `besser/BUML/metamodel/`, writing pytest tests for generators or metamodels, writing JSON↔BUML converters for the web editor, building Sphinx documentation under `docs/source/`, registering a generator in `SUPPORTED_GENERATORS`, or preparing a pull request to BESSER. Trigger on phrases like "add a new generator", "register in the web editor", "GeneratorInterface", "json_to_buml", "buml_to_json", "write tests for my generator", "build the docs", "open a PR to BESSER", or any work that touches `besser/generators/`, `besser/BUML/metamodel/`, `besser/utilities/web_modeling_editor/`, or `tests/`. Prefer this skill over besser-user when the user is contributing *to* BESSER rather than *using* BESSER to build something else.
/besser-generatorsOperational reference for BESSER code generators — covers per-generator options, generated file layout, regeneration/overwrite behavior, safe customization patterns, template overrides, and debugging generation failures. Use this skill whenever the user is configuring or running a BESSER generator (PythonGenerator, PydanticGenerator, SQLAlchemyGenerator, SQLGenerator, BackendGenerator, RESTAPIGenerator, DjangoGenerator, WebAppGenerator, ReactGenerator, BAFGenerator, QiskitGenerator, JSONSchemaGenerator, JSONObjectGenerator, RDFGenerator, SupabaseGenerator, TerraformGenerator, PytorchGenerator, TFGenerator, FlutterGenerator, JavaGenerator), wondering "where does the output go", "will my edits survive regeneration", "how do I add custom endpoints to a generated FastAPI app", or "how do I switch the database dialect". Trigger on questions about generator parameters (`http_methods`, `nested_creations`, `dbms`, `containerization`, `backend_type`, `shots`, `generation_mode`), generated file paths, template overrides, or how to extend generated code without losing edits across regeneration cycles. Prefer this skill over besser-user when the question is about a specific generator's behavior rather than how to build a model.
/besser-troubleshootingDiagnose and fix BESSER errors fast. Use this skill whenever the user is staring at a Python traceback, ImportError, ModuleNotFoundError, ValueError, TypeError, AttributeError, jinja2.TemplateNotFound, subprocess.CalledProcessError, or any other failure originating from BESSER (besser.BUML, besser.generators, besser.utilities). Covers installation failures (`pip install besser` errors, native dependency build failures for psycopg2/pyodbc/oracledb, Python version mismatches, Windows venv path quirks), import errors (`String` vs `StringType`, missing `bocl==1.0.1`, `antlr4-python3-runtime` version mismatch), model construction errors (spaces or hyphens in names, duplicate enum literals, invalid multiplicities, generalization-to-self, more than one is_id per class), generator crashes (Invalid DBMS, Django subprocess failures, missing GUIModel for WebApp, silent SQLGenerator failures, invalid Qiskit backend), Docker and deployment problems (port conflicts, docker-compose vs docker compose, missing system libs in slim images), OCL constraint parse failures, and model-to-output drift (changes not appearing in regenerated code). Trigger on any error message that mentions `besser` in the traceback, even if the user does not explicitly ask for troubleshooting. Provides a minimal-reproduction template and quick diagnostic commands; defer to besser-generators for non-error questions about specific generator behavior.
Other plugins' skills for the same job