regen-classes

A command for generating openEHR class documentation from BMM schemas. It creates class-definition tables and UML diagrams for a component.

In plain words
What is it for?
Running the BMM publisher for a schema, including dependency schemas, and writing generated output to a reviewable directory.
Why use it?
It replaces outdated manual or MagicDraw-based extraction and makes regenerated documentation reflect the schema source.

Command

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 commands/openehr/ai-plugins/regen-classes
Clone the repo
git clone --depth 1 https://github.com/openEHR/ai-plugins
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 533 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.00022 $0.00533
Opus 5 $0.00011 $0.00267
Sonnet 5 $0.00004 $0.00107
Haiku 4.5 $0.00002 $0.00053

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

Security

Grade A, and why

regen-classes 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/commands/regen-classes.md · 37 lines

What it actually says

Regenerate the class documentation (class-definition tables + UML class/package diagrams) for an openEHR component from its BMM schema using the bmm-publisher tool. The tool, commands, output layouts, and how the output wires into docs/UML/ are documented in the openehr-specs:class-generation skill and its references/bmm-publisher.md — follow them; this command is the action wrapper.

Arguments: $ARGUMENTS — the schema id (without .bmm.json, e.g. openehr_rm_1.2.0) and any -d <dependency-schema> flags for cross-reference resolution (e.g. RM depends on BASE: openehr_rm_1.2.0 -d openehr_base_1.3.0).

Do the following:

  1. Confirm Docker is available (docker --version). If not, point the user to the local bmm-publisher dev-container path in references/bmm-publisher.md and stop.
  2. Determine the output target. Default to a working directory the user can inspect (e.g. ./out); ask before writing directly into a specifications-XX repo's docs/UML/.
  3. Run the generator, mapping output ownership to the host user:
    docker run --rm --user $(id -u):$(id -g) \
      -v ./out:/app/output \
      ghcr.io/openehr/bmm-publisher asciidoc -v $ARGUMENTS
    
    Use legacy-adoc -o <dir> instead when the component consumes the legacy docs/UML/classes layout (per the class-generation skill).
  4. Report what was generated (list the produced classes/, effective/, diagram SVGs) and remind the user that generated files are never hand-edited — change the BMM and regenerate.
  5. Do not commit. If the user wants the output wired into a spec repo, follow the placement steps in the class-generation skill.
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 · 37 lines · 22 tokens per session scan A 1e6fdac94181

Subscribe to this mod's changes

regen-classes is a command published in the GitHub repository openEHR/ai-plugins (3 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 22 tokens to every session and 533 once invoked, about $0.0001 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.