/healthclaw-guardrails:fhir-r6-guardrailsfrom healthclaw-guardrails
Enforces FHIR guardrails for clinical data access via MCP, including PHI redaction, two-phase propose/commit writes, step-up authorization, audit trails, and tenant isolation. Supports FHIR R4 US Core v9 and R6 ballot3.
Ships in healthclaw-guardrails. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A healthclaw.io open source project. Reference implementation of security and compliance patterns for AI agent access to FHIR data via MCP.
Supports FHIR R4 US Core v9 (stable) and FHIR R6 v6.0.0-ballot3 (experimental).
This is a runtime guardrail layer, not a knowledge skill. It sits between any AI agent and FHIR data (local or upstream), enforcing PHI redaction, audit trails, step-up authorization, and tenant isolation on every request.
| Tool | Purpose |
|---|---|
context.get | Retrieve a pre-built context envelope with patient-centric resources |
fhir.read | Read a single FHIR resource by type and ID (auto-redacted) |
fhir.search | Search resources with patient, code, status, date filters |
fhir.validate | Structural validation of a proposed resource |
fhir.stats | Observation statistics: count, min, max, mean over valueQuantity |
fhir.lastn | Most recent N observations per code |
fhir.permission_evaluate | Evaluate R6 Permission for permit/deny with reasoning |
fhir.subscription_topics | List available SubscriptionTopics |
curatr.evaluate | Evaluate a FHIR resource for data quality issues |
| Tool | Purpose |
|---|---|
fhir.propose_write | Validate and preview a write without committing |
fhir.commit_write | Commit a proposed write (requires X-Step-Up-Token) |
curatr.apply_fix | Apply patient-approved data quality fixes with Provenance |
Writes always follow propose-then-commit:
Propose: Call fhir.propose_write with the resource and operation (create/update).
This validates the resource and returns a preview. No data is changed.
Review: Check the proposal response:
proposal_status: "ready" means validation passedrequires_human_confirmation: true for clinical resource typesrequires_step_up: true always for commitsCommit: Call fhir.commit_write with the same resource. Include:
X-Step-Up-Token header (HMAC-SHA256 signed, 5-minute TTL)X-Human-Confirmed yourself. Outward actions
(calls, texts, forms) go through the action rail's out-of-band approval.Observation, Condition, MedicationRequest, DiagnosticReport, AllergyIntolerance, Procedure, CarePlan, Immunization, NutritionIntake, DeviceAlert.
Patient, Encounter, Observation, AuditEvent, Consent, Condition, Provenance, AllergyIntolerance, Immunization, MedicationRequest, Medication, MedicationDispense, Procedure, DiagnosticReport, CarePlan, CareTeam, Goal, DocumentReference, Location, Organization, Practitioner, PractitionerRole, RelatedPerson, Coverage, ServiceRequest, Specimen, FamilyMemberHistory.
Permission, SubscriptionTopic, Subscription, NutritionIntake, NutritionProduct, DeviceAlert, DeviceAssociation, Requirements, ActorDefinition.
$evaluate operation.Applied on every read path. Names truncated to initials, identifier values removed (system and type kept), addresses stripped to city/state/country, birth dates truncated to year, photos removed, notes replaced with [Redacted].
Append-only AuditEvent records for every resource access. Database-level immutability. Logs agent ID, tenant ID, resource accessed, and outcome.
HMAC-SHA256 tokens with 128-bit nonce, 5-minute TTL, tenant binding. Required for all write operations.
X-Tenant-Id header enforced on every query at the database layer.
Supported: patient (reference), code (token), status (token),
_lastUpdated (date with ge/le/gt/lt prefix), _count (1-200),
_sort (_lastUpdated/-_lastUpdated), _summary (count).
Not supported in local mode: chaining, _include, _revinclude, modifiers.
In upstream proxy mode, all query parameters are forwarded to the upstream server.
# Docker Compose (recommended)
docker-compose up -d --build
# Manual
uv sync && python main.py &
cd services/agent-orchestrator && npm ci && npm start
Required environment variables:
STEP_UP_SECRET — HMAC secret for step-up tokensOptional:
FHIR_UPSTREAM_URL — Connect to a real FHIR server (e.g., https://hapi.fhir.org/baseR4)FHIR_BASE_URL — Backend URL (default: http://localhost:5000/r6/fhir)MCP_PORT — MCP server port (default: 3001)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub aks129/healthclawguardrails --plugin healthclaw-guardrails14 skills in this plugin
/check-sourcesSurvey ALL connected health data sources at once. Use when the patient asks: (1) "what's connected" or "what services are linked", (2) "check all my services / all my data", (3) "do you have my records" or "what records do you have", (4) "did my data come through from <Fasten/MEDENT/HealthEx/Health Bank One/Flexpa/Epic/wearables>". Calls fhir_get_token (for protected tenants) then sources_check, and presents connection status + record counts by type. Connection status and counts only — never clinical values.
/curatrHealthClaw Curatr (healthclaw.io) — patient-facing FHIR data quality evaluation and correction. Use when: (1) Evaluating a patient's health record for coding issues (deprecated code systems, invalid codes, missing required fields), (2) Presenting issues in plain language with clinical impact, (3) Applying patient-approved corrections with full Provenance tracking, (4) Preparing a structured correction request for the patient's healthcare provider. Supports FHIR R4 US Core v9 resources: Condition, AllergyIntolerance, MedicationRequest, Immunization, Procedure, DiagnosticReport — with ICD-10-CM, SNOMED CT, LOINC, CVX, and RxNorm validation via public terminology APIs.
/fasten-connectUse this skill whenever connecting a patient's real health records from EHR systems (Epic, Cerner, Athena) or the TEFCA national network into HealthClaw Guardrails. Covers: Fasten Stitch widget embed, org_connection_id registration, EHI export job tracking, NDJSON ingestion status, TEFCA IAS identity-verified multi-provider retrieval, and post-import Curatr quality scan workflow./fhir-upstream-proxyConnect to real FHIR servers through the MCP guardrail proxy. Use when: (1) Connecting to HAPI FHIR, SMART Health IT, or Epic sandbox servers, (2) Proxying AI agent requests to production EHR systems with guardrails, (3) Ensuring upstream server URLs never leak to clients, (4) Understanding how redaction, audit, and step-up auth apply to upstream data.
/getting-startedEnd-to-end onboarding for the HealthClaw + OpenClaw personal-health-agent stack. Walks anyone — not just developers — through (1) installing OpenClaw as the local AI gateway, (2) standing up an open-source FHIR server (HAPI or Medplum) on their machine, (3) connecting their EHR records via HealthEx, Josh Mandel's fhir-skills, Flexpa, or any patient-right-of-access / TEFCA IAS service, (4) installing HealthClaw Guardrails with the OpenClaw personas pre-wired, and (5) pulling + reviewing health data end-to-end. Triggers when a user asks "how do I get started", "how do I set this up", "what do I need to use HealthClaw", "first time setup", "install everything", or any first-run question. Use this before any other HealthClaw skill when the user hasn't yet built their stack.
/healthbankonePull verified medical records and digital-identity context from Health Bank One (https://www.healthbankone.com) via their MCP server. HBO uses OAuth 2.x with per-consumer authorization, so this skill drives an authorization-code grant first, then runs the MCP pull, then ingests the redacted bundle into a HealthClaw tenant. Use when the user wants to add HBO as a source alongside HealthEx and Fasten Connect. Triggers on prompts like "connect Health Bank One", "pull from HBO", "verify identity through Health Bank One".
Other plugins' skills for the same job