fhir-developer-skill — Claude Code skill: what it does, how to install
Guides FHIR R4 API development across healthcare endpoints: handles resource validation, OperationOutcome errors, standard status codes, and coding systems.
npx skills add anthropics/healthcare --skill fhir-developer-skill -a claude-code
npx skills add anthropics/healthcare --skill fhir-developer -a claude-codeWhat fhir-developer-skill does
This skill provides structural rules for building healthcare REST endpoints following FHIR R4. It details resource layouts for Patient, Observation, Encounter, Condition, and MedicationRequest. Inside are concrete validation snippets for Python FastAPI using Pydantic v2 literals and TypeScript Express, paired with application/fhir+json responses.
Field validation strictly depends on cardinality. Only fields marked 1..1 or 1..* are enforced as required. For instance, Encounter leaves subject and period optional under 0..1 cardinality, so rejecting payloads without them is an error. Invalid enum values or missing required fields return a 422 Unprocessable Entity status with an OperationOutcome payload. When an If-Match ETag check fails, the API responds with 412 Precondition Failed rather than 400.
The guide also maps canonical terminology URIs for LOINC, SNOMED CT, RxNorm, and ICD-10, alongside common vital sign identifiers. It prepares agents to wire up SMART on FHIR OAuth scopes and manage batch operations without misinterpreting FHIR requirements.
What it helps with
- validate FHIR R4 payloads in FastAPI or Express
- generate compliant OperationOutcome responses with 422 status
- reference standard terminology URLs for LOINC, SNOMED, and ICD-10
- enforce required fields strictly by schema cardinality
Example prompts for the agent
- Write a POST /Observation endpoint in FastAPI with enum validation and OperationOutcome errors.
- Create a Pydantic v2 model for a FHIR Patient resource using Literal types for gender.
- Handle If-Match ETag checks for an Encounter endpoint returning 412 Precondition Failed on mismatch.
How to install fhir-developer-skill
1Skills CLI (Vercel)
npx skills add anthropics/healthcare --skill fhir-developer-skill -a claude-codenpx skills add anthropics/healthcare --skill fhir-developer -a claude-code2Manually: put the files in place
~/.claude/skills/fhir-developer/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/fhir-developer/
1Skills CLI (Vercel)
npx skills add anthropics/healthcare --skill fhir-developer -a codex2Manually: put the files in place
.agents/skills/fhir-developer/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add anthropics/healthcare --skill fhir-developer -a cursor2Manually: put the files in place
.cursor/skills/fhir-developer/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install anthropics/healthcare fhir-developer2Manually: put the files in place
.github/skills/fhir-developer/SKILL.md1Skills CLI (Vercel)
npx skills add anthropics/healthcare --skill fhir-developer -a gemini-cli2Platform CLI
gemini skills install https://github.com/anthropics/healthcare --path plugins/healthcare/skills/fhir-developerManually: put the files in place
.devin/skills/fhir-developer/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add anthropics/healthcare --skill fhir-developer -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about fhir-developer-skill
How do I install fhir-developer-skill in Claude Code?
Run npx skills add anthropics/healthcare --skill fhir-developer-skill -a claude-code. You can also save the file directly to ~/.claude/skills/fhir-developer/SKILL.md.
What does fhir-developer-skill do?
It instructs coding agents on building FHIR R4 APIs, providing required field schemas, HTTP status codes, OperationOutcome structures, and terminology URLs.
When should an endpoint return 422 versus 400 in FHIR?
Return 400 for malformed JSON or incorrect resourceType values. Return 422 Unprocessable Entity for missing required fields, invalid enum codes, or business logic violations.