Unit converter
Skill khshanovskyi/custom-agent-skills/agent_demo/_skills/unit-converter
Project to demonstrate custom implementation of agent skills
npx -y skills add khshanovskyi/custom-agent-skills --skill unit-converterAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Converts values between units of measurement across categories: length (km, miles, feet, inches), weight (kg, lbs, oz, stone), temperature (Celsius, Fahrenheit, Kelvin), volume (liters, gallons, cups, ml), area (m², acres, ft²), speed (km/h, mph, knots), time (seconds to years), data storage (bytes to petabytes), pressure, and energy. Use when the user asks to convert, calculate, or express a measurement in different units.
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
2.1 KB, as published. Nobody here has run it
Unit Converter
Performs a one-shot conversion between two units that belong to the same physical category.
Function
convert_units(value, from_unit, to_unit) → (result: float, category: str)
resultisvalueexpressed into_unit.categoryis the detected physical category — one oflength,weight,temperature,volume,area,speed,time,data,pressure,energy.- Unit names are case-insensitive and accept common aliases:
pounds,lbs,lb, andpoundall refer to the same unit; so dokilometers,kilometer, andkm;secis accepted asseconds; and so on. See references/examples.md for the full alias list per category.
A fmt(value) helper is also provided for pretty-printing numeric results (scientific notation for very large or very small values, comma grouping for thousands).
Errors
convert_units raises ValueError:
Unknown unit: '<unit>'— the unit isn't recognized in any category. Surface the message and ask the user to clarify.Cannot convert between '<a>' (<cat_a>) and '<b>' (<cat_b>)— the two units belong to different categories. Surface the message; do not attempt to bridge categories.
Resources
- references/examples.md — sample natural-language inputs mapped to function arguments, the full alias list per category, and example error outputs.
- scripts/convert.py — implementation. Inside
execute_codethe same file is available at/skills/unit-converter/scripts/convert.py.