building-gold-corpus

building-gold-corpus is a skill for Claude Code from maziyarpanahi/openmed. It costs 159 tokens per session (1,713 once invoked), scanned A, original, Apache-2.0.

A setup guide for creating a synthetic gold corpus: labeled clinical text used as a trusted reference when evaluating medical named-entity recognition and de-identification models.

In plain words
What is it for?
Use it to create annotation projects, BRAT or Label Studio files, and leakage-safe evaluation fixtures for OpenMed.
Why use it?
It provides a consistent label scheme, annotation instructions, tool configuration, and separate training, development, and test data without putting restricted patient data in the repository.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the openmed-skills plugin — 74 skills shipped together

Good fit Use it to create annotation projects, BRAT or Label Studio files, and leakage-safe evaluation fixtures for OpenMed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/maziyarpanahi/openmed/building-gold-corpus
About the project

OpenMed is local-first healthcare AI software that extracts clinical information and removes personally identifying details from clinical text on hardware controlled by the user. Healthcare developers use its Python runtime, Apple Silicon and mobile SDKs, and browser support for on-device clinical NER and PII de-identification.

maziyarpanahi/openmed · 5,290 stars · on GitHub · openmed.life

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 maziyarpanahi/openmed --skill building-gold-corpus
Clone the repo
git clone --depth 1 https://github.com/maziyarpanahi/openmed

Made for: Claude Code.

Or install openmed-skills, the plugin that ships this one along with the rest of its 74 skills.

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 building-gold-corpus

README.md
[![agentmods](https://agentmods.dev/badge/skills/maziyarpanahi/openmed/building-gold-corpus/github.svg)](https://agentmods.dev/skills/maziyarpanahi/openmed/building-gold-corpus)
Your own site
<a href="https://agentmods.dev/skills/maziyarpanahi/openmed/building-gold-corpus"><img src="https://agentmods.dev/badge/skills/maziyarpanahi/openmed/building-gold-corpus/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 building-gold-corpus

Your own site · 80×15
<a href="https://agentmods.dev/skills/maziyarpanahi/openmed/building-gold-corpus"><img src="https://agentmods.dev/badge/skills/maziyarpanahi/openmed/building-gold-corpus.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 159 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,713 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 pass 7 Sept 2026
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.00159 $0.01713
Opus 5 $0.00079 $0.00856
Sonnet 5 $0.00032 $0.00343
Haiku 4.5 $0.00016 $0.00171

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

Security

Grade A, and why

building-gold-corpus 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 12d 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.

skills/building-gold-corpus/SKILL.md · 140 lines

How it starts

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

Building a Gold Corpus

You can't evaluate what you can't measure against. This skill scaffolds a gold-standard annotation project whose output drops straight into the OpenMed eval harness as fixtures. The hard rule: anything committed to the repo is synthetic. Licensed clinical corpora (i2b2, n2c2, MIMIC) are DUA-gated — use them at eval time from the user's own copy, never check them in.

When to use this skill

  • You need eval fixtures for benchmarking-clinical-ner or evaluating-with-leakage-gates and have none.
  • You're standing up an annotation effort: schema, guidelines, tool config.
  • You need disciplined train/dev/test splits with no leakage between them.
  • You want a small synthetic golden set you can commit and gate on in CI.

The OpenMed fixture shape (your target output)

Annotations must serialize to character-offset spans the harness understands:

{
  "fixtures": [
    {
      "id": "synthetic-0001",
      "language": "en",
      "text": "Ms. Jane Roe (MRN 0000000) seen 2099-01-02 for type 2 diabetes.",
      "gold_spans": [
        {"start": 4,  "end": 12, "label": "PERSON"},
        {"start": 18, "end": 25, "label": "ID_NUM"},
        {"start": 32, "end": 42, "label": "DATE"},
        {"start": 47, "end": 62, "label": "DISEASE"}
      ]
    }
  ]
}

openmed.eval.harness.load_fixtures accepts a top-level list or a {"fixtures": [...]} mapping. Offsets are character indices into text; labels are OpenMed-canonical.

Quick start — scaffold the project

eval/
  gold/
    guidelines.md            # annotation manual + edge-case decisions
    label_schema.json        # canonical labels + definitions + examples
    synthetic/               # COMMITTED synthetic fixtures (CI-gateable)
      train.json
      dev.json
      test.json
  external/                  # GITIGNORED: licensed DUA corpora, eval-only
    .gitignore               # *  (never commit i2b2/n2c2/MIMIC)

Verify your synthetic fixtures load and validate spans before you trust them:

Read the full file on GitHub · 140 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. 12d ago First seen · 140 lines · 159 tokens per session scan A af0190ab9f3e

Subscribe to this mod's changes

building-gold-corpus is a skill published in the GitHub repository maziyarpanahi/openmed (5,290 stars, last pushed yesterday), licensed Apache-2.0. It adds 159 tokens to every session and 1,713 once invoked, about $0.0008 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-08-30.

Related

Other skills, from other repositories

evaluating-llms-harness

Evaluates LLMs across 60+ academic benchmarks (MMLU, HumanEval, GSM8K, TruthfulQA, HellaSwag). Use when benchmarking model quality, comparing models, reporting academic results, or tracking training progress. Industry standard used by EleutherAI, HuggingFace, and major labs. Supports HuggingFace, vLLM, APIs.

NousResearch/hermes-agent · 29 tokens

darwinian-evolver

Evolve prompts/regex/SQL/code with Imbue's evolution loop.

NousResearch/hermes-agent · 22 tokens

tool-abuse-detection

Detect tool misuse and unexpected code execution via dialogue testing. Use when the agent exposes file, code-execution, or network tools.

Tencent/AI-Infra-Guard · 32 tokens

add-new-model

Use this skill when the user wants to add or port a new model architecture to MLX-VLM — mapping a Hugging Face modeltype to a new file under mlxvlm/models, writing the ModelConfig, matching layer/weight names, reusing a similar existing model, adding a test class, and validating the port. Covers vision-language…

Blaizzy/mlx-vlm · 83 tokens

convert-quantize

Use this skill when the user wants to convert a Hugging Face model to MLX or quantize/dequantize one with mlxvlm.convert, including bits and group size, quant modes (affine, mxfp4, nvfp4, mxfp8), RTN vs AWQ, mixed-bit recipes, dtype casts, calibration (text or multimodal), local vs Hub paths, revisions, uploading to…

Blaizzy/mlx-vlm · 99 tokens

server-inference

Use this skill when the user wants to run or debug MLX-VLM server inference, including uv run mlxvlm.server, /v1/models, /v1/chat/completions, /v1/responses, streaming, OpenAI-compatible clients, health checks, metrics, model unload/reload, adapters, trust-remote-code, and server request/response failures.

Blaizzy/mlx-vlm · 80 tokens