medical-unit-converter

Convert medical laboratory values between units (mg/dL to mmol/L, etc.) with formula transparency and clinical reference ranges. Supports glucose, cholesterol, creatinine, and hemoglobin conversions.

3,891 stars

Best use case

medical-unit-converter is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Convert medical laboratory values between units (mg/dL to mmol/L, etc.) with formula transparency and clinical reference ranges. Supports glucose, cholesterol, creatinine, and hemoglobin conversions.

Teams using medical-unit-converter 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

$curl -o ~/.claude/skills/medical-unit-converter/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/aipoch-ai/medical-unit-converter/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/medical-unit-converter/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How medical-unit-converter Compares

Feature / Agentmedical-unit-converterStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Convert medical laboratory values between units (mg/dL to mmol/L, etc.) with formula transparency and clinical reference ranges. Supports glucose, cholesterol, creatinine, and hemoglobin conversions.

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

SKILL.md Source

# Medical Unit Converter

Convert laboratory values between clinical units with formula transparency and reference range context. Supports glucose, cholesterol, creatinine, and hemoglobin.

## When to Use

- Converting glucose, cholesterol, creatinine, or hemoglobin lab values between unit systems
- Verifying unit conversions for clinical documentation or research
- Batch-converting lab result tables between mg/dL and mmol/L conventions
- Providing reference ranges alongside converted values

## Workflow

1. Confirm the user objective, required inputs, and non-negotiable constraints before doing detailed work.
2. Validate that the request matches the documented scope and stop early if the task would require unsupported assumptions.
3. Use the packaged script path or the documented reasoning path with only the inputs that are actually available.
4. Return a structured result that separates assumptions, deliverables, risks, and unresolved items.
5. If execution fails or inputs are incomplete, switch to the fallback path and state exactly what blocked full completion.

## Supported Conversions

| Analyte | From | To | Factor | Reference Range (target unit) |
|---------|------|----|--------|-------------------------------|
| Glucose | mg/dL | mmol/L | 0.0555 | 3.9–5.6 mmol/L (fasting) |
| Glucose | mmol/L | mg/dL | 18.018 | 70–100 mg/dL (fasting) |
| Cholesterol | mg/dL | mmol/L | 0.02586 | < 5.2 mmol/L (desirable) |
| Cholesterol | mmol/L | mg/dL | 38.67 | < 200 mg/dL (desirable) |
| Creatinine | mg/dL | μmol/L | 88.4 | 62–115 μmol/L (male) |
| Creatinine | μmol/L | mg/dL | 0.01131 | 0.7–1.3 mg/dL (male) |
| Hemoglobin | g/dL | g/L | 10 | 130–175 g/L (male) |
| Hemoglobin | g/L | g/dL | 0.1 | 13–17.5 g/dL (male) |

## Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `--value`, `-v` | float | Yes | Numeric value to convert |
| `--from-unit` | str | Yes | Source unit (e.g., `mg_dl`, `mmol_l`, `umol_l`, `g_dl`, `g_l`) |
| `--to-unit` | str | Yes | Target unit |
| `--analyte`, `-a` | str | No | Analyte name for reference range lookup (e.g., `glucose`, `cholesterol`, `creatinine`, `hemoglobin`) |

## Output Format

```json
{
  "converted_value": 5.55,
  "formula": "100 × 0.0555",
  "from_unit": "mg_dl",
  "to_unit": "mmol_l",
  "analyte": "glucose",
  "reference_range": "3.9–5.6 mmol/L (fasting glucose)"
}
```

## Quick Check

```bash
python -m py_compile scripts/main.py
python scripts/main.py --value 100 --from-unit mg_dl --to-unit mmol_l --analyte glucose
```

## Implementation Notes (for script developer)

The script must:

1. **Parse CLI args** — use argparse with `--value`, `--from-unit`, `--to-unit`, `--analyte`. Pass parsed args to `conv.convert()`. Do not hardcode demo values in `main()`.
2. **CONVERSIONS dict** — include all 8 conversion pairs above, each with `factor` and `reference_range` fields. Keys must be `(analyte, from_unit, to_unit)` tuples or equivalent nested structure.
3. **convert() method** — return a dict with `converted_value`, `formula`, `from_unit`, `to_unit`, `analyte`, `reference_range`.
4. **Unsupported pair** — if the unit pair is not in CONVERSIONS, print the supported conversions list and exit with code 1.
5. **Fallback Partial result** — when an unsupported unit pair is requested, always populate the `Partial result` field in the Fallback Template with: `"Manual formula not available for this unit pair"`.

## Input Validation

This skill accepts: numeric laboratory values with a source unit and target unit for conversion between recognized clinical measurement systems.

If the request does not involve converting a specific numeric lab value between units — for example, asking to interpret clinical results, diagnose conditions, or convert non-laboratory quantities — do not proceed. Instead respond:

> "medical-unit-converter is designed to convert medical laboratory values between unit systems. Your request appears to be outside this scope. Please provide a numeric value with source and target units, or use a more appropriate tool for your task."

## Error Handling

- If `--value`, `--from-unit`, or `--to-unit` is missing, state exactly which fields are missing and request only those.
- If the unit pair is not supported, list the supported conversions and stop.
- If `--value` is not a valid number, reject with: `Error: --value must be a numeric value.`
- If the task goes outside the documented scope, stop instead of guessing or silently widening the assignment.
- If `scripts/main.py` fails, report the failure point and provide the manual conversion formula as fallback.
- Do not fabricate conversion factors or reference ranges.

## Fallback Template

When execution fails or inputs are incomplete, respond with this structure:

```
FALLBACK REPORT
───────────────────────────────────────
Objective      : [restate the conversion goal]
Blocked by     : [exact missing input or error]
Partial result : [manual formula if conversion factor is known; "Manual formula not available for this unit pair" if unsupported]
Next step      : [minimum action needed to unblock]
───────────────────────────────────────
```

## Response Template

1. Objective
2. Inputs Received
3. Assumptions
4. Workflow
5. Deliverable
6. Risks and Limits
7. Next Checks

## Prerequisites

No additional Python packages required beyond the standard library.

Related Skills

Medical Billing & Revenue Cycle Management

3891
from openclaw/skills

Analyze medical billing workflows, identify revenue leaks, optimize claim submissions, and reduce denial rates. Built for healthcare practices, billing companies, and revenue cycle teams.

afrexai-community-growth-engine

3891
from openclaw/skills

Complete community building, engagement, and monetization system. From zero to thriving community — launch strategy, member engagement loops, content programming, moderation frameworks, growth tactics, monetization models, and health metrics. Works for Discord, Slack, Telegram, Circle, forums, or any platform.

Workflow & Productivity

archtree-community-operator-en

3891
from openclaw/skills

Use this skill for Archtree community operations inside a live instance, including browsing channels, reading posts, posting, replying, liking/unliking, reviewing your own activity, editing or deleting your own content, community patrol, and limited proactive participation after authorization. Trigger it when the user mentions Archtree, archtree.cn, the community, channels, posts, community activity, or asks to check recent discussions, find questions worth replying to, post, reply, like, review what they posted, edit a post, delete a reply, patrol the community, or summarize recent activity. Route website login, token setup, page confirmation, account confirmation, and MCP-based reads and writes correctly. Do not use it for Archtree development, deployment, debugging, infrastructure work, or modifying the codebase, frontend, MCP service, or APIs.

archtree-community-operator-cn

3891
from openclaw/skills

在 Archtree 社区实例内执行社区浏览、频道查看、帖子阅读、发帖、回帖、点赞/取消点赞、查看自己内容、编辑或删除自己内容、社区巡查和轻量社区运营动作时使用本 skill。只要用户明确提到 Archtree、archtree.cn、社区、频道、帖子、社区动态,或表达“去社区看看最近在聊什么”“帮我找值得回复的问题”“帮我在社区发帖 / 回帖 / 点赞”“帮我看看我发过什么”“帮我改一下这条帖子”“帮我删掉这条回复”“帮我巡查社区”“看看 Archtree 最近有什么值得参与的话题”“帮我总结社区最近动态”这类意图,就应优先使用本 skill,即使用户没有明确说出“MCP”或“skill”。本 skill 负责在网站登录 / token 准备 / 页面确认、账号确认与 MCP 社区读写之间做正确路由,并在获得授权后进行有限度的主动参与。不要用于开发、部署、排障、调试、修复或修改 Archtree 本身的代码、前端页面、MCP 服务、接口实现或其他基础设施问题。

lobster-community-xiaomo

3891
from openclaw/skills

🦞 Lobster Community / 龙虾社区 - 专属于AI Agent的私密交流平台!支持完整对话thread、评论通知机制。Agent通过API注册、发帖、评论,其他龙虾回复后自动通知。装上这个skill,你就是龙虾社区的一员!

biomedical-paper

3891
from openclaw/skills

AI-powered biomedical manuscript generation with docx output. Activates when user provides Chinese draft/outline and requests full English research paper. Includes: Abstract, Introduction, Methods, Results, Discussion, References. Specialized for: GBD epidemiology, cohort studies (CHARLS/NHANES), cross-sectional mediation analyses, pharmacovigilance (FAERS). Also supports: Chinese graduate/doctoral thesis (学位论文) formatting. Features: python-docx generation, Vancouver numbered references, journal-specific formatting. Confidence: High (validated workflow with 30+ successful papers)

Bank Statement Converter Skill

3891
from openclaw/skills

Convert PDF bank statements to CSV/JSON.

opportunity-scout

3891
from openclaw/skills

Find profitable business opportunities in any niche by scanning Twitter, web, Reddit, and Product Hunt for unmet needs and pain points. Scores each opportunity on Demand, Competition, Feasibility, and Monetization (1-5 each, max 20). Generates a ranked report with actionable recommendations. Use when asked to find business ideas, market gaps, product opportunities, or "what should I build" questions. Also triggers on: market research, niche analysis, opportunity hunting, trend scouting, competitive analysis for new products.

units

3891
from openclaw/skills

Perform unit conversions and calculations using GNU Units.

exunit-code-review

3891
from openclaw/skills

Reviews ExUnit test code for proper patterns, boundary mocking with Mox, and test adapter usage. Use when reviewing _test.exs files or test helper configurations.

tcm-biomedical-research-strategist

3891
from openclaw/skills

Designs complete, rigorous research plans for medicinal plant / TCM molecular mechanism studies against diseases (colorectal cancer, liver cancer, diabetes, etc.). Use whenever a user provides a broad herbal medicine or network pharmacology research direction and wants it translated into a structured, executable, methodologically defensible study plan. Triggers: "research plan for herbal medicine", "network pharmacology study design", "TCM against cancer", "compound-target-pathway analysis", "hub gene identification", "immune microenvironment + natural products", "molecular docking study design", or any bioinformatics-driven pharmacology study from scratch. Always use this skill — do not improvise — when the user wants a full study framework.

medical-translation

3891
from openclaw/skills

Use medical translation for academic writing workflows that need structured execution, explicit assumptions, and clear output boundaries.