Other
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.
90100Total Score
Core Capability
91 / 100
Functional Suitability
12 / 12
Reliability
11 / 12
Performance & Context
8 / 8
Agent Usability
15 / 16
Human Usability
7 / 8
Security
12 / 12
Maintainability
12 / 12
Agent-Specific
14 / 20
Medical Task
15 / 16 Passed
92Convert glucose 100 mg/dL to mmol/L
4/4
92Convert creatinine 1.2 mg/dL to umol/L
4/4
90Convert hemoglobin 15 g/dL to mmol/L
4/4
86Unsupported unit pair (TSH miu_l to uiu_ml)
3/4
Veto GatesRequired pass for any deployment consideration
Skill Veto✓ All 4 gates passed
✓
Operational Stability
System remains stable across varied inputs and edge cases
PASS✓
Structural Consistency
Output structure conforms to expected skill contract format
PASS✓
Result Determinism
Equivalent inputs produce semantically equivalent outputs
PASS✓
System Security
No prompt injection, data leakage, or unsafe tool use detected
PASSCore Capability91 / 100 — 8 Categories
Functional Suitability
Complete CONVERSIONS dict with 16 entries covering 8 analytes (glucose, cholesterol, creatinine, hemoglobin, triglycerides, urea, calcium, sodium, potassium); argparse fully implemented; JSON output with all required fields.
12 / 12
100%
Reliability
Unsupported pair exits with code 1 and lists supported analytes; unit normalisation handles /, space, and - separators; all 16 conversion pairs tested and correct. Minor: no --value non-numeric validation (argparse type=float handles it but error message is generic).
11 / 12
92%
Performance & Context
Zero external dependencies; 168-line script; extremely lean and fast.
8 / 8
100%
Agent Usability
Workflow clear; response template defined; argparse fully implemented; JSON output format matches SKILL.md spec; Fallback Template present. Minor: SKILL.md documents 8 pairs but script implements 16 (8 additional analytes not in SKILL.md table).
15 / 16
94%
Human Usability
Description lists 4 analytes but script supports 9; discoverability gap for triglycerides, urea, calcium, sodium, potassium.
7 / 8
88%
Security
No hardcoded secrets; no injection vectors; no external data access; pure computation.
12 / 12
100%
Maintainability
CONVERSIONS dict is clean and extensible; normalise_unit() handles common unit format variations; convert() is pure and testable.
12 / 12
100%
Agent-Specific
Trigger precision good; escape hatches documented; argparse fully implemented; JSON output is machine-readable. Deduction: SKILL.md Supported Conversions table only documents 8 pairs but script has 16; output field names differ (output_value vs converted_value, input_value vs value).
14 / 20
70%
Core Capability Total91 / 100
Medical TaskExecution Average: 90 / 100 — Assertions: 15/16 Passed
92
Canonical
Convert glucose 100 mg/dL to mmol/L
4/4 ✓
92
Variant A
Convert creatinine 1.2 mg/dL to umol/L
4/4 ✓
90
Variant B
Convert hemoglobin 15 g/dL to mmol/L
4/4 ✓
86
Edge
Unsupported unit pair (TSH miu_l to uiu_ml)
3/4 ✓
92
Canonical✅ Pass
Convert glucose 100 mg/dL to mmol/L
Script runs with argparse, produces correct JSON output. Conversion factor 1/18.02 = 0.05549; 100 * 0.05549 = 5.5494 mmol/L. Reference range included.
Basic 38/40|Specialized 54/60|Total 92/100
✅A1Script parses --value, --from-unit, --to-unit, --analyte from CLI
✅A2Output JSON includes converted value, formula fields, and reference range
✅A3Conversion factor is correct (1/18.02 for glucose mg/dL to mmol/L)
✅A4Output does not fabricate conversion factors
Pass rate: 4 / 4
92
Variant A✅ Pass
Convert creatinine 1.2 mg/dL to umol/L
Creatinine conversion now fully implemented. Factor 88.42; 1.2 * 88.42 = 106.104 umol/L. Sex-specific reference ranges included.
Basic 38/40|Specialized 54/60|Total 92/100
✅A1Creatinine mg/dL to umol/L conversion is implemented with correct factor (88.4)
✅A2Output includes sex-specific reference ranges for creatinine
✅A3Output includes formula transparency
✅A4Cholesterol and hemoglobin conversions also implemented
Pass rate: 4 / 4
90
Variant B✅ Pass
Convert hemoglobin 15 g/dL to mmol/L
Hemoglobin g/dL to mmol/L conversion implemented. Factor 1/1.611; 15/1.611 = 9.311 mmol/L. Sex-specific reference ranges included.
Basic 37/40|Specialized 53/60|Total 90/100
✅A1Hemoglobin g/dL to mmol/L conversion is implemented
✅A2Output includes sex-specific reference ranges for hemoglobin
✅A3Unit normalisation handles mg/dL input format (with slash)
✅A4Output does not fabricate conversion factors
Pass rate: 4 / 4
86
Edge✅ Pass
Unsupported unit pair (TSH miu_l to uiu_ml)
Unsupported pair correctly exits with code 1 and lists all 9 supported analytes.
Basic 36/40|Specialized 50/60|Total 86/100
✅A1Unsupported unit pair triggers clear error message with exit code 1
✅A2Error message lists all supported analytes
✅A3Script does not fabricate a conversion factor for unsupported pairs
❌A4SKILL.md Supported Conversions table matches all implemented analytes
Pass rate: 3 / 4
Medical Task Total90 / 100
Key Strengths
- Complete CONVERSIONS dict with 16 entries covering 9 analytes — all previously missing conversions (creatinine, cholesterol, hemoglobin, triglycerides, urea, calcium, sodium, potassium) are now implemented
- argparse fully implemented with --value, --from-unit, --to-unit, --analyte; no hardcoded demo values in main()
- Zero external dependencies makes the skill maximally portable across any Python environment
- Unit normalisation handles common format variations (mg/dL, mg_dl, mg-dl) transparently