Skip to content

About

Agent skills for working with CQL, FHIR, Clinical Reasoning, and Content Implementation Guides

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CQF Skills

Open source Agent Skills for working with CQL, FHIR, FHIR Clinical Reasoning, and FHIR content Implementation Guides, maintained by the Clinical Quality Framework community.

Skills are folders of instructions, references, and scripts that an AI agent loads on demand when a task calls for them. These skills teach agents to author, review, test, and package clinical knowledge artifacts (CQL libraries, measures, PlanDefinitions, and the IGs that publish them) using the conventions of the HL7 and CQF specifications and tooling.

The skills follow the open Agent Skills format, so they work in Claude Code, Claude.ai, the Claude API, and other agents that support SKILL.md.

Status: early development. Skills are being brought in from other repositories one at a time.

Skill catalog

Skills are grouped into plugins by domain (cql, fhir, clinical-reasoning, fhir-ig), so you can install only the ones you need. Some plugins are maintained in their own repositories and listed here so they can be installed from one marketplace.

Plugin Skill Purpose
cql cql Author, review and debug CQL libraries, and answer semantics questions from the CQL 1.4, 1.5.3 and 2.0.0 spec text, with documented translator and engine gotchas. Run bash skills/cql/scripts/fetch-spec.sh once to build the local spec copy.
cql cql-ig Apply the Using CQL With FHIR IG 2.0.0: its conformance rules for CQL against FHIR, packaging CQL as a FHIR Library, the CQL-to-FHIR type mapping, $cql and Library/$evaluate, and FHIR authoring patterns, with FHIRHelpers, FHIRCommon and the FHIR ModelInfo. Run bash skills/cql-ig/scripts/build-kb.sh to build the local knowledge base of the IG's profiles and operations.
cql us-cql-ig Write CQL against US Core with the Common CQL Artifacts for FHIR (US-Based) IG 2.0.0: the USCore ModelInfo (6.1.0-derived), USCoreCommon, USCoreElements and CumulativeMedicationDuration, retrieving US Core profiles, and the IG's per-resource patterns.
cql cms-qmd Author and review CMS digital quality measure CQL with the CMS FHIR Quality Measure Development IG (continuous build) against US Quality Core 0.5.0: the style guide, logic layers, Pattern Index and per-resource patterns, negation, known issues, and the CQMCommon, CQMConcepts, CQMElements, ClaimCommon and MedicationCommon libraries.
cql vscode-cql Set up, use and troubleshoot the VS Code CQL extension 1.0.0 and cql-language-server 5.0.0: project layout, the CQL Explorer, test cases and config.jsonc parameters, Execute CQL results, the debugger, include and package resolution, and logs, with each behaviour cited to the extension or server code.
cql madie Build, check and move US Quality Core 0.5.0 test cases between VS Code and MADiE: converting exports to the VS Code CQL extension's layout and back, checking Execute CQL results against expected values the way MADiE does, reporting engine discrepancies to cql-tests, the test case zip and .madie file, import rules and errors, what MADiE keeps or rewrites in bundles and CQL, MeasureReport expected values, validation, how MADiE runs test cases, and drafting QI-Core measures as US Quality Core, with each behaviour cited to MADiE's source code. scripts/check_test_cases.py checks a zip before import.
fhir fhir Work with FHIR R4 resources and bundles: bundle types, transaction entries, resource IDs, meta.profile, references and terminology system URIs, with element, cardinality and binding tables for the base R4 resources and data types.
fhir fhir-extensions Find and apply standard R4 extensions from the FHIR Extensions Pack 5.4.0: canonical URLs, value types, where each may be used, and which are draft or deprecated and what replaces them. Run bash skills/fhir-extensions/scripts/build-kb.sh once to build the local knowledge base.
fhir uscore Look up and apply US Core 6.1.0 and 9.0.0 profiles: Must Support, Additional USCDI Requirements, bindings, the race, ethnicity and sex extensions, missing-data rules, and what changed between the versions. Run bash skills/uscore/scripts/build-kb.sh once to build the local element tables.
fhir usqualitycore Look up and apply US Quality Core 0.5.0, the ONC profiles for USCDI+ Quality: USCDI+ Quality flags, in-scope profiles, negation profiles, the QDM-to-US Quality Core mapping, and the USQualityCore model. Run bash skills/usqualitycore/scripts/build-kb.sh once to build the local element tables.
clinical-reasoning crmi Choose and apply CRMI 2.0.0 shareable, publishable, computable and executable profiles, and look up artifact lifecycle and packaging operations such as $package, with the cqf- and artifact- extensions (FHIR Extensions R4 5.4.0). Run bash skills/crmi/scripts/build-kb.sh once to build the local knowledge base.
clinical-reasoning cpg Choose and apply CPG 2.0.0 profiles for computable guidelines: recommendation, strategy and pathway definitions, computable activities, case features and metrics, with the cqf- extensions they use. Run bash skills/cpg/scripts/build-kb.sh once to build the local knowledge base.
clinical-reasoning plan-definition Author, review, apply and debug PlanDefinitions and ActivityDefinitions: actions, conditions, behaviors, expressions and libraries, dynamicValues, and $apply as FHIR R4, CPG 2.0.0 and R5 define it and as clinical-reasoning 4.13.0 (HAPI FHIR) runs it, with each behaviour cited to the code and checked by running it. scripts/apply/run.sh runs $apply locally (Java 17+, Maven).
clinical-reasoning questionnaire Author, review, populate and extract Questionnaires and QuestionnaireResponses: items, enableWhen, SDC 4.0.0 expressions and launch context, CQL libraries, $populate, $extract and Questionnaire generation, as FHIR R4 and SDC 4.0.0 define them and as clinical-reasoning 4.13.0 (HAPI FHIR) runs them, with each behaviour cited to the code and checked by running it. scripts/sdc/run.sh runs $populate and $extract locally (Java 17+, Maven).
fhir-ig fsh Write and debug FHIR Shorthand (FSH 3.0.0) for SUSHI: profiles, extensions, value sets, code systems, instances, rule sets and slicing, with the FSH language reference and the mistakes SUSHI rejects.
fhir-ig ig-publisher Configure, run and debug the HL7 IG Publisher (3.0.4): ig.ini, IG parameters, which folders come from the template, the CQL loader, flags, terminology and pinning, and reading qa.html, with every claim cited to the pinned publisher source or a recorded probe build.
cql-mcp cql-mcp The cql-mcp server and its usage skill: validate and run CQL, inspect ELM, run and diff test-case suites, and debug step by step. Maintained in cqframework/cql-mcp and pinned to a release. Requires Node.js 22+ and JDK 17+.

Installation

Claude Code

This repository is a Claude Code plugin marketplace.

/plugin marketplace add cqframework/cqf-skills
/plugin install cql@cqf-skills
/plugin install fhir@cqf-skills
/plugin install clinical-reasoning@cqf-skills
/plugin install cql-mcp@cqf-skills

To pick up new releases, run /plugin marketplace update cqf-skills.

Installing cql-mcp installs its skill and registers the cql-mcp server, with the workspace set to the project directory you start Claude Code from. The server needs Node.js 22+ and a JDK 17+. On first use it downloads the server package and the CQL language server, so the first start can be slow. If you already registered cql-mcp yourself with claude mcp add, remove that registration to avoid running two servers.

Other agents that support Agent Skills

Each folder under skills/ is self-contained. Copy or symlink the ones you want into your agent's skills directory, for example:

git clone https://github.com/cqframework/cqf-skills.git
cp -r cqf-skills/skills/cql ~/.claude/skills/        # Claude Code (personal)
cp -r cqf-skills/skills/cql .claude/skills/          # Claude Code (project)
cp -r cqf-skills/skills/cql .agents/skills/          # agents that use .agents/skills

Check your agent's documentation for the exact location it reads skills from.

Plugins maintained elsewhere aren't under skills/. For cql-mcp, set up the server for your client by following the cql-mcp install guide, and get the skill from the cql-mcp-skill.zip attached to each cql-mcp release.

Claude.ai and the Claude API

Zip a skill folder (the zip must contain the folder itself, not just its contents). Then upload it under Settings → Capabilities → Skills on Claude.ai, or through the Skills API. Each release attaches prebuilt zips.

Repository layout

cqf-skills/
├── .claude-plugin/
│   └── marketplace.json        # Claude Code marketplace: defines plugins as groups of skills
├── skills/                     # One folder per skill; the folder name is the skill name
│   └── <skill-name>/
│       ├── SKILL.md            # Required: YAML frontmatter + instructions
│       ├── references/         # Optional: detail loaded only when needed
│       ├── scripts/            # Optional: deterministic helpers the agent runs
│       └── assets/             # Optional: templates and files copied into output
├── evals/                      # Evaluation cases per skill (not shipped with the skill)
│   └── <skill-name>/
├── template/
│   └── SKILL.md                # Starting point for new skills
├── scripts/
│   └── validate_skills.py      # Lint: frontmatter, naming, marketplace consistency
├── .github/workflows/
│   └── validate.yml            # CI: runs the validator on every PR
├── AGENTS.md                   # Instructions for agents contributing to this repo
├── CONTRIBUTING.md             # Authoring guidelines and review checklist
├── CHANGELOG.md
└── LICENSE                     # Apache-2.0

Skills sit in a single flat skills/ directory rather than nested under plugins. This keeps every skill installable on its own with any Agent Skills–compatible tool. The plugin groupings live only in marketplace.json.

Anatomy of a skill

---
name: cql-authoring
description: Writes and reviews CQL libraries targeting FHIR, following CQL
  authoring conventions. Use when creating or editing .cql files, defining
  retrieves, value set and code declarations, or measure population criteria.
license: Apache-2.0
---

# CQL Authoring

## Workflow
1. ...

## References
- For the FHIRHelpers and QICore model conventions, see [references/models.md](references/models.md).
  • name: lowercase letters, digits, and hyphens; at most 64 characters; must match the folder name.
  • description: at most 1024 characters, written in the third person. It must say what the skill does and when to use it. Agents decide whether to load a skill from its description alone.
  • Body: keep it under about 500 lines. Move detail into references/ and link to it one level deep, so the agent loads it only when it needs it (progressive disclosure).

See CONTRIBUTING.md for the full authoring guidelines.

Design principles

  1. Specification-grounded. Guidance follows the published HL7 specifications (CQL, Using CQL with FHIR, CRMI, CPG, Quality Measures, SDC). Skills link to the canonical spec rather than copying it, and note which version they target.
  2. Teach what the model doesn't already know. Skip general FHIR or programming background. Focus on conventions, pitfalls, tooling behavior, and decision points.
  3. Tooling-aware, not tooling-locked. Prefer the CQF reference tooling (the CQL translator, the Clinical Reasoning engine, and the IG Publisher). Keep the guidance usable without any particular agent or IDE.
  4. Deterministic where possible. When a step can be scripted (validation, translation, packaging), ship a script instead of prose.
  5. Self-contained. A skill must not reference files outside its own folder, because each skill can be installed on its own.
  6. Evaluated. Every skill ships with eval cases under evals/<skill-name>/ that show it improves agent results on realistic tasks.
  7. No PHI. Examples and test data must be synthetic.

Contributing

Contributions are welcome, especially from implementers with hands-on CQL, measure, and IG experience. Read CONTRIBUTING.md, start from template/SKILL.md, and run the validator before you open a PR:

pip install pyyaml
python scripts/validate_skills.py

To propose a new skill, open an issue that describes the tasks it should handle and two or three example prompts.

Related projects

License

Apache License 2.0. Unless otherwise noted, each skill is also licensed under Apache-2.0, as declared in its SKILL.md frontmatter.

HL7®, FHIR®, and the FHIR flame logo are registered trademarks of Health Level Seven International.

About

Agent skills for working with CQL, FHIR, Clinical Reasoning, and Content Implementation Guides

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages