[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BV1QADTGSK0ZPX67FT0GSS":3,"skill-same:01M7BV1QADTGSK0ZPX67FT0GSS":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7BV1QADTGSK0ZPX67FT0GSS","lab-unit-harmonization",null,"Harmonize multi-source clinical lab data to US conventional units by (1) strict completeness filtering, (2) robust numeric parsing (scientific notation + comma decimals), (3) per-feature unit conversion using tight physiological ranges plus “best-candidate” selection (not by widening ranges), and (4) fixed `X.XX` formatting with correct validation (don’t confuse CSV delimiters with decimal commas).","linyouxue\u002Fskill-repair-benchmark","linyouxue","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F216151464?v=4","01M7BJEVCXKD74KH6FG9CBVSQB","林宥学","01M7BJEVE02NP217V93BKZFC0J",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FMMG2Skill-GPT52-Gold31-20260923\u002Ftasks\u002Flab-unit-harmonization\u002Frepaired_skill\u002Flab-unit-harmonization\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: lab-unit-harmonization\ndescription: Harmonize multi-source clinical lab data to US conventional units by\n  (1) strict completeness filtering, (2) robust numeric parsing (scientific notation\n  + comma decimals), (3) per-feature unit conversion using tight physiological ranges\n  plus “best-candidate” selection (not by widening ranges), and (4) fixed `X.XX` formatting\n  with correct validation (don’t confuse CSV delimiters with decimal commas).\n---\n\n## Steps\n1. **Load inputs and identify numeric lab columns**\n   1. Read `\u002Froot\u002Fenvironment\u002Fdata\u002Fckd_lab_data.csv` and `\u002Froot\u002Fenvironment\u002Fdata\u002Fckd_feature_descriptions.csv`.\n   2. Treat all columns except the patient identifier column (if present) as lab features; keep the same column order for output.\n   3. Inspect per-column missingness and rough distributions (min\u002Fmax, quantiles) to spot likely mixed-unit analytes before converting.\n2. **Parse raw numeric strings into floats (before dropping rows)**\n   1. Normalize strings: strip whitespace; map `''`, `'nan'`, `'none'`, `'null'` to missing.\n   2. Convert scientific notation via `float(s)` when it contains `e`\u002F`E`.\n   3. Fix comma\u002Fperiod issues with a **disambiguation rule**:\n      - If a token contains **both** `,` and `.` (e.g., `1,234.5`), treat `,` as a thousands separator → remove commas.\n      - Else if it contains `,` only (e.g., `12,34`), treat `,` as decimal separator → replace with `.`.\n   4. Coerce failures to `NaN`.\n3. **Drop incomplete records (strict)**\n   1. After parsing, drop any row with **any** missing value in lab feature columns (`NaN`).\n   2. Reset index.\n4. **Unit harmonization with tight ranges + best-candidate selection (do not “fix” by widening ranges)**\n   1. Define **US-conventional physiological ranges** per feature (min\u002Fmax) and **candidate conversions** (multiplicative factors) for common SI\u002Falt units (examples that must be covered because they commonly appear mixed in CKD lab exports):\n      - Serum creatinine: µmol\u002FL → mg\u002FdL (× 0.0113)\n      - BUN: mmol\u002FL → mg\u002FdL (× 2.801)\n      - Hemoglobin: g\u002FL → g\u002FdL (× 0.1)\n      - Calcium: mmol\u002FL → mg\u002FdL (× 4.0)\n      - Phosphate: mmol\u002FL → mg\u002FdL (× 3.096)\n      - Magnesium: mmol\u002FL → mg\u002FdL (× 2.43); **also** mg\u002FL → mg\u002FdL (× 0.1) to handle “7–9”-type magnitudes without expanding the acceptable mg\u002FdL range\n      - (Add other analytes as needed using the same pattern; keep ranges clinically tight rather than permissive.)\n   2. For each column, compute a robust **target center** from already-in-range values (median of values within `[min,max]` after parsing). If none are in-range, use the midpoint `(min+max)\u002F2`.\n   3. For each value `v` in the column, evaluate candidates:\n      - Candidate set includes “no conversion” (`v`) plus all `v*factor` conversions for that feature.\n      - **Select the candidate that lands inside `[min,max]` and is closest to the column target center** (minimize `abs(candidate - center)`).\n      - If **no** candidate falls inside range, set to `NaN` (do not silently keep out-of-range values).\n   4. After converting all columns, drop any row that now has `NaN` (these are records that cannot be confidently harmonized to in-range US units).\n5. **Round and format output as exact `X.XX` strings**\n   1. Round numeric values to 2 decimals.\n   2. Format every lab value with fixed 2-decimal string formatting: `f\"{x:.2f}\"` (no scientific notation).\n   3. Save to `\u002Froot\u002Fckd_lab_data_harmonized.csv` with `index=False`, preserving the **same columns and order** as input.\n6. **Correct validation checks (avoid the CSV-comma mistake)**\n   1. Do **not** assert “no commas anywhere in the file” (CSV delimiters are commas).\n   2. Instead validate at the **cell level**:\n      - No cell contains `','` (decimal comma) because values are formatted with `.`.\n      - No cell contains `'e'`\u002F`'E'` (scientific notation).\n      - Every numeric cell matches regex `^-?\\d+\\.\\d{2}$`.\n      - Every numeric value lies within its configured physiological range.\n## Expected Result\nA CSV saved at `\u002Froot\u002Fckd_lab_data_harmonized.csv` with the **same columns as the raw input**, only **complete patient rows**, all lab values converted to **US conventional units**, all values **within tight physiological ranges**, and every numeric value formatted exactly as `X.XX` (no scientific notation, no decimal commas, no inconsistent decimals).\n","## Steps\n1. **Load inputs and identify numeric lab columns**\n   1. Read `\u002Froot\u002Fenvironment\u002Fdata\u002Fckd_lab_data.csv` and `\u002Froot\u002Fenvironment\u002Fdata\u002Fckd_feature_descriptions.csv`.\n   2. Treat all columns except the patient identifier column (if present) as lab features; keep the same column order for output.\n   3. Inspect per-column missingness and rough distributions (min\u002Fmax, quantiles) to spot likely mixed-unit analytes before converting.\n2. **Parse raw numeric strings into floats (before dropping rows)**\n   1. Normalize strings: strip whitespace; map `''`, `'nan'`, `'none'`, `'null'` to missing.\n   2. Convert scientific notation via `float(s)` when it contains `e`\u002F`E`.\n   3. Fix comma\u002Fperiod issues with a **disambiguation rule**:\n      - If a token contains **both** `,` and `.` (e.g., `1,234.5`), treat `,` as a thousands separator → remove commas.\n      - Else if it contains `,` only (e.g., `12,34`), treat `,` as decimal separator → replace with `.`.\n   4. Coerce failures to `NaN`.\n3. **Drop incomplete records (strict)**\n   1. After parsing, drop any row with **any** missing value in lab feature columns (`NaN`).\n   2. Reset index.\n4. **Unit harmonization with tight ranges + best-candidate selection (do not “fix” by widening ranges)**\n   1. Define **US-conventional physiological ranges** per feature (min\u002Fmax) and **candidate conversions** (multiplicative factors) for common SI\u002Falt units (examples that must be covered because they commonly appear mixed in CKD lab exports):\n      - Serum creatinine: µmol\u002FL → mg\u002FdL (× 0.0113)\n      - BUN: mmol\u002FL → mg\u002FdL (× 2.801)\n      - Hemoglobin: g\u002FL → g\u002FdL (× 0.1)\n      - Calcium: mmol\u002FL → mg\u002FdL (× 4.0)\n      - Phosphate: mmol\u002FL → mg\u002FdL (× 3.096)\n      - Magnesium: mmol\u002FL → mg\u002FdL (× 2.43); **also** mg\u002FL → mg\u002FdL (× 0.1) to handle “7–9”-type magnitudes without expanding the acceptable mg\u002FdL range\n      - (Add other analytes as needed using the same pattern; keep ranges clinically tight rather than permissive.)\n   2. For each column, compute a robust **target center** from already-in-range values (median of values within `[min,max]` after parsing). If none are in-range, use the midpoint `(min+max)\u002F2`.\n   3. For each value `v` in the column, evaluate candidates:\n      - Candidate set includes “no conversion” (`v`) plus all `v*factor` conversions for that feature.\n      - **Select the candidate that lands inside `[min,max]` and is closest to the column target center** (minimize `abs(candidate - center)`).\n      - If **no** candidate falls inside range, set to `NaN` (do not silently keep out-of-range values).\n   4. After converting all columns, drop any row that now has `NaN` (these are records that cannot be confidently harmonized to in-range US units).\n5. **Round and format output as exact `X.XX` strings**\n   1. Round numeric values to 2 decimals.\n   2. Format every lab value with fixed 2-decimal string formatting: `f\"{x:.2f}\"` (no scientific notation).\n   3. Save to `\u002Froot\u002Fckd_lab_data_harmonized.csv` with `index=False`, preserving the **same columns and order** as input.\n6. **Correct validation checks (avoid the CSV-comma mistake)**\n   1. Do **not** assert “no commas anywhere in the file” (CSV delimiters are commas).\n   2. Instead validate at the **cell level**:\n      - No cell contains `','` (decimal comma) because values are formatted with `.`.\n      - No cell contains `'e'`\u002F`'E'` (scientific notation).\n      - Every numeric cell matches regex `^-?\\d+\\.\\d{2}$`.\n      - Every numeric value lies within its configured physiological range.\n## Expected Result\nA CSV saved at `\u002Froot\u002Fckd_lab_data_harmonized.csv` with the **same columns as the raw input**, only **complete patient rows**, all lab values converted to **US conventional units**, all values **within tight physiological ranges**, and every numeric value formatted exactly as `X.XX` (no scientific notation, no decimal commas, no inconsistent decimals).\n",{"name":5,"description":7},"main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","evaluation\u002Fresults\u002FMMG2Skill-GPT52-Gold31-20260923\u002Ftasks\u002Flab-unit-harmonization\u002Frepaired_skill\u002Flab-unit-harmonization",1,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark","https:\u002F\u002Fgithub.com\u002Flinyouxue","2026-11-14 20:28:35",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add linyouxue\u002Fskill-repair-benchmark --skill lab-unit-harmonization",{"tool":37,"command":38},"bunx","bunx skills add linyouxue\u002Fskill-repair-benchmark --skill lab-unit-harmonization",{"tool":40,"command":41},"pnpm","pnpm dlx skills add linyouxue\u002Fskill-repair-benchmark --skill lab-unit-harmonization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FMMG2Skill-GPT52-Gold31-20260923\u002Ftasks\u002Flab-unit-harmonization\u002Frepaired_skill\u002Flab-unit-harmonization\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"reference\u002Fckd_lab_features.md","REFERENCE","参考文档",12949,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FMMG2Skill-GPT52-Gold31-20260923\u002Ftasks\u002Flab-unit-harmonization\u002Frepaired_skill\u002Flab-unit-harmonization\u002Freference\u002Fckd_lab_features.md",[52,59,66,73,78,83],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7E1HGVRY73NBJ022CJG13X6","video-frame-extraction","Extract frames from video files and save them as images using OpenCV","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7E1HAG5R7CJ9C8NYJS771MB","openai-vision","Analyze images and multi-frame sequences using OpenAI GPT vision models","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7E1H7DADKB6QBWKC2KQ63SZ","image-ocr","Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[],{"skillNo":74,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7E1H0WBNT43TENGQY7AVZHD","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":79,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7E1GTC7D4N4Q2EF03875J9E","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":84,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7E1GQ92CWFMGH53KSSE4WER","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[]]