Agent skill

Running Zeroshot Ner

by maziyarpanahi in maziyarpanahi/openmed

Extract arbitrary, custom entity types from clinical or biomedical text with no fine-tuning using OpenMed's GLiNER / GLiNER2 zero-shot support.

Apache-2.0Auto-check passedAI & LLM Engineering

Install Running Zeroshot Ner

skills CLI
$ npx skills add maziyarpanahi/openmed --skill running-zeroshot-ner -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install maziyarpanahi/openmed running-zeroshot-ner --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/maziyarpanahi/openmed.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/running-zeroshot-ner .claude/skills/running-zeroshot-ner && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
running-zeroshot-ner
GitHub stars
5.5k
Token cost
~1.7k tokens
SKILL.md length
564 words
Files
1
Skills in repo
74
Repo updated
First seen
Licence
Apache-2.0

At a glance

Extract arbitrary, custom entity types from clinical or biomedical text with no fine-tuning using OpenMed's GLiNER / GLiNER2 zero-shot support.

  • Works in 2 steps: openmed zero index — scan a directory of… → openmed zero infer "" --model-id — run…
  • The user wants to define their own labels on the fly (e.g
  • SKILL.md covers When to use, Install, The two-step workflow: index,… and Python API, plus 4 more sections
  • Calls pip

What it does

Running Zeroshot Ner is an agent skill from maziyarpanahi/openmed. Extract arbitrary, custom entity types from clinical or biomedical text with no fine-tuning using OpenMed's GLiNER / GLiNER2 zero-shot support. Use when the user wants to define their own labels on the fly (e.g. Drug, Symptom, Device, Procedure), has no labelled data or a label set not covered by a fine-tuned model, or asks about openmed zero deps/index/infer, the gliner extra, or GLiNER. Pairs adjacent to extracting-clinical-entities (use that for high-accuracy fixed-schema NER) and loading-openmed-models.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Natural language processing and Fine-tuning. The repository describes itself as: Local-first healthcare AI: clinical NER and HIPAA PII de-identification on hardware you control. 2,200+ medical models, 35 model-backed PII languages, and Python, MLX, Android… The licence is Apache-2.0.

When your agent uses it

  • The user wants to define their own labels on the fly (e.g
  • Tasks that involve Natural language processing
  • Tasks that involve Fine-tuning

Example prompts

  • “/running-zeroshot-ner”

Requirements

  • Python 3

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. openmed zero index — scan a directory of downloaded GLiNER /
  2. openmed zero infer "" --model-id — run extraction against a

What it can do on your machine

Read from SKILL.md and the folder at commit 34d7b8c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • arxiv.org
    • huggingface.co

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Running Zeroshot Ner loads about 1.7k tokens when it runs. Until then it costs about 133 tokens; SKILL.md has 564 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~133
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from maziyarpanahi/openmed at commit 34d7b8c, republished under its Apache-2.0 licence (© maziyarpanahi). 564 words, ~1,654 tokens.

Download SKILL.mdSave it as .claude/skills/running-zeroshot-ner/SKILL.md (or your agent's skills folder).
name
running-zeroshot-ner
description
Extract arbitrary, custom entity types from clinical or biomedical text with no fine-tuning using OpenMed's GLiNER / GLiNER2 zero-shot support. Use when the user wants to define their own labels on the fly (e.g. Drug, Symptom, Device, Procedure), has no labelled data or a label set not covered by a fine-tuned model, or asks about openmed zero deps/index/infer, the gliner extra, or GLiNER. Pairs adjacent to extracting-clinical-entities (use that for high-accuracy fixed-schema NER) and loading-openmed-models.
license
Apache-2.0
metadata.project
OpenMed
metadata.category
openmed-core
metadata.pairs
adjacent
metadata.version
1.0

Running Zero-Shot NER

Zero-shot NER lets you extract entity types you name at inference time — no training, no labelled data. OpenMed wraps GLiNER (v1) and GLiNER2 behind a small index + inference layer, exposed via the openmed zero CLI and the openmed.ner Python API. It runs on-device.

When to use

  • Your label set is custom or evolving ("Device", "Implant", "Allergen") and no fine-tuned OpenMed model emits exactly those labels.
  • You have no labelled data to fine-tune with.
  • You need a quick prototype or a one-off extraction over an unusual schema.

When to prefer a fine-tuned model instead (extracting-clinical-entities): for a fixed, well-supported schema (diseases, drugs, anatomy), a fine-tuned OpenMed model is more accurate and faster than zero-shot. Zero-shot trades some accuracy for total label flexibility — use it for coverage of new types, then graduate to a fine-tuned model once the schema stabilises.

Install

bash
pip install "openmed[gliner]"   # pulls GLiNER (and GLiNER2 if a recent gliner is installed)
openmed zero deps               # diagnostic: prints "GLiNER v1: ok" / "GLiNER v2: ok"

openmed zero deps only checks availability — it does not install anything.

The two-step workflow: index, then infer

GLiNER checkpoints live as local model directories. OpenMed resolves them by a short model_id via an index.json, so you build the index once and run inference many times.

  1. openmed zero index <models_dir> — scan a directory of downloaded GLiNER / GLiNER2 checkpoints and write index.json (model ids, family, domains, paths).
  2. openmed zero infer "<text>" --model-id <id> — run extraction against a model from the index, with labels you supply.
bash
# 1) Build the index over your local models (writes <models_dir>/index.json)
openmed zero index /models/gliner --output /models/gliner/index.json

# 2) Run zero-shot NER with your OWN labels (comma-separated)
openmed zero infer "Patient on insulin glargine via an insulin pump for type 1 diabetes." \
  --model-id gliner-biomedical \
  --labels "Drug,Device,Disease" \
  --threshold 0.5 \
  --index-path /models/gliner/index.json

Output is JSON: each entity has text, start, end, label, and score.

CLI flags:

  • zero infer: positional text; --model-id/-m (required, an id from the index), --labels/-l (comma-separated custom labels), --domain/-d (label preset hint), --threshold/-c (default 0.5), --index-path/-i.
  • zero index: positional models_dir; --output/-o, --pretty/--compact.

If you omit --labels, OpenMed falls back to the --domain defaults (or generic defaults). Passing explicit --labels is what makes it truly zero-shot.

Python API

The same flow in code via openmed.ner:

python
from openmed.ner import infer, NerRequest

request = NerRequest(
    model_id="gliner-biomedical",          # id from your index.json
    text="Started on insulin glargine via an insulin pump for type 1 diabetes.",
    labels=["Drug", "Device", "Disease"],  # your custom labels — no fine-tuning
    threshold=0.5,
)
response = infer(request, index_path="/models/gliner/index.json")

for ent in response.entities:
    print(f"{ent.label:8} {ent.text!r:30} {ent.score:.2f} [{ent.start}:{ent.end}]")

NerRequest fields: model_id, text, labels (None ⇒ domain/default labels), domain, threshold. infer(...) returns a NerResponse whose .entities are Entity objects with .text, .start, .end, .label, .score.

Build / load the index from Python too:

python
from openmed.ner import build_index, write_index, load_index, is_gliner_available

if is_gliner_available():
    index = build_index("/models/gliner")
    write_index(index, "/models/gliner/index.json")
    index = load_index("/models/gliner/index.json")

Helpful label utilities:

python
from openmed.ner import get_default_labels, available_domains
available_domains()              # domains with built-in label presets
get_default_labels("clinical")   # default labels for a domain hint
Show full SKILL.md (227 more words)Show less

Writing good labels

Zero-shot quality hinges on label phrasing. Prefer natural, specific noun phrases:

  • Good: ["Drug", "Medical Device", "Disease", "Symptom", "Procedure"]
  • Weak: ["X", "thing", "misc"]

Tune threshold to trade recall for precision. Start at 0.5 and raise it if you see spurious spans.

Hand-off to / from OpenMed

  • From loading-openmed-models: zero-shot uses local GLiNER checkpoints rather than the OpenMed registry; download them once, then point zero index at the directory.
  • To extracting-clinical-entities: once your label schema stabilises and a fine-tuned OpenMed model covers it, switch to openmed.analyze_text for higher accuracy and speed. The output shape (label + offsets + score) is parallel, so downstream code changes little.
  • To de-identification: run openmed.deidentify before zero-shot NER in a PHI workflow, then extract entities from the redacted text.

Edge cases & gotchas

  • zero infer needs an index. Run zero index <models_dir> first, or pass a valid --index-path; the --model-id must exist in that index.
  • zero deps doesn't install. It reports status only — install with pip install "openmed[gliner]".
  • GLiNER2 needs a recent gliner (≈0.3.0+) and a GLiNER2/Fastino checkpoint; openmed zero deps shows whether v2 is available.
  • Accuracy vs. flexibility. Zero-shot is for coverage of new/custom types, not for squeezing out maximum F1 on a standard schema.
  • Permissive licensing & local-first. Use permissively licensed GLiNER checkpoints; keep everything on-device and out of PHI logs.

Standards & references

© maziyarpanahi, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/running-zeroshot-ner of maziyarpanahi/openmed.

Open the folder on GitHubat commit 34d7b8c

Compare with similar skills

Running Zeroshot Ner next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Running Zeroshot Ner compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Running Zeroshot Ner this skillmaziyarpanahi/openmed5.5k—~1.7kAutomated safety check: PassApache-2.0
Hugging Face Transformers Usagedavila7/claude-code-templates33k11 repos~1.2kAutomated safety check: PassMIT
NLP Alignmentaiming-lab/AutoResearchClaw15k—~300Automated safety check: PassMIT
NLP Pretrainingaiming-lab/AutoResearchClaw15k—~280Automated safety check: PassMIT
Transformersynulihao/AgentSkillOS618—~2.9kAutomated safety check: PassNone
AI ML Skillswentorai/research-plugins2981 repos~993Automated safety check: PassMIT

Similar skills

  • Hugging Face Transformers Usage

    davila7/claude-code-templates

    Loads pre-trained Hugging Face Transformers models for text, vision and audio tasks, runs inference with pipelines and fine-tunes on custom datasets.

    33k GitHub starsUsed in 11 repos~1.2k tokens
    AI & LLM EngineeringAuto-check passed
  • NLP Alignment

    aiming-lab/AutoResearchClaw

    Best practices for LLM alignment techniques including RLHF, DPO, and instruction tuning.

    15k GitHub stars~300 tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • NLP Pretraining

    aiming-lab/AutoResearchClaw

    Best practices for language model pretraining and fine-tuning.

    15k GitHub stars~280 tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Transformers

    ynulihao/AgentSkillOS

    Work with state-of-the-art machine learning models for NLP, computer vision, audio, and multimodal tasks using HuggingFace Transformers.

    618 GitHub stars~2.9k tokensUpdated 7 mo ago
    AI & LLM EngineeringAuto-check passed
  • AI ML Skills

    wentorai/research-plugins

    27 ai & machine learning skills. An agent skill from wentorai/research-plugins.

    298 GitHub starsUsed in 1 repo~993 tokens
    AI & LLM EngineeringAuto-check passed
  • Transformers

    K-Dense-AI/scientific-agent-skills

    Hugging Face Transformers for loading Hub models, running pipeline inference, text generation, and Trainer fine-tuning on NLP, vision, audio, and multimodal tasks.

    48k GitHub starsUsed in 1 repo~2.8k tokens
    AI & LLM EngineeringAuto-check: notes

More from maziyarpanahi/openmed

All 74 skills in this repo
  • Checks OpenMed de-identified clinical text against the 18 HIPAA Safe Harbor identifier categories and reports gaps and residual re-identification risk.

    5.5k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • OpenMed Model Card Writer

    maziyarpanahi/openmed

    Fills in a model card for an OpenMed clinical NER or de-identification model from its evaluation reports: intended use, metrics, subgroups and limitations.

    5.5k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Walks a data pipeline against the HIPAA Privacy and Security Rule checklist and produces a gap report before it processes patient data.

    5.5k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • ICD-10 Coding Assistant

    maziyarpanahi/openmed

    Suggests candidate ICD-10-CM diagnosis and ICD-10-PCS procedure codes for clinical text extracted by OpenMed, with rationale for a certified coder to review.

    5.5k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • OpenMed ETL to OMOP CDM

    maziyarpanahi/openmed

    Maps OpenMed-extracted, terminology-coded conditions, drugs and measurements into OMOP CDM v5.4 tables for OHDSI and ATLAS analytics.

    5.5k GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Extracting SDOH and Z-Codes

    maziyarpanahi/openmed

    Finds social risks such as housing instability or food insecurity in clinical notes and proposes matching ICD-10-CM Z-codes for a coder to confirm.

    5.5k GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Questions about Running Zeroshot Ner

What does Running Zeroshot Ner do?

Extract arbitrary, custom entity types from clinical or biomedical text with no fine-tuning using OpenMed's GLiNER / GLiNER2 zero-shot support. Running Zeroshot Ner is an agent skill from maziyarpanahi/openmed. Extract arbitrary, custom entity types from clinical or biomedical text with no fine-tuning using OpenMed's GLiNER / GLiNER2 zero-shot support.

When should I use Running Zeroshot Ner?

Running Zeroshot Ner fits situations like: the user wants to define their own labels on the fly (e.g; tasks that involve Natural language processing; tasks that involve Fine-tuning.

How do I install Running Zeroshot Ner in Claude Code?

Run `npx skills add maziyarpanahi/openmed --skill running-zeroshot-ner -a claude-code`. Or copy the skill folder (skills/running-zeroshot-ner in maziyarpanahi/openmed) into .claude/skills/running-zeroshot-ner in your project. Claude Code loads it when a task matches its description.

How do I install Running Zeroshot Ner in Codex?

Run `npx skills add maziyarpanahi/openmed --skill running-zeroshot-ner -a codex`. Or copy the skill folder (skills/running-zeroshot-ner in maziyarpanahi/openmed) into .agents/skills/running-zeroshot-ner in your project. Codex loads it when a task matches its description.

Can I use Running Zeroshot Ner in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add maziyarpanahi/openmed --skill running-zeroshot-ner -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/running-zeroshot-ner, .gemini/skills/running-zeroshot-ner, .github/skills/running-zeroshot-ner and .opencode/skills/running-zeroshot-ner in your project.

What does Running Zeroshot Ner need to run?

Going by SKILL.md and its folder, Running Zeroshot Ner needs the command-line tools its instructions call (pip). Our summary lists: Python 3.

Does Running Zeroshot Ner access the network?

SKILL.md names 3 domains. As links in the text: github.com, arxiv.org and huggingface.co. This is read from the text; nothing was executed.

Is Running Zeroshot Ner safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Running Zeroshot Ner use?

Running Zeroshot Ner is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Running Zeroshot Ner use?

About 1.7k tokens (SKILL.md is roughly 6.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Running Zeroshot Ner?

Skills that share tags, products or a category with Running Zeroshot Ner: Hugging Face Transformers Usage (davila7/claude-code-templates, 33k stars), NLP Alignment (aiming-lab/AutoResearchClaw, 15k stars), NLP Pretraining (aiming-lab/AutoResearchClaw, 15k stars) and Transformers (ynulihao/AgentSkillOS, 618 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Running Zeroshot Ner?

maziyarpanahi (a GitHub user) maintains it in maziyarpanahi/openmed, which has 5,506 GitHub stars. The repository holds 74 skills in this directory. The repository was last updated on October 11, 2026.

Source: maziyarpanahi/openmed on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.