class-generation

A documentation generator for openEHR models. It uses BMM schema files—the structured source that describes classes and their properties—to create class tables and UML diagrams.

In plain words
What is it for?
Regenerating class-definition tables, effective views, and UML class or package diagrams in openEHR specification repositories.
Why use it?
It keeps class documentation in sync with the model, so developers do not have to update tables and diagrams by hand after schema changes.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/openehr/ai-plugins/class-generation
Any agent
npx skills add openEHR/ai-plugins --skill class-generation
Clone the repo
git clone --depth 1 https://github.com/openEHR/ai-plugins

Made for: Claude Code, Codex.

Per session 124 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,454 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00124 $0.01454
Opus 5 $0.00062 $0.00727
Sonnet 5 $0.00025 $0.00291
Haiku 4.5 $0.00012 $0.00145

Measured 2d ago against content hash 940c09ddf4ff, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

class-generation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/openehr-specs/skills/class-generation/SKILL.md · 118 lines

How it starts

The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.

openEHR Class Documentation Generation (BMM)

openEHR specification class documentation — the per-class definition tables and the UML class/package diagrams embedded in specifications-XX documents — is generated, not hand-written. The source of truth is the component's BMM (Basic Meta-Model) schema, serialised as P_BMM JSON, and the generator is the bmm-publisher CLI tool.

Replaces MagicDraw. Class tables and diagrams were historically extracted from MagicDraw .mdzip UML models. That mechanism is retired; bmm-publisher is the current BMM-based generator.

  • authoring — document scaffolding and repo layout; explains where generated class docs are included
  • review — the ADOC-03 check enforces that class tables are generated, not hand-written
  • content-patterns — prose around classes (semantics, rationale) that the generated tables do not cover

For the full command, option, and schema reference, see references/bmm-publisher.md.

When to Regenerate

Regenerate class documentation when:

  • A component's BMM schema changes (new/renamed/removed classes, properties, functions, or types)
  • A spec needs its docs/UML/classes/ tables refreshed before a release
  • Class diagrams (SVGs) are stale relative to the model

Never hand-edit the generated output — change the BMM schema upstream and regenerate.

Installation

The tool is distributed as a Docker image that bundles all openEHR BMM schemas and the plantuml CLI. No local PHP, Composer, or checkout is required.

# Discover commands
docker run --rm ghcr.io/openehr/bmm-publisher list

For local development against a cloned bmm-publisher checkout, drive everything through its dev container (no host PHP): make install, make sh, make publish-all. See references/bmm-publisher.md.

Core Commands

Command Aliases Produces
asciidoc adoc AsciiDoc class/effective/definition tables and rendered SVG class/package diagrams (self-contained)
legacy-adoc Flat per-class definition tables only, in the legacy docs/UML/classes layout (-o <dir> to target)
plantuml uml, puml Standalone PlantUML .puml sources only
embed-svg Re-run only the SVG sanitise + publish step
yaml Machine-readable YAML serialisation of each schema
split-json Per-type JSON files
odin ODIN .bmm schema files (the hand-authored BMM format)

Read the full file on GitHub · 118 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 118 lines · 124 tokens per session scan A 940c09ddf4ff

Subscribe to this mod's changes

class-generation is a skill published in the GitHub repository openEHR/ai-plugins (3 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 124 tokens to every session and 1,454 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.