Agent skill

Fhirpath Spec

by aehrc in aehrc/pathling

FHIRPath and FHIR specification expert with access to the official spec text and optionally the official fhirpath.js reference implementation.

Apache-2.0Auto-check passedResearch & Science

Install Fhirpath Spec

skills CLI
$ npx skills add aehrc/pathling --skill fhirpath-spec -a claude-code

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

GitHub CLI
$ gh skill install aehrc/pathling fhirpath-spec --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/fhirpath-spec .claude/skills/fhirpath-spec && 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
fhirpath-spec
GitHub stars
137
Token cost
~1.9k tokens
SKILL.md length
850 words
Files
4 (incl. references)
Skills in repo
25
Repo updated
First seen
Licence
Apache-2.0

At a glance

FHIRPath and FHIR specification expert with access to the official spec text and optionally the official fhirpath.js reference implementation.

  • Works in 4 steps: FHIRPath Specification —… → Official fhirpath.js reference… → FHIR-specific FHIRPath bindings —… → …
  • The user needs to look up
  • SKILL.md covers First: check for the reference…, Sources (in priority order), How to search and How to consult the official…, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Fhirpath Spec is an agent skill from aehrc/pathling. FHIRPath and FHIR specification expert with access to the official spec text and optionally the official fhirpath.js reference implementation. Use this skill whenever the user needs to look up, clarify, or understand any FHIRPath feature — functions, operators, types, type conversions, equality/comparison rules, collection behavior, literals, or any other aspect of the FHIRPath specification. Trigger this skill when implementing a new FHIRPath feature, designing test cases for FHIRPath behavior, resolving…

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/FHIRPath.md`, `references/FHIRPath_Sharable_Requirements.md` and `references/FHIR_FHIRpath.md`).

It sits in Research & Science, covering Clinical and healthcare research and Test generation. It works with GitHub. 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

  • The user needs to look up
  • Understand any FHIRPath feature — functions
  • Type conversions
  • Equality/comparison rules

Example prompts

  • “what does the spec say about X?”
  • “/fhirpath-spec”

Workflow steps

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

  1. FHIRPath Specification — references/FHIRPath.md (~4600 lines). This is the normative spec and your primary source of truth.
  2. Official fhirpath.js reference implementation (JavaScript): $FHIRPATH_JS_SRC — only if available (see check above). The HL7-maintained…
  3. FHIR-specific FHIRPath bindings — references/FHIR_FHIRpath.md (~440 lines). Covers how FHIRPath is used within FHIR (polymorphism, type…
  4. SQL-on-FHIR requirements — references/FHIRPath_Sharable_Requirements.md (~40 lines). Lists the FHIRPath subset required for…

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.

    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

Fhirpath Spec loads about 1.9k tokens when it runs, and up to ~50k if it reads all its reference files. Until then it costs about 241 tokens; SKILL.md has 850 words of instructions outside code blocks.

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

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). 850 words, ~1,854 tokens.

Download SKILL.mdSave it as .claude/skills/fhirpath-spec/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
fhirpath-spec
description
FHIRPath and FHIR specification expert with access to the official spec text and optionally the official fhirpath.js reference implementation. Use this skill whenever the user needs to look up, clarify, or understand any FHIRPath feature — functions, operators, types, type conversions, equality/comparison rules, collection behavior, literals, or any other aspect of the FHIRPath specification. Trigger this skill when implementing a new FHIRPath feature, designing test cases for FHIRPath behavior, resolving ambiguity about how an operator or function should work, or answering "what does the spec say about X?" questions. Also use it when the user mentions FHIR-specific FHIRPath bindings (e.g., ofType with FHIR types, resolve(), extension()). When the fhirpath.js reference implementation is available, this skill can cross-reference the spec text with the actual reference implementation code to surface comparison evidence on ambiguous points.

FHIRPath Specification Expert

You are a specification expert for FHIRPath — a path-based navigation and extraction language used in FHIR and CQL. Your job is to give precise, authoritative answers grounded in the local specification files.

First: check for the reference implementation

You MUST call cache-github-repo's ensure HL7/fhirpath.js before reading the spec or answering, on every invocation of this skill — unconditionally, even when the question looks answerable from the spec text alone. Add --unattended to that call only if this skill's own invocation was itself given --unattended (e.g. by implement-pathling --unattended); otherwise call ensure HL7/fhirpath.js with no flag.

  • A local path comes back — e.g. ~/.cache/claude-skills/github-repo-cache/HL7/fhirpath.js/3.16.4. Set FHIRPATH_JS_SRC to <that path>/src and follow the "How to consult the official fhirpath.js reference implementation" section below.
  • No entry is configured yet, and you did not pass --unattended — this is not a failure and not a reason to fall back to the spec alone. Stay inside cache-github-repo's configure flow until it actually asks you a question and gets an answer, then retry ensure. Skipping straight to spec-only because "no version configured" is only valid when --unattended was actually passed.
  • --unattended was passed and no entry exists, or the clone genuinely could not be reached — skip all fhirpath.js-related instructions and work from the spec text alone.

Sources (in priority order)

  1. FHIRPath Specification — references/FHIRPath.md (~4600 lines). This is the normative spec and your primary source of truth.
  2. Official fhirpath.js reference implementation (JavaScript): $FHIRPATH_JS_SRC — only if available (see check above). The HL7-maintained reference implementation of FHIRPath. When the spec text is ambiguous, its behavior is strong comparison evidence to report alongside the ambiguity — not a resolution of it. Consult it proactively when available.
  3. FHIR-specific FHIRPath bindings — references/FHIR_FHIRpath.md (~440 lines). Covers how FHIRPath is used within FHIR (polymorphism, type mappings, additional functions like resolve(), extension()). This is the R4 binding (v4.0.1), matching the FHIR version Pathling targets — so it will not describe later-version features such as %factory or FHIR.integer64, and their absence is a statement about Pathling's model rather than a gap in the reference.
  4. SQL-on-FHIR requirements — references/FHIRPath_Sharable_Requirements.md (~40 lines). Lists the FHIRPath subset required for ShareableViewDefinition.

The spec files are too large to load entirely. Always use targeted search:

  1. Grep for the feature name or keyword in references/FHIRPath.md and references/FHIR_FHIRpath.md
  2. Read the relevant section using offset/limit based on the grep results
  3. Read generously — include surrounding context (±30 lines) because specs often have important notes, edge cases, and examples near the main definition

When searching, try multiple patterns since the spec uses varying formats:

  • Function names: substring, Substring, substring(
  • Operators: the operator symbol AND the section name (e.g., = and Equality)
  • Types: the type name AND related sections (e.g., Quantity and Comparison)
Show full SKILL.md (398 more words)Show less

How to consult the official fhirpath.js reference implementation

Skip this entire section if the reference implementation is not available (see check above).

The fhirpath.js project cached at $FHIRPATH_JS_SRC is the HL7-maintained official reference implementation, pinned to the version recorded in this project's .claude/repo-cache.yaml. It is strong comparison evidence for resolving ambiguities — if the spec text is unclear on edge cases, null handling, type coercion, or collection behavior, check what fhirpath.js does and report it alongside the ambiguity. Its behavior is evidence to weigh, not a substitute for the spec text; whether an ambiguity needs to be escalated (e.g. via implement-pathling's spec-ambiguity gate) is for the caller to decide, not this skill.

When to consult it:

  • Always when the spec text leaves room for interpretation (e.g., what happens with empty inputs, mixed types, precision mismatches)
  • When implementing a feature and needing to confirm exact semantics
  • When test cases seem to contradict the spec — check the reference implementation to see which interpretation it follows
  • When the user asks "what should happen when..." type questions

Do not wait to be asked — if you notice ambiguity while reading the spec, proactively check the reference implementation and report what it does, flagging the ambiguity explicitly rather than treating the reference implementation's behavior as having resolved it.

$FHIRPATH_JS_SRC is organized by category:

  • strings.js — string functions
  • math.js — math operations
  • equality.js — equality/equivalence
  • collections.js — collection operations
  • existence.js — existence functions
  • filtering.js — where(), select(), etc.
  • navigation.js — path navigation
  • types.js — type system
  • datetime.js — date/time operations

Response format

Structure your answer to include whichever of these are relevant:

  • Signature: The function/operator signature exactly as specified
  • Description: What it does, in spec language
  • Input/Output types: Parameter types and return type
  • Collection behavior: How it handles empty collections, single vs. multiple items
  • Edge cases: Null propagation, type mismatches, precision handling
  • Examples: From the spec or reference implementations (if available)
  • Related features: Other functions/operators that interact with this one
  • FHIR-specific notes: Any FHIR binding differences (from FHIR_FHIRpath.md)

Always quote or closely paraphrase the spec rather than relying on your general knowledge. If the spec is silent or ambiguous on a point, say so explicitly. If the fhirpath.js reference implementation is available, consult it and report what it does as evidence to weigh alongside the ambiguity — not as a resolution of it. If the reference implementation is not available, note the ambiguity and offer your best interpretation based on the spec text and related sections.

© 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/fhirpath-spec of aehrc/pathling.

  • SKILL.md
  • references/FHIRPath.md
  • references/FHIRPath_Sharable_Requirements.md
  • references/FHIR_FHIRpath.md

Open the folder on GitHubat commit 56a3b4a

Compare with similar skills

Fhirpath Spec 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.

Fhirpath Spec compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fhirpath Spec this skillaehrc/pathling137—~1.9kAutomated safety check: PassApache-2.0
Healthcare Eval Harnessaffaan-m/ECC275k1 repos~2kAutomated safety check: PassMIT
GitHub Deep Researchbytedance/deer-flow83k5 repos~1.3kAutomated safety check: PassMIT
Last30daysmvanhorn/last30days-skill64k—~7.8kAutomated safety check: NotesMIT
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

Similar skills

  • Patient safety evaluation harness for healthcare application deployments.

    275k GitHub starsUsed in 1 repo~2k tokens
    DevOps & CloudAuto-check passed
  • GitHub Deep Research

    bytedance/deer-flow

    Researches a GitHub repository over four rounds using the GitHub API and web search, then writes a structured markdown report with timeline, metrics and Mermaid diagrams.

    83k GitHub starsUsed in 5 repos~1.3k tokens
    Research & ScienceAuto-check passed
  • Last30days

    mvanhorn/last30days-skill

    Research what people actually say about any topic in the last 30 days.

    64k GitHub stars~7.8k tokensUpdated today
    Research & ScienceAuto-check: notes
  • 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
  • Rival Search MCP

    damionrashford/RivalSearchMCP

    Deterministic deep research via RivalSearchMCP. An agent skill from damionrashford/RivalSearchMCP.

    132 GitHub starsUsed in 1 repo~796 tokens
    Research & ScienceAuto-check passed

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
  • 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

Works with

Questions about Fhirpath Spec

What does Fhirpath Spec do?

FHIRPath and FHIR specification expert with access to the official spec text and optionally the official fhirpath.js reference implementation. Fhirpath Spec is an agent skill from aehrc/pathling.js reference implementation.

When should I use Fhirpath Spec?

Fhirpath Spec fits situations like: the user needs to look up; understand any FHIRPath feature — functions; type conversions; equality/comparison rules.

How do I install Fhirpath Spec in Claude Code?

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

How do I install Fhirpath Spec in Codex?

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

Can I use Fhirpath Spec 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 fhirpath-spec -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fhirpath-spec, .gemini/skills/fhirpath-spec, .github/skills/fhirpath-spec and .opencode/skills/fhirpath-spec in your project.

What does Fhirpath Spec need to run?

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

Does Fhirpath Spec 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 Fhirpath Spec 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 Fhirpath Spec use?

Fhirpath Spec 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 Fhirpath Spec use?

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

What are the alternatives to Fhirpath Spec?

Skills that share tags, products or a category with Fhirpath Spec: Healthcare Eval Harness (affaan-m/ECC, 275k stars), GitHub Deep Research (bytedance/deer-flow, 83k stars), Last30days (mvanhorn/last30days-skill, 64k stars) and Clinical Trials Database (google-deepmind/science-skills, 3.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fhirpath Spec?

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.