archetype-impact

archetype-impact is a command for Claude Code from Cadasto/openehr-assistant-plugin. It costs 51 tokens per session (1,190 once invoked), scanned A, original, MIT.

A command that finds where an openEHR archetype is used across a workspace. An archetype is a reusable clinical data model, and openEHR is a standard for storing electronic health-record information.

In plain words
What is it for?
Use it to identify affected .oet, .opt, .t.json, .adl, .aql, .sql, and Markdown files and produce an impact table.
Why use it?
Changing a widely reused archetype can affect templates, queries, and documentation in several places. The scan shows those references before editing.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the openehr-assistant plugin — 8 skills, 3 commands, 3 agents, 2 hooks, 1 MCP server shipped together

Good fit Use it to identify affected .oet, .opt, .t.json, .adl, .aql, .sql, and Markdown files and produce an impact table.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/cadasto/openehr-assistant-plugin/archetype-impact
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.

Clone the repo
git clone --depth 1 https://github.com/Cadasto/openehr-assistant-plugin

Made for: Claude Code.

Or install openehr-assistant, the plugin that ships this one along with the rest of its 8 skills, 3 commands, 3 agents, 2 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for archetype-impact

README.md
[![agentmods](https://agentmods.dev/badge/commands/cadasto/openehr-assistant-plugin/archetype-impact.svg)](https://agentmods.dev/commands/cadasto/openehr-assistant-plugin/archetype-impact)
Your own site
<a href="https://agentmods.dev/commands/cadasto/openehr-assistant-plugin/archetype-impact"><img src="https://agentmods.dev/badge/commands/cadasto/openehr-assistant-plugin/archetype-impact.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,190 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00051 $0.01190
Opus 5 $0.00026 $0.00595
Sonnet 5 $0.00010 $0.00238
Haiku 4.5 $0.00005 $0.00119

Measured 8d ago against content hash 259258cac976, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

archetype-impact 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 8d 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.

commands/archetype-impact.md · 96 lines

How it starts

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

/archetype-impact

Compute the impact of editing a given archetype by finding every workspace artefact that references it — templates that include it, AQL queries that path into it, and any other place the archetype id or its at-codes appear.

Instructions

  1. Extract <archetype-id> from $ARGUMENTS. Validate it matches the pattern openEHR-<DOMAIN>-<RM_TYPE>.<concept>.v<N>.
  2. Glob the workspace for candidate files:
    Glob: **/*.oet
    Glob: **/*.opt
    Glob: **/*.t.json
    Glob: **/*.adl
    Glob: **/*.aql
    Glob: **/*.sql
    Glob: **/*.md
    
    (.t.json catches Archetype Designer source templates — AOM2 differential JSON with templateOverlays, not web templates; .adl catches parent archetypes that slot this one in via allow_archetype/include; .md catches AQL examples and documentation. A web template is derived runtime JSON with no extension convention — if the workspace holds one, the reference is generated, not authored, so treat it as downstream of its OPT.)
  3. For each file, grep for the archetype id:
    Grep: pattern="<archetype-id>", path=<file>
    
  4. For templates (.oet/.opt/.t.json) that mention the archetype, also inspect whether it's:
    • a top-level included archetype (in <Items> / the template's content tree),
    • nested as a slot filler (in <Rule ... archetypeId> or a JSON slot reference),
    • in a .t.json, carried as a templateOverlays entry (the differential overlay for that archetype) or named by parentArchetypeId,
    • referenced only as documentation text. Distinguish source templates (.oet, .t.json — where an edit propagates on the next compile) from compiled ones (.opt — where the reference is inlined and stale until regenerated); the recommendation differs.
  5. For other archetypes (.adl), check whether they reference this archetype as a slot constraint — grep for the id inside allow_archetype / include blocks; if found, the other archetype is a parent whose slot this one fills.
  6. For AQL/SQL/md files, extract the full line(s) containing the reference so the user can see the containment and predicate context.
  7. Optionally call ckm_archetype_get("<archetype-id>") once to resolve the concept name and report it alongside the impact table for clarity.

Read the full file on GitHub · 96 lines

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. 8d ago First seen · 96 lines · 51 tokens per session scan A 259258cac976

Subscribe to this mod's changes

archetype-impact is a command published in the GitHub repository Cadasto/openehr-assistant-plugin (4 stars, last pushed 13d ago), licensed MIT. It adds 51 tokens to every session and 1,190 once invoked, about $0.0003 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.