pint-compute by parcadei/continuous-claude-v3
npx skills add https://github.com/parcadei/continuous-claude-v3 --skill pint-compute用于单位感知计算的认知增强工具。使用 Pint 进行单位转换、执行单位运算、检查维度兼容性以及简化复合单位。
| 我想要... | 命令 | 示例 |
|---|---|---|
| 转换单位 | convert | convert "5 meters" --to feet |
| 单位运算 | calc | calc "10 m/s * 5 s" |
| 检查维度 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
check |
check newton --against "kg * m / s^2" |
| 解析量 | parse | parse "100 km/h" |
| 简化单位 | simplify | simplify "1 kg*m/s^2" |
将量值字符串解析为数值、单位和维度。
uv run python -m runtime.harness scripts/pint_compute.py \
parse "100 km/h"
uv run python -m runtime.harness scripts/pint_compute.py \
parse "9.8 m/s^2"
将量值转换为不同的单位。
uv run python -m runtime.harness scripts/pint_compute.py \
convert "5 meters" --to feet
uv run python -m runtime.harness scripts/pint_compute.py \
convert "100 km/h" --to mph
uv run python -m runtime.harness scripts/pint_compute.py \
convert "1 atmosphere" --to pascal
执行单位感知运算。运算符必须用空格分隔。
uv run python -m runtime.harness scripts/pint_compute.py \
calc "5 m * 3 s"
uv run python -m runtime.harness scripts/pint_compute.py \
calc "10 m / 2 s"
uv run python -m runtime.harness scripts/pint_compute.py \
calc "5 meters + 300 cm"
检查两个单位是否具有兼容的维度。
uv run python -m runtime.harness scripts/pint_compute.py \
check newton --against "kg * m / s^2"
uv run python -m runtime.harness scripts/pint_compute.py \
check joule --against "kg * m^2 / s^2"
将复合单位简化为基本形式或紧凑形式。
uv run python -m runtime.harness scripts/pint_compute.py \
simplify "1 kg*m/s^2"
uv run python -m runtime.harness scripts/pint_compute.py \
simplify "1000 m"
| 领域 | 示例 |
|---|---|
| 长度 | meter, foot, inch, mile, km, yard |
| 时间 | second, minute, hour, day, year |
| 质量 | kg, gram, pound, ounce, ton |
| 速度 | m/s, km/h, mph, knot |
| 能量 | joule, calorie, eV, kWh, BTU |
| 力 | newton, pound_force, dyne |
| 温度 | kelvin, celsius, fahrenheit |
| 压力 | pascal, bar, atmosphere, psi |
| 功率 | watt, horsepower |
所有命令都返回包含相关字段的 JSON:
{
"result": "16.4042 foot",
"magnitude": 16.4042,
"units": "foot",
"dimensionality": "[length]",
"latex": "16.4042\\,\\mathrm{ft}"
}
维度错误会被捕获并报告:
# 这将出错 - 不兼容的维度
uv run python -m runtime.harness scripts/pint_compute.py \
convert "5 meters" --to kg
# 错误:无法将 '[length]' 转换为 '[mass]'
每周安装量
188
代码仓库
GitHub 星标数
3.6K
首次出现
2026年1月22日
安全审计
安装于
opencode183
codex181
gemini-cli180
cursor180
github-copilot177
amp175
Cognitive prosthetics for unit-aware computation. Use Pint for converting between units, performing unit arithmetic, checking dimensional compatibility, and simplifying compound units.
| I want to... | Command | Example |
|---|---|---|
| Convert units | convert | convert "5 meters" --to feet |
| Unit math | calc | calc "10 m/s * 5 s" |
| Check dimensions | check | check newton --against "kg * m / s^2" |
| Parse quantity | parse | parse "100 km/h" |
| Simplify units | simplify | simplify "1 kg*m/s^2" |
Parse a quantity string into magnitude, units, and dimensionality.
uv run python -m runtime.harness scripts/pint_compute.py \
parse "100 km/h"
uv run python -m runtime.harness scripts/pint_compute.py \
parse "9.8 m/s^2"
Convert a quantity to different units.
uv run python -m runtime.harness scripts/pint_compute.py \
convert "5 meters" --to feet
uv run python -m runtime.harness scripts/pint_compute.py \
convert "100 km/h" --to mph
uv run python -m runtime.harness scripts/pint_compute.py \
convert "1 atmosphere" --to pascal
Perform unit-aware arithmetic. Operators must be space-separated.
uv run python -m runtime.harness scripts/pint_compute.py \
calc "5 m * 3 s"
uv run python -m runtime.harness scripts/pint_compute.py \
calc "10 m / 2 s"
uv run python -m runtime.harness scripts/pint_compute.py \
calc "5 meters + 300 cm"
Check if two units have compatible dimensions.
uv run python -m runtime.harness scripts/pint_compute.py \
check newton --against "kg * m / s^2"
uv run python -m runtime.harness scripts/pint_compute.py \
check joule --against "kg * m^2 / s^2"
Simplify compound units to base or compact form.
uv run python -m runtime.harness scripts/pint_compute.py \
simplify "1 kg*m/s^2"
uv run python -m runtime.harness scripts/pint_compute.py \
simplify "1000 m"
| Domain | Examples |
|---|---|
| Length | meter, foot, inch, mile, km, yard |
| Time | second, minute, hour, day, year |
| Mass | kg, gram, pound, ounce, ton |
| Velocity | m/s, km/h, mph, knot |
| Energy | joule, calorie, eV, kWh, BTU |
| Force | newton, pound_force, dyne |
| Temperature | kelvin, celsius, fahrenheit |
| Pressure | pascal, bar, atmosphere, psi |
| Power | watt, horsepower |
All commands return JSON with relevant fields:
{
"result": "16.4042 foot",
"magnitude": 16.4042,
"units": "foot",
"dimensionality": "[length]",
"latex": "16.4042\\,\\mathrm{ft}"
}
Dimensionality errors are caught and reported:
# This will error - incompatible dimensions
uv run python -m runtime.harness scripts/pint_compute.py \
convert "5 meters" --to kg
# Error: Cannot convert '[length]' to '[mass]'
Weekly Installs
188
Repository
GitHub Stars
3.6K
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode183
codex181
gemini-cli180
cursor180
github-copilot177
amp175
Lark Contact CLI 工具:高效搜索与获取飞书用户信息,提升团队协作效率
37,400 周安装