ehr-semantic-compressor
AI-powered EHR summarization using Transformer architecture to extract key clinical information from lengthy medical records
Best use case
ehr-semantic-compressor is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
AI-powered EHR summarization using Transformer architecture to extract key clinical information from lengthy medical records
Teams using ehr-semantic-compressor should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ehr-semantic-compressor/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ehr-semantic-compressor Compares
| Feature / Agent | ehr-semantic-compressor | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
AI-powered EHR summarization using Transformer architecture to extract key clinical information from lengthy medical records
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
AI Agents for Startups
Explore AI agent skills for startup validation, product research, growth experiments, documentation, and fast execution with small teams.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
SKILL.md Source
# EHR Semantic Compressor
## Overview
AI-powered EHR summarization using Transformer architecture to extract key clinical information from lengthy medical records. This skill processes lengthy Electronic Health Record (EHR) documents and generates structured, clinically accurate summaries.
**Technical Difficulty**: High
## When to Use
- Input contains lengthy EHR documents (1600+ words) requiring summarization
- Clinical records need structured extraction of key information
- Quick review of patient history, medications, allergies, or diagnoses is needed
- Medical documentation requires compression while maintaining accuracy
## Core Features
1. **Fast Processing**: Process lengthy EHR documents (1600+ words) in 10-20 seconds
2. **Structured Summaries**: Generate bullet-point summaries (200-300 words)
3. **Critical Information Extraction**:
- Patient allergies and adverse reactions
- Family medical history
- Current and past medications
- Diagnoses and conditions
- Vital signs and lab results
- Procedures and surgeries
4. **Clinical Accuracy**: Maintains completeness of medical information
## Usage
### Basic Usage
```bash
python scripts/main.py --input ehr_document.txt --output summary.json
```
### Input Format
```json
{
"ehr_text": "Full EHR document text...",
"max_length": 300,
"extract_sections": ["allergies", "medications", "diagnoses", "family_history"]
}
```
### Output Format
```json
{
"status": "success",
"data": {
"summary": "Structured bullet-point summary...",
"extracted_sections": {
"allergies": [...],
"medications": [...],
"diagnoses": [...],
"family_history": [...]
},
"metadata": {
"original_length": 2500,
"summary_length": 280,
"compression_ratio": 0.89
}
}
}
```
## Parameters
| Parameter | Type | Default | Required | Description |
|-----------|------|---------|----------|-------------|
| `--input`, `-i` | string | - | Yes | Input EHR document text file path |
| `--output`, `-o` | string | - | No | Output JSON file path |
| `--max-length` | int | 300 | No | Maximum summary length in words |
| `--extract-sections` | string | all | No | Comma-separated sections to extract |
| `--format` | string | json | No | Output format (json, markdown, text) |
## Technical Details
### Architecture
- **Base Model**: Transformer-based encoder-decoder architecture
- **Medical Domain Adaptation**: Fine-tuned on clinical text corpora
- **Section Extraction**: Rule-based + ML hybrid approach for structured data
- **Processing Pipeline**: Text segmentation -> Summarization -> Section extraction -> Output formatting
### Dependencies
See `references/requirements.txt` for complete list.
Key dependencies:
- transformers >= 4.30.0
- torch >= 2.0.0
- spacy >= 3.6.0
- scispacy >= 0.5.3
### Performance
- **Processing Time**: 10-20 seconds for 1600+ word documents
- **Memory**: Requires ~2GB RAM
- **Output Length**: 200-300 words (configurable)
- **Compression Ratio**: ~85-90%
## References
- `references/requirements.txt` - Python dependencies
- `references/guidelines.md` - Clinical summarization guidelines
- `references/sample_input.json` - Example input format
- `references/sample_output.json` - Example output format
## Safety & Compliance
- No external API calls or service dependencies
- All processing performed locally
- No patient data transmitted outside the system
- Error messages are semantic and do not expose technical details
## Testing
Run unit tests:
```bash
cd scripts
python test_main.py
```
## Error Handling
All errors return semantic messages:
```json
{
"status": "error",
"error": {
"type": "input_validation_error",
"message": "EHR text is empty or too short",
"suggestion": "Provide EHR text with at least 100 words"
}
}
```
## Risk Assessment
| Risk Indicator | Assessment | Level |
|----------------|------------|-------|
| Code Execution | Python/R scripts executed locally | Medium |
| Network Access | No external API calls | Low |
| File System Access | Read input files, write output files | Medium |
| Instruction Tampering | Standard prompt guidelines | Low |
| Data Exposure | Output files saved to workspace | Low |
## Security Checklist
- [ ] No hardcoded credentials or API keys
- [ ] No unauthorized file system access (../)
- [ ] Output does not expose sensitive information
- [ ] Prompt injection protections in place
- [ ] Input file paths validated (no ../ traversal)
- [ ] Output directory restricted to workspace
- [ ] Script execution in sandboxed environment
- [ ] Error messages sanitized (no stack traces exposed)
- [ ] Dependencies audited
## Prerequisites
```bash
# Python dependencies
pip install -r requirements.txt
```
## Evaluation Criteria
### Success Metrics
- [ ] Successfully executes main functionality
- [ ] Output meets quality standards
- [ ] Handles edge cases gracefully
- [ ] Performance is acceptable
### Test Cases
1. **Basic Functionality**: Standard input → Expected output
2. **Edge Case**: Invalid input → Graceful error handling
3. **Performance**: Large dataset → Acceptable processing time
## Lifecycle Status
- **Current Stage**: Draft
- **Next Review Date**: 2026-03-06
- **Known Issues**: None
- **Planned Improvements**:
- Performance optimization
- Additional feature supportRelated Skills
---
name: article-factory-wechat
humanizer
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.
find-skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
tavily-search
Use Tavily API for real-time web search and content extraction. Use when: user needs real-time web search results, research, or current information from the web. Requires Tavily API key.
baidu-search
Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.
agent-autonomy-kit
Stop waiting for prompts. Keep working.
Meeting Prep
Never walk into a meeting unprepared again. Your agent researches all attendees before calendar events—pulling LinkedIn profiles, recent company news, mutual connections, and conversation starters. Generates a briefing doc with talking points, icebreakers, and context so you show up informed and confident. Triggered automatically before meetings or on-demand. Configure research depth, advance timing, and output format. Walking into meetings blind is amateur hour—missed connections, generic small talk, zero leverage. Use when setting up meeting intelligence, researching specific attendees, generating pre-meeting briefs, or automating your prep workflow.
self-improvement
Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks.
botlearn-healthcheck
botlearn-healthcheck — BotLearn autonomous health inspector for OpenClaw instances across 5 domains (hardware, config, security, skills, autonomy); triggers on system check, health report, diagnostics, or scheduled heartbeat inspection.
linkedin-cli
A bird-like LinkedIn CLI for searching profiles, checking messages, and summarizing your feed using session cookies.
notebooklm
Google NotebookLM 非官方 Python API 的 OpenClaw Skill。支持内容生成(播客、视频、幻灯片、测验、思维导图等)、文档管理和研究自动化。当用户需要使用 NotebookLM 生成音频概述、视频、学习材料或管理知识库时触发。
小红书长图文发布 Skill
## 概述