medplum-rules

medplum-rules is a skill for Claude Code from softspark/ai-toolkit. It costs 53 tokens per session (3,916 once invoked), scanned A, original, Apache-2.0.

A set of coding rules for Medplum, a healthcare platform built around FHIR, a standard format for exchanging health records.

In plain words
What is it for?
Use it when writing or reviewing Medplum resources, references, security-sensitive code, and tests.
Why use it?
It helps prevent inconsistent healthcare data structures, unsafe references, and errors in code that handles clinical resources.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: $skill-name invocation.

Part of the ai-toolkit plugin — 115 skills, 44 agents, 14 hooks shipped together

Good fit Use it when writing or reviewing Medplum resources, references, security-sensitive code, and tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/softspark/ai-toolkit/medplum-rules
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add softspark/ai-toolkit --skill medplum-rules
Clone the repo
git clone --depth 1 https://github.com/softspark/ai-toolkit

Made for: Claude Code.

Or install ai-toolkit, the plugin that ships this one along with the rest of its 115 skills, 44 agents, 14 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for medplum-rules

README.md
[![agentmods](https://agentmods.dev/badge/skills/softspark/ai-toolkit/medplum-rules/github.svg)](https://agentmods.dev/skills/softspark/ai-toolkit/medplum-rules)
Your own site
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/medplum-rules"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/medplum-rules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for medplum-rules

Your own site · 80×15
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/medplum-rules"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/medplum-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,916 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 96
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.03916
Opus 5 $0.00026 $0.01958
Sonnet 5 $0.00011 $0.00783
Haiku 4.5 $0.00005 $0.00392

Measured 6d ago against content hash e60bf2732b5a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

medplum-rules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

app/skills/medplum-rules/SKILL.md · 272 lines

How it starts

The opening of the file, as written. The whole thing — 272 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Medplum (FHIR healthcare) Rules

These rules come from app/rules/medplum/ in ai-toolkit. They cover the project's standards for coding style, frameworks, patterns, security, and testing in Medplum (FHIR healthcare). Apply them when writing or reviewing Medplum (FHIR healthcare) code.

Medplum / FHIR Coding Style

Resource Structure

  • Every FHIR object must include resourceType as first field.
  • Use PascalCase for resource types (Patient, ServiceRequest), camelCase for fields (birthDate, valueQuantity).
  • Never hardcode resource IDs. Let the server assign them on create.
  • Include meta.profile when creating resources that must conform to a StructureDefinition.

References

  • Use createReference(resource) from @medplum/core to build Reference objects.
  • Always include display on references for human readability.
  • Use getReferenceString(resource) for comparisons and logging — returns ResourceType/id.
  • Use parseReference(ref) to extract resourceType and id from a reference string.
  • Never concatenate strings to build references manually.

CodeableConcepts & Coding

  • Always include system, code, and display in every Coding element.
  • Use standard terminology URIs: http://loinc.org, http://snomed.info/sct, http://hl7.org/fhir/sid/icd-10-cm.
  • Use getCodeBySystem(cc, system) to find codes; setCodeBySystem(cc, system, code) to set them.
  • Prefer CodeableConcept over plain Coding when the FHIR spec allows both — it supports multiple codings and free text.

Identifiers

  • Use identifier arrays with system + value for external IDs (MRN, NPI, SSN).
  • Use getIdentifier(resource, system) and setIdentifier(resource, system, value) helpers.
  • Identifier systems must be absolute URIs (e.g., http://hl7.org/fhir/sid/us-npi).
  • Use createResourceIfNoneExist(resource, 'identifier=system|value') for idempotent creates.

Extensions

  • Use the extension array with url and typed value[x] fields.
  • Prefer official HL7/US Core extensions over custom ones where they exist.
  • Use getExtension(resource, url) and getExtensionValue(resource, url) helpers.

Read the full file on GitHub · 272 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 272 lines · 53 tokens per session scan A e60bf2732b5a

Subscribe to this mod's changes

medplum-rules is a skill published in the GitHub repository softspark/ai-toolkit (170 stars, last pushed yesterday), licensed Apache-2.0. It adds 53 tokens to every session and 3,916 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

api-design

REST API contract designer and reviewer. ALWAYS use when designing new endpoints, reviewing existing API contracts, planning API versioning, or standardizing error models. Covers resource modeling (URL/naming), HTTP method semantics, status code selection, error model consistency, pagination/filtering/sorting…

johnqtcg/awesome-skills · 123 tokens

kafka-event-driven-design

Kafka event-driven architecture designer and reviewer, at the application/client layer. ALWAYS use when designing, reviewing, or troubleshooting how a service produces or consumes Kafka events — topic and partition-key design, producer and consumer client configuration, consumer group topology, event schema definition…

johnqtcg/awesome-skills · 191 tokens

api-caller-subagent

Sous-agent spécialisé dans les appels API REST/GraphQL avec retry, auth et transformation de données. Se déclenche avec "sous-agent API", "API caller agent", "agent qui appelle une API", "REST agent", "HTTP agent", "API integration subagent", "external API agent". Also triggers on "subagent that calls an API", "API…

khalilbenaz/claude-skills-collection · 88 tokens

message-protocol

Design de protocoles de communication entre agents et sous-agents — formats de messages, routing, delivery guarantees, ACK/NACK, versioning et middleware. Se déclenche avec "protocole agent", "message protocol", "communication agent", "agent messaging", "inter-agent communication", "message format agent", "agent API…

khalilbenaz/claude-skills-collection · 90 tokens

tool-calling-architect

Design et implémentation de systèmes de tool calling pour agents IA. Function calling, API wrapping, schema design, MCP server, parallel calls, sécurité et monitoring. Se déclenche avec "tool calling", "function calling", "tools agent", "API tools", "agent tools", "créer un outil", "custom tool", "tool schema", "MCP…

khalilbenaz/claude-skills-collection · 96 tokens

cost-optimizer

Optimisation des coûts des agents IA — tokens, API calls, modèles, caching, routing, budget controls. Se déclenche avec "coût agent", "agent cher", "réduire les coûts IA", "token optimization", "optimiser les tokens", "budget agent", "agent cost", "économiser sur l'API". Also triggers on "reduce agent cost", "token…

khalilbenaz/claude-skills-collection · 93 tokens