Repository navigation
Conversation
Covers Capture form field, enrollment and bulk data entry plugins, Dashboard plugins, and hosting plugins with the app-runtime <Plugin> component. Prop types are taken from the Capture and Dashboard app source, with notes where the published docs differ. Documents the CAPTURE_<KIND> / DASHBOARD pluginType convention, scaffolding with `pnpm create @dhis2/app --template plugin` (with a manual fallback), a mocked-props dev harness, and host configuration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Jest mappings Prefer the generic <Plugin<Props>> API and automatic Jest alias mapping from upcoming app-runtime / cli-app-scripts releases, keeping the workarounds for older versions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Dec 1, 2026
Draft
Draft
Merged
…ER_BULK_DATA_ENTRY Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…est config Jest uses the first moduleNameMapper pattern that matches, so an app's ^@/(.*)$ mapping shadowed the CSS mock for aliased imports like @/App.module.css. Also make the Proxy style mock answer __esModule with false so default imports get the class-name map. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ROLLMENT Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p-scripts 12.12.0 versions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
AI assistants get DHIS2 plugins wrong in predictable ways. They use the outdated reference-repo prop shapes, treat
pluginTypeas meaningful to Capture, pass DHIS2 UIDs instead of plugin aliases tosetFieldValue, and add routing or an app shell to plugins. This skill gives them the facts, checked against the host apps' source.What's in it
src/skills/dhis2-plugins/:SKILL.md: how to choose a plugin type, scaffolding withpnpm create @dhis2/app --template plugin --pluginType <type>(with a manual fallback for older create-app versions), cross-cutting rules (experimental status, DHIS2 40.5+, sandboxing, no routing), and the pluginType convention (CAPTURE_FORM_FIELD,CAPTURE_ENROLLMENT,TRACKER_BULK_DATA_ENTRY,DASHBOARD). It defers todhis2-appsfor general app guidance.references/:form-field.md,enrollment.md,bulk-data-entry.md,dashboard.md: props typed from the host source, value formats, examples, and where the published docs differ.hosting-plugins.md: embedding a plugin with<Plugin>, which props get stripped, typed custom props, and Jest setup.host-configuration.md: the Tracker Plugin Configurator, thecapturedata store keys, and the Dashboard app selector.develop-and-deploy.md: the mocked-props harness, build, deploy and App Hub.evals/evals.json: five evals, one per plugin type plus hosting a plugin.No changeset, since skills aren't published to npm.
Version notes
hosting-plugins.mdrecommends<Plugin<Props>>and relies on automatic Jest alias mapping. Both come from dhis2/app-runtime#1448 and dhis2/app-platform#971, now merged. The skill gives the version thresholds (app-runtime 3.18.0, cli-app-scripts 12.12.0, both released) and keeps workarounds for older versions.Eval results (iteration 1)
The skill scored 35/36 assertions, against 28/36 for the baseline without it. The eval runs surfaced a wrong claim about
<Plugin>accepting arbitrary props, which led to the app-runtime fix.Related PRs
Part of a set that makes DHIS2 plugins (Capture form field / enrollment / bulk data entry, Dashboard) easier to build, and brings the docs in line with what the host apps actually pass:
<Plugin>custom props,experimentaltypes undernoderesolution@/aliases and@dhis2/app-runtime/experimentalpnpm create @dhis2/app --template plugin --pluginType <type>dhis2-pluginsagent skill🤖 Generated with Claude Code