Agent skill

Fhir Bulk Data

by aehrc in aehrc/pathling

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

Apache-2.0Auto-check passedResearch & Science

Install Fhir Bulk Data

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

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

GitHub CLI
$ gh skill install aehrc/pathling fhir-bulk-data --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-bulk-data .claude/skills/fhir-bulk-data && 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-bulk-data
GitHub stars
137
Used in
1 other repo
Token cost
~1.8k tokens
SKILL.md length
356 words
Files
3 (incl. references)
Skills in repo
25
Repo updated
First seen
Licence
Apache-2.0

At a glance

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

  • Implementing bulk data export from FHIR servers
  • SKILL.md covers Overview, Export endpoints, Asynchronous workflow and Request parameters, plus 7 more sections
  • Reaches hl7.org
  • Building bulk data clients

What it does

Fhir Bulk Data is an agent skill from aehrc/pathling. Expert guidance for implementing FHIR Bulk Data Access (Flat FHIR) following the HL7 specification. Use this skill when implementing bulk data export from FHIR servers, building bulk data clients, working with the $export operation, handling NDJSON output files, implementing asynchronous polling workflows, or integrating with SMART Backend Services authorisation. Trigger keywords include "bulk data", "bulk export", "$export", "NDJSON", "bulk FHIR", "async export", "flat FHIR", "Patient/$export", "Group/$export"…

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/authorization.md` and `references/implementation-notes.md`).

It sits in Research & Science, covering Clinical and healthcare research and Async programming. 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 bulk data export from FHIR servers
  • Building bulk data clients
  • Working with the $export operation
  • Handling NDJSON output files

Example prompts

  • “bulk data”
  • “bulk export”
  • “$export”
  • “/fhir-bulk-data”

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 and http).

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • hl7.org

    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 Bulk Data loads about 1.8k tokens when it runs, and up to ~5.8k if it reads all its reference files. Until then it costs about 137 tokens; SKILL.md has 356 words of instructions outside code blocks.

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

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). 356 words, ~1,774 tokens.

Download SKILL.mdSave it as .claude/skills/fhir-bulk-data/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
fhir-bulk-data
description
Expert guidance for implementing FHIR Bulk Data Access (Flat FHIR) following the HL7 specification. Use this skill when implementing bulk data export from FHIR servers, building bulk data clients, working with the $export operation, handling NDJSON output files, implementing asynchronous polling workflows, or integrating with SMART Backend Services authorisation. Trigger keywords include "bulk data", "bulk export", "$export", "NDJSON", "bulk FHIR", "async export", "flat FHIR", "Patient/$export", "Group/$export", "system export".

FHIR Bulk Data Access

Expert guidance for implementing the FHIR Bulk Data Access (Flat FHIR) specification v3.0.0.

Overview

Bulk Data Access enables efficient export of large FHIR datasets through an asynchronous request pattern. Instead of making thousands of individual API calls, clients initiate a single export operation and poll for completion.

Specification: http://hl7.org/fhir/uv/bulkdata/

Export endpoints

Three endpoints support bulk export:

EndpointScope
[base]/Patient/$exportAll data for all patients
[base]/Group/[id]/$exportData for patients in a specific group
[base]/$exportSystem-level export (all resources)

Asynchronous workflow

Client                                    Server
  │                                         │
  │─── POST [endpoint]/$export ───────────►│
  │    Accept: application/fhir+json        │
  │    Prefer: respond-async                │
  │                                         │
  │◄── 202 Accepted ──────────────────────│
  │    Content-Location: [status-url]       │
  │                                         │
  │─── GET [status-url] ──────────────────►│  ─┐
  │◄── 202 Accepted (X-Progress: 50%) ────│   │ Poll until
  │    Retry-After: 120                     │   │ complete
  │                                         │  ─┘
  │─── GET [status-url] ──────────────────►│
  │◄── 200 OK ────────────────────────────│
  │    [Complete manifest JSON]             │
  │                                         │
  │─── GET [file-url] ────────────────────►│  ─┐
  │◄── 200 OK (NDJSON content) ───────────│   │ Download
  │                                         │  ─┘ files
  │─── DELETE [status-url] ───────────────►│
  │◄── 202 Accepted ──────────────────────│

Request parameters

ParameterTypeDescription
_outputFormatstringOutput format. Default: application/fhir+ndjson
_sinceinstantInclude resources modified after this timestamp
_untilinstantInclude resources modified before this timestamp
_typestringComma-delimited resource types to include
_elementsstringComma-delimited elements to include (experimental)
_typeFilterstringFHIR search queries to filter resources
includeAssociatedDatacodeInclude additional data sets (experimental)
organizeOutputBystringOrganise files by resource type instances
allowPartialManifestsbooleanEnable paginated manifests
Example kick-off request
http
GET [base]/Patient/$export?_type=Patient,Observation,Condition&_since=2024-01-01T00:00:00Z HTTP/1.1
Accept: application/fhir+json
Prefer: respond-async
Authorization: Bearer [token]

Or as POST with Parameters:

http
POST [base]/Patient/$export HTTP/1.1
Content-Type: application/fhir+json
Accept: application/fhir+json
Prefer: respond-async
Authorization: Bearer [token]

{
  "resourceType": "Parameters",
  "parameter": [
    {"name": "_type", "valueString": "Patient,Observation,Condition"},
    {"name": "_since", "valueInstant": "2024-01-01T00:00:00Z"}
  ]
}

Response handling

Kick-off response

Success returns 202 Accepted with Content-Location header pointing to the status endpoint.

Status polling

Poll the status URL using exponential backoff. Respect Retry-After headers.

StatusMeaning
202 AcceptedIn progress. Check X-Progress for percentage.
200 OKComplete. Body contains the output manifest.
4XX/5XXError. Body contains OperationOutcome.
Complete manifest
json
{
    "transactionTime": "2024-06-15T10:30:00Z",
    "request": "[original request URL]",
    "requiresAccessToken": true,
    "output": [
        {
            "type": "Patient",
            "url": "https://example.org/bulk/file1.ndjson",
            "count": 1000
        },
        {
            "type": "Observation",
            "url": "https://example.org/bulk/file2.ndjson",
            "count": 50000
        }
    ],
    "deleted": [],
    "error": [],
    "link": [{ "relation": "next", "url": "[next manifest page]" }]
}
Show full SKILL.md (143 more words)Show less

NDJSON format

Output files use Newline Delimited JSON. Each line is a complete, valid JSON object representing one FHIR resource.

{"resourceType":"Patient","id":"p1","name":[{"family":"Smith"}]}
{"resourceType":"Patient","id":"p2","name":[{"family":"Jones"}]}

Rules:

  • One JSON object per line
  • UTF-8 encoding
  • Lines terminated with \n (optionally preceded by \r)
  • No newlines within JSON objects
  • Media type: application/x-ndjson or application/fhir+ndjson

Authorisation

Bulk Data servers should implement SMART Backend Services authorisation (OAuth 2.0 client credentials flow with JWT assertion).

See references/authorization.md for implementation details.

Error handling

Servers return OperationOutcome resources for errors:

json
{
    "resourceType": "OperationOutcome",
    "issue": [
        {
            "severity": "error",
            "code": "processing",
            "diagnostics": "Export failed: insufficient permissions"
        }
    ]
}

Common error scenarios:

  • 429 Too Many Requests: Rate limited. Respect Retry-After.
  • 401 Unauthorized: Token expired or invalid.
  • 404 Not Found: Export job deleted or never existed.

Cleanup

After downloading all files, send DELETE to the status URL to signal completion and allow server cleanup.

Conformance

Servers declare bulk data support in their CapabilityStatement:

json
{
    "instantiates": [
        "http://hl7.org/fhir/uv/bulkdata/CapabilityStatement/bulk-data"
    ]
}

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 2 other files (references) in .claude/skills/fhir-bulk-data of aehrc/pathling.

  • SKILL.md
  • references/authorization.md
  • references/implementation-notes.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 Bulk Data 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 Bulk Data compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fhir Bulk Data this skillaehrc/pathling1371 repos~1.8kAutomated safety check: PassApache-2.0
Clinical Trials Databasegoogle-deepmind/science-skills3.2k3 repos~3.2kAutomated safety check: PassApache-2.0
CHARLS Paper Reproduction Guidexjtulyc/MedgeClaw6171 repos~1.8kAutomated safety check: PassNone
Model AssessmentAperivue/medsci-skills3291 repos~4.5kAutomated safety check: PassMIT
Biomedical Analysis Dispatchxjtulyc/MedgeClaw6171 repos~2kAutomated safety check: PassNone
Research Proposalluwill/research-skills858—~4.4kAutomated safety check: NotesNone

Similar skills

  • Clinical Trials Database

    google-deepmind/science-skills

    Query ClinicalTrials.gov via APIv2. An agent skill from google-deepmind/science-skills.

    3.2k GitHub starsUsed in 3 repos~3.2k tokens
    Research & ScienceAuto-check passed
  • Guides an agent through reproducing papers built on the CHARLS health and retirement survey, from variable mapping to cognition, depression and isolation scores.

    617 GitHub starsUsed in 1 repo~1.8k tokens
    Research & ScienceAuto-check passed
  • Model Assessment

    Aperivue/medsci-skills

    A skill your agent uses when validating or evaluating a trained medical-imaging model.

    329 GitHub starsUsed in 1 repo~4.5k tokens
    Research & ScienceAuto-check passed
  • Routes bioinformatics, drug discovery, clinical and multi-omics tasks from a chat interface to Claude Code sessions running K-Dense scientific skills, with a live dashboard per task.

    617 GitHub starsUsed in 1 repo~2k tokens
    Research & ScienceAuto-check passed
  • Research Proposal

    luwill/research-skills

    A skill your agent uses when the user asks to write or draft a PhD / doctoral research proposal, research plan, 研究计划书, or 开题报告 — a forward-looking plan of background, gap, research questions…

    858 GitHub stars~4.4k tokensUpdated 8 days ago
    Research & ScienceAuto-check: notes
  • Medical Imaging Review

    LeonChaoX/qinyan-academic-skills

    Write comprehensive literature reviews for medical imaging AI research.

    938 GitHub starsUsed in 3 repos~1.1k tokens
    Research & ScienceAuto-check: notes

More from aehrc/pathling

All 25 skills in this repo
  • Fhir API

    aehrc/pathling

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

    137 GitHub starsUsed in 1 repo~1.5k 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 Bulk Data

What does Fhir Bulk Data do?

Expert guidance for implementing FHIR Bulk Data Access (Flat FHIR) following the HL7 specification. Fhir Bulk Data is an agent skill from aehrc/pathling. Expert guidance for implementing FHIR Bulk Data Access (Flat FHIR) following the HL7 specification.

When should I use Fhir Bulk Data?

Fhir Bulk Data fits situations like: implementing bulk data export from FHIR servers; building bulk data clients; working with the $export operation; handling NDJSON output files.

How do I install Fhir Bulk Data in Claude Code?

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

How do I install Fhir Bulk Data in Codex?

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

Can I use Fhir Bulk Data 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-bulk-data -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-bulk-data, .gemini/skills/fhir-bulk-data, .github/skills/fhir-bulk-data and .opencode/skills/fhir-bulk-data in your project.

What does Fhir Bulk Data need to run?

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

Does Fhir Bulk Data access the network?

SKILL.md names 1 domain. In commands or code: hl7.org; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Fhir Bulk Data 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 Bulk Data use?

Fhir Bulk Data 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 Bulk Data use?

About 1.8k tokens (SKILL.md is roughly 7.1k 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 4k tokens, read only when the agent opens those files.

What are the alternatives to Fhir Bulk Data?

Skills that share tags, products or a category with Fhir Bulk Data: Clinical Trials Database (google-deepmind/science-skills, 3.2k stars), CHARLS Paper Reproduction Guide (xjtulyc/MedgeClaw, 617 stars), Model Assessment (Aperivue/medsci-skills, 329 stars) and Biomedical Analysis Dispatch (xjtulyc/MedgeClaw, 617 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fhir Bulk Data?

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.