smart-on-fhir

smart-on-fhir is a skill for Claude Code from aks-builds/healthcareskills. It costs 182 tokens per session (3,603 once invoked), scanned A, original, MIT.

A guide for connecting third-party apps securely to electronic health record systems through FHIR, a standard format for exchanging healthcare data. SMART on FHIR uses OAuth to control which data an app can access.

In plain words
What is it for?
Use it to build clinician-facing or patient-facing SMART apps, standalone launches, EHR launches, or server-to-server connections to FHIR APIs.
Why use it?
It helps developers choose the correct login flow, app type, permissions, and launch context for a particular EHR integration.

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 build clinician-facing or patient-facing SMART apps, standalone launches, EHR launches, or server-to-server connections to FHIR APIs.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/aks-builds/healthcareskills/smart-on-fhir"><img src="https://agentmods.dev/badge/skills/aks-builds/healthcareskills/smart-on-fhir.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 182 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,603 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.00182 $0.03603
Opus 5 $0.00091 $0.01801
Sonnet 5 $0.00036 $0.00721
Haiku 4.5 $0.00018 $0.00360

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

Security

Grade A, and why

smart-on-fhir 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 12d 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/smart-on-fhir/SKILL.md · 382 lines

How it starts

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

SMART on FHIR

You are an expert in SMART on FHIR — the OAuth 2.0 profile that lets third-party apps and services securely access FHIR APIs in EHRs. Your goal is to help engineers implement a correct, secure SMART flow end-to-end, with the right scopes, the right client type, and the right launch model for the use case.

Initial Assessment

Read .agents/healthcare-context.md first (fall back to .claude/healthcare-context.md). The context file tells you which EHR(s) you are targeting (each one publishes slightly different SMART support), which FHIR version, and whether the app is patient-facing, clinician-facing, or system-to-system.

If the context file does not exist, ask:

  1. Which EHR(s) and which FHIR version?
  2. App type — clinician-facing web app, patient-facing app, mobile, server-to-server?
  3. Launch model — EHR launch (from within the chart) or standalone (user starts in the app)?
  4. Public or confidential client?
  5. Which FHIR resources do you need to read or write?

Launch Models

Model Who starts When to use
EHR launch Clinician clicks the app from within the EHR chart Clinician-facing apps, ambient scribes, contextual tools
Standalone launch User opens the app first, then signs in Patient-facing apps, cross-institution tools
Backend Services No user — system-to-system Bulk data pipelines, analytics, automated jobs

You can support multiple models in the same app — register separately for each.


SMART App Launch Sequence (EHR Launch)

1. EHR opens the app URL with a `launch` token + `iss` (FHIR base URL).
2. App fetches `<iss>/.well-known/smart-configuration` to discover endpoints.
3. App redirects user agent to `authorization_endpoint` with:
     response_type=code, client_id, redirect_uri, scope, state,
     aud=<iss>, launch=<launch_token>, code_challenge, code_challenge_method=S256
4. EHR authenticates the user, optionally prompts for consent.
5. EHR redirects back to app's redirect_uri with `code` and `state`.
6. App POSTs to `token_endpoint` with code, redirect_uri, client_id, code_verifier
   (and client_secret or JWT assertion for confidential clients).
7. EHR returns access_token + (optionally) refresh_token + id_token + context:
     { access_token, token_type: "Bearer", expires_in, scope, patient, encounter, ... }
8. App calls FHIR APIs with `Authorization: Bearer <access_token>`.

Read the full file on GitHub · 382 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. 12d ago First seen · 382 lines · 182 tokens per session scan A b3cfc34f3a49

Subscribe to this mod's changes

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

add-matrix

Add Matrix channel integration via Chat SDK. Works with any Matrix homeserver.

nanocoai/nanoclaw · 19 tokens

laravel-specialist

Build and configure Laravel 10+ applications, including creating Eloquent models and relationships, implementing Sanctum authentication, configuring Horizon queues, designing RESTful APIs with API resources, and building reactive interfaces with Livewire. Use when creating Laravel models, setting up queue workers…

Jeffallan/claude-skills · 86 tokens

django-storages-s3

Use when configuring Django to store static and media files on AWS S3 with django-storages. Invoke when working with the STORAGES setting, S3 buckets, presigned URLs, CloudFront, or boto3-backed file storage in settings.py. Configures the Django 4.2+ STORAGES dict, public/private custom backends, presigned GET/POST…

Jeffallan/claude-skills · 138 tokens

cognito

AWS Cognito user authentication and authorization service. Use when setting up user pools, configuring identity pools, implementing OAuth flows, managing user attributes, or integrating with social identity providers.

itsmostafa/aws-agent-skills · 38 tokens

sns

AWS SNS notification service for pub/sub messaging. Use when creating topics, managing subscriptions, configuring message filtering, sending notifications, or setting up mobile push.

itsmostafa/aws-agent-skills · 32 tokens

tidewave-integration

Tidewave MCP runtime tools — debugging, smoke testing, live state inspection, SQL queries, hex docs. Use when evaluating code in a running Phoenix app.

oliver-kriska/claude-elixir-phoenix · 38 tokens