CommunitySchreiben & Editierengithub.com

shuangying0001-beep/unit-converter

电商/物流规格单位换算(kg·cm·V·W):把5kg 30cm这类带单位文本解析换算成标准单位。适合电商运营、物流报价、BOM 整理。

Was ist unit-converter?

unit-converter is a Claude Code agent skill that 电商/物流规格单位换算(kg·cm·V·W):把5kg 30cm这类带单位文本解析换算成标准单位。适合电商运营、物流报价、BOM 整理。.

Funktioniert mit~Claude Code~Codex CLI~Cursor
npx skills add shuangying0001-beep/unit-converter

Installed? Explore more Schreiben & Editieren skills: steipete/notion, affaan-m/seo, affaan-m/brand-voice · View all 6 →

In Ihrer bevorzugten KI fragen

Öffnet einen neuen Chat, in dem dieser Agent-Skill bereits geladen ist.

Dokumentation

unit-converter —— 单位换算 / 规格参数结构化

把带单位的文本数值解析成统一标准单位的数值。纯函数(Node ESM,零依赖),可直接 import。 抽取自 caijiqi-kaifa/electron/collector/content-parser.ts 中的 parseWeightToKg / parseDimensionsToCm,并扩展电压/功率/色温/流明。

适用场景

  • 亚马逊 / 电商平台抓到的重量、尺寸是 pounds / inches / oz,要统一成 kg / cm
  • 商品规格文本(如 Weight: 2.5 kgDimensions: 10 x 8 x 2 inchesVoltage: 120V)要结构化落库
  • 物流按重量计费、供应链按尺寸建库前的单位归一

用法

import { parseWeightToKg, parseDimensionsToCm, parseVoltageToV, parseSpec } from './scripts/unit-converter.mjs';

parseWeightToKg('15.4 pounds');          // 6.984 (kg)
parseWeightToKg('500 g');                // 0.5
parseDimensionsToCm('10 x 8 x 2 inches');// { length: 25.4, width: 20.32, height: 5.08 }
parseDimensionsToCm('300x200x100 mm');   // { length: 30, width: 20, height: 10 }
parseVoltageToV('120 volts');            // 120
parseSpec('Weight: 1.2kg, Dimensions: 10x8x2in, Voltage 120V 60W'); // 自动挑关键参数

核心 API

  • parseWeightToKg(value)number | null:支持 kg / pounds(lbs) / ounces(oz) / grams(g) → kg(保留 3 位)
  • parseDimensionsToCm(value){ length?, width?, height? } | null:支持 L x W x H (inches|in|cm|mm) → cm(保留 2 位,缺省按 inches 算)
  • parseVoltageToV(value)number | null:V / volts
  • parseWattageToW(value)number | null:W / watts
  • parseColorTempToK(value)number | null:K / kelvin
  • parseLumens(value)number | null:lm / lumens
  • parseSpec(text) → 批量从一段文本里提取所有可识别参数(返回对象)

注意

  • 解析失败返回 null(不会抛错),调用方自行决定默认值。
  • 纯本地解析,不联网、不上传。

Verwandte Skills

steipete/notion

Notion CLI/API for pages, Markdown content, data sources, files, comments, search, Workers, and raw API calls.

community

affaan-m/seo

Audit, plan, and implement SEO improvements across technical SEO, on-page optimization, structured data, Core Web Vitals, and content strategy. Use when the user wants better search visibility, SEO remediation, schema markup, sitemap/robots work, or keyword mapping.

community

affaan-m/brand-voice

Build a source-derived writing style profile from real posts, essays, launch notes, docs, or site copy, then reuse that profile across content, outreach, and social workflows. Use when the user wants voice consistency without generic AI writing tropes.

community

affaan-m/crosspost

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

community

affaan-m/x-api

X/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.

community

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

community