clinical-text-summarization — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited clinical-text-summarization (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Clinicians and analysts drown in text. This skill condenses long clinical documents into faithful, structured summaries. Because hallucination is unacceptable in healthcare, the skill pairs generation with an explicit faithfulness check that verifies summary claims against the source.
pubmed-search).embedding-centroid selection). Zero hallucination risk because every sentence is verbatim; best when faithfulness dominates.
variants like Longformer-Encoder-Decoder for >1k tokens; clinical-tuned models where licensing allows).
grounding reduces hallucination).
(map-reduce / refine), preserving section structure.
from transformers import pipeline
summ = pipeline("summarization", model="facebook/bart-large-cnn")
def summarize_long(text, chunk=900):
words = text.split()
parts = [" ".join(words[i:i+chunk]) for i in range(0, len(words), chunk)]
partials = [summ(p, max_length=130, min_length=30)[0]["summary_text"] for p in parts]
return summ(" ".join(partials), max_length=160, min_length=40)[0]["summary_text"]# Faithfulness guard: every summary entity must appear in the source
import medspacy
nlp = medspacy.load()
def unsupported_entities(summary, source):
src = {e.text.lower() for e in nlp(source).ents}
return [e.text for e in nlp(summary).ents if e.text.lower() not in src]
# non-empty list => possible hallucination => fall back to extractiveReport ROUGE and BERTScore for overlap with reference summaries, but treat them as necessary-not-sufficient they do not detect hallucination. Add a faithfulness/factual- consistency metric (entity-overlap above, or an NLI/QA-based check) and a clinician spot- review for high-stakes use. Prefer the extractive path whenever a hallucinated fact would be dangerous.
summaries.parquet doc_id, summary, method, ROUGE/BERTScore, faithfulness flag.flagged_summaries.csv summaries with unsupported claims for review.summary_report.md method comparison and quality metrics.Designed for the long, repetitive, template-heavy nature of clinical notes. De-identify PHI first. The faithfulness guard reflects the clinical-safety bar: a fluent-but-wrong summary is worse than a plain extractive one. Complements clinical-nlp-entity-extraction and clinical-text-search-elk.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.