Agent skill

Fhir API

by aehrc in aehrc/pathling

Expert guidance for implementing FHIR RESTful API servers and clients following the HL7 FHIR specification.

Apache-2.0Auto-check passedResearch & Science

Install Fhir API

skills CLI
$ npx skills add aehrc/pathling --skill fhir-api -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aehrc/pathling fhir-api --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aehrc/pathling.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/fhir-api .claude/skills/fhir-api && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
fhir-api
GitHub stars
137
Used in
1 other repo
Token cost
~1.5k tokens
SKILL.md length
388 words
Files
4 (incl. references)
Skills in repo
25
Repo updated
First seen
Licence
Apache-2.0

At a glance

Expert guidance for implementing FHIR RESTful API servers and clients following the HL7 FHIR specification.

  • Works in 3 steps: Server returns ETag: W/"[versionId]"… → Client sends If-Match: W/"[versionId]"… → Server returns 412 Precondition Failed…
  • Implementing a FHIR server with REST endpoints
  • SKILL.md covers URL structure, Core operations, Content negotiation and Required headers, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Fhir API is an agent skill from aehrc/pathling. Expert guidance for implementing FHIR RESTful API servers and clients following the HL7 FHIR specification. Use this skill when implementing a FHIR server with REST endpoints, building a FHIR client, designing FHIR API routes and handlers, implementing FHIR operations (read, create, update, delete, search, history), working with FHIR bundles, batch requests, or transactions, handling FHIR content negotiation, headers, and versioning, or implementing conditional operations. Trigger keywords include "FHIR REST"…

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/batch-transaction.md`, `references/operations.md` and `references/search.md`).

It sits in Research & Science, covering Clinical and healthcare research and REST APIs. The repository describes itself as: Tools that make it easier to use FHIR and clinical terminology within data analytics, built on Apache Spark. The licence is Apache-2.0.

When your agent uses it

  • Implementing a FHIR server with REST endpoints
  • Building a FHIR client
  • Designing FHIR API routes and handlers
  • Implementing FHIR operations (read

Example prompts

  • “FHIR REST”
  • “FHIR API”
  • “FHIR server”
  • “/fhir-api”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Server returns ETag: W/"[versionId]" with responses
  2. Client sends If-Match: W/"[versionId]" with updates
  3. Server returns 412 Precondition Failed if version mismatch

What it can do on your machine

Read from SKILL.md and the folder at commit 56a3b4a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Fhir API loads about 1.5k tokens when it runs, and up to ~7.2k if it reads all its reference files. Until then it costs about 159 tokens; SKILL.md has 388 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~159
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from aehrc/pathling at commit 56a3b4a, republished under its Apache-2.0 licence (© aehrc). 388 words, ~1,462 tokens.

Download SKILL.mdSave it as .claude/skills/fhir-api/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
fhir-api
description
Expert guidance for implementing FHIR RESTful API servers and clients following the HL7 FHIR specification. Use this skill when implementing a FHIR server with REST endpoints, building a FHIR client, designing FHIR API routes and handlers, implementing FHIR operations (read, create, update, delete, search, history), working with FHIR bundles, batch requests, or transactions, handling FHIR content negotiation, headers, and versioning, or implementing conditional operations. Trigger keywords include "FHIR REST", "FHIR API", "FHIR server", "FHIR client", "FHIR endpoint", "FHIR operations", "RESTful FHIR", "implement FHIR".

FHIR REST API implementation

This skill provides guidance for implementing FHIR RESTful APIs according to the HL7 FHIR specification (R4/R5).

URL structure

All FHIR REST URLs follow the pattern:

[base]/[type]/[id]
  • [base]: Service base URL (e.g., https://fhir.example.org/r4)
  • [type]: Resource type (e.g., Patient, Observation)
  • [id]: Logical resource ID

URLs are case-sensitive and use UTF-8 encoding.

Core operations

OperationHTTPURL PatternSuccess
ReadGET[base]/[type]/[id]200
VReadGET[base]/[type]/[id]/_history/[vid]200
CreatePOST[base]/[type]201
UpdatePUT[base]/[type]/[id]200/201
PatchPATCH[base]/[type]/[id]200
DeleteDELETE[base]/[type]/[id]200/204
SearchGET/POST[base]/[type]?params200
HistoryGET[base]/[type]/[id]/_history200
CapabilitiesGET[base]/metadata200
Batch/TransactionPOST[base]200

For detailed specifications of each operation, see references/operations.md.

Content negotiation

MIME types
FormatMIME Type
JSONapplication/fhir+json
XMLapplication/fhir+xml
RDFapplication/fhir+turtle

Use the Accept header for response format and Content-Type for request body format.

The _format query parameter overrides Accept when clients cannot set headers.

FHIR version

Specify version via MIME type parameter:

Accept: application/fhir+json; fhirVersion=4.0

Version mappings: 1.0 (R2), 3.0 (R3), 4.0 (R4), 4.3 (R4B), 5.0 (R5).

Required headers

Request headers
HeaderPurposeExample
AcceptResponse formatapplication/fhir+json
Content-TypeRequest body formatapplication/fhir+json
If-MatchOptimistic lockingW/"123"
If-None-ExistConditional createidentifier=123
PreferReturn preferencereturn=representation
Response headers
HeaderPurposeExample
ETagVersion identifierW/"123"
LocationNew resource URL[base]/Patient/123/_history/1
Last-ModifiedModification timeRFC 7231 date

Versioning and optimistic locking

FHIR uses weak ETags for version tracking:

  1. Server returns ETag: W/"[versionId]" with responses
  2. Client sends If-Match: W/"[versionId]" with updates
  3. Server returns 412 Precondition Failed if version mismatch

Implement version-aware updates when CapabilityStatement.rest.resource.versioning is versioned-update.

Show full SKILL.md (135 more words)Show less

Error handling

Return OperationOutcome resources for all errors:

json
{
    "resourceType": "OperationOutcome",
    "issue": [
        {
            "severity": "error",
            "code": "invalid",
            "diagnostics": "Patient.birthDate: Invalid date format"
        }
    ]
}
Status codes
CodeMeaning
400Invalid syntax or validation failure
404Resource not found
409Version conflict
410Resource deleted
412Precondition failed (version mismatch)
422Business rule violation

Prefer header

Control response content with Prefer:

ValueResponse body
return=minimalEmpty (headers only)
return=representationFull resource
return=OperationOutcomeValidation outcome

For async operations, use Prefer: respond-async to get 202 Accepted with status polling URL.

Implementation checklist

Server implementations should:

  1. Implement CapabilityStatement at /metadata
  2. Support content negotiation (JSON at minimum)
  3. Return proper ETags for versioned resources
  4. Include Location header on create/update
  5. Return OperationOutcome for all errors
  6. Support _format parameter fallback
  7. Honour Prefer header for response content

References

© aehrc, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in .claude/skills/fhir-api of aehrc/pathling.

  • SKILL.md
  • references/batch-transaction.md
  • references/operations.md
  • references/search.md

Open the folder on GitHubat commit 56a3b4a

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in aehrc/pathling, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Fhir API next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Fhir API compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fhir API this skillaehrc/pathling1371 repos~1.5kAutomated safety check: PassApache-2.0
Fhir Developer Skillmajiayu000/claude-skill-registry6662 repos~2.5kAutomated safety check: PassMIT
Database Lookupmajiayu000/claude-skill-registry6661 repos~7kAutomated safety check: NotesMIT
Pubchem Databasedavila7/claude-code-templates32k12 repos~4.1kAutomated safety check: PassMIT
Claude To MedrixflowCitrus-bit/Anaxa120—~1.7kAutomated safety check: PassMIT
Searching Clinicaltrialsmaziyarpanahi/openmed5.5k—~2kAutomated safety check: PassApache-2.0

Similar skills

  • Fhir Developer Skill

    majiayu000/claude-skill-registry

    FHIR API development guide for building healthcare endpoints.

    666 GitHub starsUsed in 2 repos~2.5k tokens
    Research & ScienceAuto-check passed
  • Database Lookup

    majiayu000/claude-skill-registry

    Search 78 public scientific, biomedical, materials science, and economic databases via REST APIs.

    666 GitHub starsUsed in 1 repo~7k tokens
    Research & ScienceAuto-check: notes
  • Pubchem Database

    davila7/claude-code-templates

    Query PubChem via PUG-REST API/PubChemPy (110M+ compounds). An agent skill from davila7/claude-code-templates.

    32k GitHub starsUsed in 12 repos~4.1k tokens
    Research & ScienceAuto-check passed
  • Claude To Medrixflow

    Citrus-bit/Anaxa

    Interact with MedrixFlow AI agent platform via its HTTP API.

    120 GitHub stars~1.7k tokensUpdated 1 mo ago
    Research & ScienceAuto-check passed
  • Searching Clinicaltrials

    maziyarpanahi/openmed

    Searches ClinicalTrials.gov for studies by condition, intervention, and recruitment status using the modern v2 REST API with cursor (pageToken) pagination.

    5.5k GitHub stars~2k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Bio Ensembl REST

    GPTomics/bioSkills

    Query the Ensembl REST API for gene/transcript/protein lookup, sequence retrieval, comparative genomics (Compara), variant effect prediction (VEP), regulatory features, and cross-species…

    1.2k GitHub starsUsed in 2 repos~3.6k tokens
    Research & ScienceAuto-check passed

More from aehrc/pathling

All 25 skills in this repo
  • Fhir Bulk Data

    aehrc/pathling

    Expert guidance for implementing FHIR Bulk Data Access (Flat FHIR) following the HL7 specification.

    137 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Databricks CLI

    aehrc/pathling

    Expert guidance for using the Databricks CLI to manage Databricks workspaces, clusters, jobs, pipelines, Unity Catalog, SQL warehouses, serving endpoints, secrets, bundles, and all other Databricks…

    137 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Fhir Search Spec

    aehrc/pathling

    FHIR RESTful search specification expert with access to the official HL7 search specification text and the formal SearchParameter registry.

    137 GitHub stars~649 tokensUpdated today
    Auto-check passed
  • Design and generate comprehensive FHIRPath test suites using input domain partitioning and Pathling's DSL test framework.

    137 GitHub stars~3.6k tokensUpdated today
    Auto-check passed
  • Hapi Fhir Server

    aehrc/pathling

    Expert guidance for implementing FHIR servers using HAPI FHIR Plain Server framework.

    137 GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • Playwright Testing

    aehrc/pathling

    Expert guidance for writing end-to-end tests with Playwright Test framework.

    137 GitHub stars~1.5k tokensUpdated today
    Auto-check passed

Questions about Fhir API

What does Fhir API do?

Expert guidance for implementing FHIR RESTful API servers and clients following the HL7 FHIR specification. Fhir API is an agent skill from aehrc/pathling. Expert guidance for implementing FHIR RESTful API servers and clients following the HL7 FHIR specification.

When should I use Fhir API?

Fhir API fits situations like: implementing a FHIR server with REST endpoints; building a FHIR client; designing FHIR API routes and handlers; implementing FHIR operations (read.

How do I install Fhir API in Claude Code?

Run `npx skills add aehrc/pathling --skill fhir-api -a claude-code`. Or copy the skill folder (.claude/skills/fhir-api in aehrc/pathling) into .claude/skills/fhir-api in your project. Claude Code loads it when a task matches its description.

How do I install Fhir API in Codex?

Run `npx skills add aehrc/pathling --skill fhir-api -a codex`. Or copy the skill folder (.claude/skills/fhir-api in aehrc/pathling) into .agents/skills/fhir-api in your project. Codex loads it when a task matches its description.

Can I use Fhir API in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aehrc/pathling --skill fhir-api -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fhir-api, .gemini/skills/fhir-api, .github/skills/fhir-api and .opencode/skills/fhir-api in your project.

What does Fhir API need to run?

SKILL.md names no scripts, command-line tools or credentials: Fhir API is instructions for the agent only.

Does Fhir API access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Fhir API safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Fhir API use?

Fhir API is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Fhir API use?

About 1.5k tokens (SKILL.md is roughly 5.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5.7k tokens, read only when the agent opens those files.

What are the alternatives to Fhir API?

Skills that share tags, products or a category with Fhir API: Fhir Developer Skill (majiayu000/claude-skill-registry, 666 stars), Database Lookup (majiayu000/claude-skill-registry, 666 stars), Pubchem Database (davila7/claude-code-templates, 32k stars) and Claude To Medrixflow (Citrus-bit/Anaxa, 120 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fhir API?

aehrc (a GitHub organization) maintains it in aehrc/pathling, which has 137 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on October 8, 2026.

Source: aehrc/pathling on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.