hl7-v2

hl7-v2 is a skill for Claude Code from aks-builds/healthcareskills. It costs 195 tokens per session (3,650 once invoked), scanned A, original, MIT.

A skill for working with HL7 version 2 messages, a pipe-delimited format used to exchange clinical data between hospitals, electronic health records, laboratories, pharmacies, and other systems.

In plain words
What is it for?
Use it to design, parse, generate, or troubleshoot messages such as ADT patient updates, ORM orders, ORU results, ACK responses, and MLLP network connections.
Why use it?
It helps avoid incorrect message fields, event types, and routing assumptions when connecting healthcare systems, whose details vary by version and vendor.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the healthcare-skills plugin — 41 skills shipped together , and of healthcare-skills

Good fit Use it to design, parse, generate, or troubleshoot messages such as ADT patient updates, ORM orders, ORU results, ACK responses, and MLLP network connections.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aks-builds/healthcareskills/hl7-v2
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.

Any agent
npx skills add aks-builds/healthcareskills --skill hl7-v2
Clone the repo
git clone --depth 1 https://github.com/aks-builds/healthcareskills

Made for: Claude Code.

Or install healthcare-skills, the plugin that ships this one along with the rest of its 41 skills.

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 hl7-v2

README.md
[![agentmods](https://agentmods.dev/badge/skills/aks-builds/healthcareskills/hl7-v2/github.svg)](https://agentmods.dev/skills/aks-builds/healthcareskills/hl7-v2)
Your own site
<a href="https://agentmods.dev/skills/aks-builds/healthcareskills/hl7-v2"><img src="https://agentmods.dev/badge/skills/aks-builds/healthcareskills/hl7-v2/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 hl7-v2

Your own site · 80×15
<a href="https://agentmods.dev/skills/aks-builds/healthcareskills/hl7-v2"><img src="https://agentmods.dev/badge/skills/aks-builds/healthcareskills/hl7-v2.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 195 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,650 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.00195 $0.03650
Opus 5 $0.00097 $0.01825
Sonnet 5 $0.00039 $0.00730
Haiku 4.5 $0.00019 $0.00365

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

Security

Grade A, and why

hl7-v2 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 11d 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.

skills/hl7-v2/SKILL.md · 262 lines

How it starts

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

HL7 v2 Messaging

You are an expert in HL7 v2.x messaging — the pipe-delimited standard that still moves the vast majority of clinical traffic between EHRs, labs, pharmacies, registration systems, and ancillary apps. Your goal is to help engineers and integration analysts design interfaces, write integration-engine channels, and debug malformed messages without inventing field positions or trigger events that don't exist in the version they're targeting.

Initial Assessment

Check .agents/healthcare-context.md (fallback: .claude/healthcare-context.md) before answering. Focus on:

  • HL7 v2 version: 2.3.1, 2.5.1, 2.6, 2.7, 2.8 — segments, fields, and component layouts change.
  • EHR and ancillary vendors: Epic, Oracle Health (Cerner), Meditech, lab/pharmacy systems each have idiosyncratic profiles and z-segments.
  • Integration engine: Mirth/NextGen Connect, Rhapsody, Cloverleaf, Iguana, Corepoint, custom — affects how channels, scripts, and routing are described.
  • Connectivity: MLLP/TCP, sFTP files, VPN, leased line.

If the file is missing, ask only what is needed (version, sending/receiving system, message types) and offer to save it.


Message Structure

HL7 v2 is a flat, line-delimited text format. Each line is a segment beginning with a three-letter code, followed by fields.

MSH|^~\&|SENDING_APP|SENDING_FAC|RECEIVING_APP|RECEIVING_FAC|20260101120000||ADT^A01^ADT_A01|MSGCTRL00001|P|2.5.1
EVN|A01|20260101120000
PID|1||MRN-123456^^^HOSPITAL^MR||DOE^JANE^A||19850203|F|||123 MAIN ST^^METROPOLIS^IL^60601^USA
PV1|1|I|2W^201^A^MAIN^^^^^^^^|EL||||1234567^SMITH^JOHN^^^DR

Delimiters (declared in MSH-1 and MSH-2)

Char Default Purpose
` ` field separator (MSH-1)
^ component separator Separates components within a field
& subcomponent separator Separates subcomponents within a component
~ repetition separator Separates repetitions of a field
\ escape character Escapes reserved characters in data

Read the full file on GitHub · 262 lines

Files

What ships with it

3 files 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. 11d ago First seen · 262 lines · 195 tokens per session scan A 2c3773899c27

Subscribe to this mod's changes

hl7-v2 is a skill published in the GitHub repository aks-builds/healthcareskills (1 stars, last pushed 2d ago), licensed MIT. It adds 195 tokens to every session and 3,650 once invoked, about $0.0010 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.

Related

Other skills, from other repositories

labarchive-integration

Securely integrate with the official LabArchives ELN REST-like API and Inventory API v1. Use for regional endpoint selection, signed-request construction, user authorization and UID flows, local LA container validation, and verified LabArchives integration workflows.

K-Dense-AI/scientific-agent-skills · 52 tokens

adaptyv

How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user mentions Adaptyv, Foundry API, protein binding assays, protein screening experiments, BLI/SPR assays, thermostability assays, or wants to submit protein sequences for…

K-Dense-AI/scientific-agent-skills · 113 tokens

benchling-integration

Benchling Python SDK and REST API integration for registry entities, inventory, ELN entries, workflows, Benchling Apps, and Data Warehouse queries. Use when automating lab data with benchling-sdk or the v2 API.

K-Dense-AI/scientific-agent-skills · 50 tokens

assembling-fhir-bundles

Package multiple FHIR R4 resources produced from OpenMed output into a single valid transaction Bundle ready to POST to an EHR, using OpenMed's verified bundle assembler openmed.clinical.exporters.fhir.tobundle. Covers deterministic urn:uuid fullUrls, automatic in-Bundle reference rewriting, request blocks…

maziyarpanahi/openmed · 131 tokens

exporting-bulk-fhir

Kick off and harvest a FHIR Bulk Data $export (system-, group-, or patient-level) and stream the resulting NDJSON into a batch OpenMed de-identification + NER pipeline at cohort scale. Covers the async kickoff (Prefer respond-async) -> poll Content-Location -> download NDJSON flow, the Bulk Data Access IG, type/since…

maziyarpanahi/openmed · 151 tokens

fetching-fhir-resources

Fetches and pages FHIR R4 resources (Patient, DocumentReference, DiagnosticReport, Observation, Condition) from a FHIR REST server, decodes base64 attachments, and extracts clinical narrative for OpenMed. Use before OpenMed processing when pulling charts from an EHR FHIR API (Epic, Cerner/Oracle, HAPI, or any US Core…

maziyarpanahi/openmed · 166 tokens