ckm-search

ckm-search is a command for Claude Code from Cadasto/openehr-assistant-plugin. It costs 21 tokens per session (710 once invoked), scanned A, original, MIT.

A command for searching openEHR Clinical Knowledge Manager, a shared catalogue of reusable clinical data definitions. It searches for archetypes, which describe individual clinical concepts, and templates, which combine them into forms or documents.

In plain words
What is it for?
Use it to find reusable openEHR archetypes or templates by clinical concept, document, or form, optionally limited to a specific structural type.
Why use it?
It helps developers find an existing published clinical definition before creating a new one, while avoiding made-up identifiers or metadata.

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 find reusable openEHR archetypes or templates by clinical concept, document, or form, optionally limited to a specific structural type.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/cadasto/openehr-assistant-plugin/ckm-search/github.svg)](https://agentmods.dev/commands/cadasto/openehr-assistant-plugin/ckm-search)
Your own site
<a href="https://agentmods.dev/commands/cadasto/openehr-assistant-plugin/ckm-search"><img src="https://agentmods.dev/badge/commands/cadasto/openehr-assistant-plugin/ckm-search/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ckm-search

Your own site · 80×15
<a href="https://agentmods.dev/commands/cadasto/openehr-assistant-plugin/ckm-search"><img src="https://agentmods.dev/badge/commands/cadasto/openehr-assistant-plugin/ckm-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 710 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.00021 $0.00710
Opus 5 $0.00010 $0.00355
Sonnet 5 $0.00004 $0.00142
Haiku 4.5 $0.00002 $0.00071

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

Security

Grade A, and why

ckm-search 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 9d 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/ckm-search.md · 36 lines

How it starts

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

Search the openEHR Clinical Knowledge Manager for reusable archetypes or templates. Reuse first: prefer published CKM artefacts over authoring new ones.

Instructions

  1. Parse $ARGUMENTS:
    • If it starts with archetype or template, that keyword selects the kind; the rest is the query.
    • Otherwise infer the kind from the query (a whole-form / document concept usually means a template; a single clinical concept usually means an archetype). When unclear, search archetypes by default and offer to search templates too.
    • If the query is ambiguous, ask 1-2 clarifying questions before searching.
    • Never invent CIDs, archetype IDs, or template metadata.
  2. Search:
    • Archetypesckm_archetype_search. To scope to a structural class, pass the optional rmClass filter (e.g. COMPOSITION, OBSERVATION, CLUSTER) — surface it when the user wants only siblings of one RM type, or parses rm:<RM_CLASS> from $ARGUMENTS. If recall is low, retry with broader or alternative phrasings (synonyms, drop qualifiers) — CKM matches against all search words.
    • Templatesckm_template_search.
  3. Present up to 15 candidates as a table, and state the envelope's total (matches before the result cap) so a capped list does not read as the whole result set:
    • Archetypes: CID, Archetype ID, RM Type, Version, Status — highlight published vs draft.
    • Templates: CID, Display Name, Status.
  4. Ask the user to select a candidate, and the preferred output format:
    • Archetype: ADL (default), XML, or mindmap.
    • Template: OET (design-time, default) or OPT (operational, flattened constraints).
  5. Retrieve the selection with ckm_archetype_get or ckm_template_get, passing the CID from the search hit (ckm_archetype_get also accepts a full openEHR-… archetype-id; a concept or display name is rejected). Present it in a code block with a brief explanation:
    • Archetype: purpose and clinical concept; use/misuse guidance; key sections and notable constraints. Use guide_adl_idiom_lookup to explain ADL patterns if needed.
    • Template: design intent and clinical context; archetypes used and their roles; notable constraints and narrowing decisions. For an OET, optionally use ckm_archetype_get on referenced archetypes for context.

Read the full file on GitHub · 36 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. 9d ago First seen · 36 lines · 21 tokens per session scan A db8338e1a902

Subscribe to this mod's changes

ckm-search is a command published in the GitHub repository Cadasto/openehr-assistant-plugin (4 stars, last pushed 14d ago), licensed MIT. It adds 21 tokens to every session and 710 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.