fhir-ig-analysis
Original:🇺🇸 English
Translated
1 scripts
Measures one or more FHIR Implementation Guides read-only and reports the numbers as JSON and Markdown — scope, complexity, content hygiene, duplication, linguistics, maturity and risk — and compares several IGs side by side using normalised metrics. It builds, changes and publishes nothing. Use this skill when reviewing or QA-ing an MII KDS module IG before a release, when comparing a module against kerndatensatz-basis or another Implementierungsleitfaden, when tracking how a module grows between releases, or when someone asks how large, how clean or how mature a guide actually is. Do not use for migrating a guide onto the module template or for translating one; see mii-ig-migration and fhir-ig-translation.
5installs
Added on
NPX Install
npx skill4agent add forschungsgruppe-digital-health/agent-skills fhir-ig-analysisTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Measuring a FHIR Implementation Guide
Measures a FHIR IG objectively and reports what it counted. Strictly read-only: it never
builds, changes, or publishes anything, and it does not forecast.
Preconditions
Discover the context; do not assume it, and never create it.
-
The tool.must be runnable. The analyser is standard-library only — nothing to install. If
python3is absent, say so and stop; do not fetch an interpreter.python3 -
The subject. One or more IGs, each given as a local path, a git URL, or a package.
.tgzresolves each itself (shallow clone for a URL, download for a package). Nothing needs to be discovered inside the repository beyond what the tool reads.run- A local path with neither nor
sushi-config.yamlis not an IG project. Report that and stop.input/ - A git URL requires network access; if cloning fails, report the failure rather than reporting an empty measurement.
- A local path with neither
-
Static by default, and know what that costs. Without a build, the analysis is static: sushi-config/package metadata, FSH counts, narrative, directives, dependencies, linguistics, duplication, hygiene. Build-derived metrics (: errors, warnings, broken links, validation) stay
qa.jsonand are marked Build in the catalog. A packagenullyields a further reduced analysis — generated resources only..tgzState which mode produced the numbers whenever you report them. Ais not a zero.null
Procedure
The generated reports are in German; this skill's instructions are in English. That is
deliberate and does not follow from either fact on its own — the report prose was inherited and has
not been translated. Do not "fix" it silently, and do not translate the numbers.
Resolve the script path first. The commands below name the tool relative to this skill's own directory, not to your working directory — which is the project you are operating on. Setto the directory containing thisSKILL_DIR(you just read it, so you know where it is) and use it in every invocation:SKILL.mdbashSKILL_DIR=<the directory containing this SKILL.md> # e.g. .claude/skills/fhir-ig-analysisRunning a barefrom the project root does not merely fail — if the project happens to have its ownscripts/...directory with a same-named file, it silently runs that instead.scripts/
-
Measure. One IG or several, from the IG's root or anywhere:bash
python3 "$SKILL_DIR/scripts/ig-stats.py" run <input…> [-o OUTDIR] [--label a,b]With two or more inputs this writes one report per IG plusautomatically.compare-report.mdsets the display label (report heading, compare columns), one per input; output filenames always derive from the IG id.--labelTwo consequences of how inputs resolve, so the numbers are read correctly: a git URL is shallow-cloned, so the git-history metrics (bus factor, maintenance cadence) are reported as not derivable (, valuesgit.history_complete: false) — measure a full local clone when you need them. And the tool reports counted maturity components without an aggregated score: a 0–100 "readiness" number would be a forecast, which this skill deliberately does not produce.null -
Power-user entry points, when you want the stages separately:bash
python3 "$SKILL_DIR/scripts/ig-stats.py" analyze <ig-dir> [-o stats.json] python3 "$SKILL_DIR/scripts/ig-stats.py" report <stats.json> [-o report.md] python3 "$SKILL_DIR/scripts/ig-stats.py" compare <stats.json…> [-o compare.md] -
Read the mandatory-page finding carefully. The page set the tool checks against lives inunder
references/report-content.jsonand is hand-editable on purpose. It is seeded with the MII KDS module template's actual page names.mandatory_pagesIf a measured IG legitimately uses a different page set, correct the list rather than reporting its pages as missing — and say in your report which list you used. A page-completeness metric is only as good as the set it compares against. -
Report both artefacts. The JSON is the durable one: it has a fixed schema, so a series of runs diffs cleanly and shows how a module grows between releases. The Markdown is for people.
-
Compare only on normalised metrics. Absolute counts across IGs of different size say almost nothing; the comparison report aggregates a Σ total for scope but the fair columns are the normalised ones.
-
Same-module verification is automatic. When every compared input carries the same, the inputs are states of ONE module (typically: the platform source vs its migrated copy) and the report switches to Same-Module-Verifikation: identity-field equality, published-artifact-set equality (internal FSH constructs reported separately — template adoption adds scaffold rulesets legitimately), canonical-URL equality (read from
packageIdwhen both inputs have it), and narrative per language level (default / translations / retained platform pages) with word-coverage indicators. The Σ column is dropped (meaningless for one module). Every verdict is counted, none forecast. Order matters: the FIRST input is the reference.fsh-generated
Verification
bash
python3 "$SKILL_DIR/scripts/ig-stats.py" run <ig-dir> -o /tmp/igstats
python3 -c "import json;d=json.load(open('/tmp/igstats/<name>-stats.json'));print(d['mode'],d['schemaVersion'])"- The run exits 0 and writes one and one
*-stats.jsonper input.*-report.md - With ≥2 inputs, exists.
compare-report.md - in the JSON matches what you claim (
mode/static), andreducedis present.schemaVersion - Every metric you quote is either a counted number or — never an estimate. If a field is
null, report it as not derivable statically rather than as zero.null - The mandatory-page result is plausible against the IG you measured. All-missing usually means the wrong page set, not a broken IG.
- On a same-module comparison, the Befund block states IDENTISCH/DIVERGIERT per aspect — a migration is only faithful when identity, published artifact set and canonical URLs are all IDENTISCH; the migration skill's Definition of Done requires exactly that.
Scope and delimitation
Covers measurement and comparison: what is in an IG, how clean it is, how it compares, how it
changes over time.
Deliberately not covered:
- Effort forecasting. The tool reports what it counted. It does not estimate person-days, cost or a readiness score, and an earlier version of this skill that framed the numbers as migration scoping was narrowed on purpose. Do not reintroduce it: a measurement dressed as a forecast is the least trustworthy thing this skill could produce.
- Migration onto the MII KDS module template — see . Verifying a migrated guide against its source belongs there too, in its
mii-ig-migration: artefact reachability, menu structure, content placement, rendered header metadata and toolchain provenance are pass/fail gates that read the migration's page map and run log — inputs that are not properties of an IG and would break this skill's "a path, a URL or ascripts/verify-migration.py" contract. The same-module verification below is the measurement that gate consumes, not a substitute for it: it proves an artefact is PRESENT, never that anything links to it..tgz - Translation — see .
fhir-ig-translation - Convention and naming checks against the MII meta wiki or the metadata contract. Those are a different check, and the module template ships its own skill for them.
- Building or publishing anything. Read-only is a guardrail, not a default.
If a skill of this name is provided both by this catalog and locally, the local one wins.
Guardrails
- Read-only. Never modify the analysed IG; never force a build.
- Measurement, not forecasting. See above.
- Fair comparison only via normalised metrics.
- No invention. A missing input yields , never a guess. Heuristic metrics are marked as heuristics in the catalog and must be reported as such.
null
References
- — the parameter catalog (groups A–N), each metric with its source and its use. Hand-extensible; this is the SSOT for what is measured.
references/metrics-catalog.md - — the schema of
references/ig-stats-schema.json.ig-stats.json - — plain-language texts, glossary, directive patterns, metric explanations, and the
references/report-content.jsonlist. Hand-editable.mandatory_pages - — the Gate 3 prompt set.
references/triggers.md - — the analyser (
scripts/ig-stats.py/run/analyze/report).compare
Provenance
Derived from in
at commit
, which in turn adapted the skill of
(CC-BY-4.0). Both steps of that
lineage are recorded deliberately.
skills/ig-analyzeforschungsgruppe-digital-health/mii-kds-module-templateb5beedb17a66a4397d597429668c7b6d54202c62ig-analyzeforschungsgruppe-digital-health/mii-kds-sample-ig-inoffiziellReworked on 2026-07-31 for this catalog. Beyond the catalog contract, three substantive changes:
- The analyser now ships with the skill. It previously lived in the source repository's
and was referenced by parent traversal, so the skill pointed at a file it could not reach once installed elsewhere.
scripts/ - locates
scripts/ig-stats.pyrelative to its own path. It previously built that path from a computed repository root plus a hard-codedreferences/report-content.json, which broke twice here: there is no repository root to compute, and the skill was renamed.skills/ig-analyze/references/… - The mandatory-page list moved out of the code into and was corrected. The inherited list named eleven pages of which six do not exist in the template modules are built from (
references/report-content.json,use-cases,data-sets,uml,context,references), so every measurement reported six false missing pages.security-privacy
Revised on 2026-08-01 after the skill's first real-task exercise (a dry run against
+ ). Four output defects were fixed, all in the
direction of "measurement, not forecasting": the aggregated /"Freigabe-Indikator"
score was removed (components are now reported unaggregated — schemaVersion 1.4); the
"Empfehlungen" table's migration-scoping prose became neutral "Befunde & Einordnung"
measurement explanations and its metric-less "Arbeitsweise" row was dropped; git-history
metrics on shallow clones (including every clone the tool makes itself) now report
and instead of a fictive "100 % top author"; and
was regenerated from the real output after drifting
( was declared but never emitted). The dry-run findings live in the
sandbox under .
kerndatensatz-dokumentkerndatensatz-basisReifegradhistory_complete: falsenullreferences/ig-stats-schema.jsonmandatory_missingmii-kds-dokument-ig-inoffizielldocs/reports/dry-run-2026-07-31/Original licence: CC-BY-4.0, as declared by both source repositories. is Apache-2.0,
matching this repository's code licence.
scripts/Promoted to on 2026-08-05: repeated real-task use: module measurement/comparison across four KDS modules, and the same-module verification gate of two completed migrations. The trigger set in
references/triggers.md was exercised by those runs.
stable