{"skill":{"slug":"units","displayName":"Units","summary":"Perform unit conversions and calculations using GNU Units.","description":"---\nname: units\ndescription: Perform unit conversions and calculations using GNU Units.\nmetadata: {\"clawdbot\":{\"emoji\":\"📏\",\"requires\":{\"bins\":[\"units\"]}}}\n---\n\n# GNU Units Skill\n\nUse GNU `units` to perform unit conversions and calculations via the command line. Can be installed using brew and apt under \"units\".\n\n## Usage\n\nUse the `bash` tool to run the `units` command. Use the `-t` (terse) flag to get just the numeric result.\n\n```bash\nunits -t 'from-unit' 'to-unit'\n```\n\n### Examples\n\n**Basic Conversion:**\n```bash\nunits -t '10 kg' 'lbs'\n# Output: 22.046226\n```\n\n**Compound Units:**\n```bash\nunits -t '60 miles/hour' 'm/s'\n# Output: 26.8224\n```\n\n**Temperature (Non-linear):**\nTemperature requires specific syntax: `tempF(x)`, `tempC(x)`, `tempK(x)`.\n```bash\nunits -t 'tempF(98.6)' 'tempC'\n# Output: 37\n```\n\n**Time:**\n```bash\nunits -t '2 weeks' 'seconds'\n```\n\n**Rounding Output:**\nTo round to specific decimal places (e.g. 3 places), use `-o \"%.3f\"`:\n```bash\nunits -t -o \"%.3f\" '10 kg' 'lbs'\n# Output: 22.046\n```\n\n**Definition Lookup:**\nTo see what a unit definition is (without converting), omit the second argument (without `-t` is more verbose/useful for definitions):\n```bash\nunits '1 acre'\n```\n\n## Notes\n\n- **Currency:** `units` supports currency (USD, EUR, etc.), but exchange rates may be out of date as they are static in the definitions file.\n- **Safety:** Always quote your units to prevent shell expansion issues (e.g. `units -t '1/2 inch' 'mm'`).\n","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":2456,"installsAllTime":4,"installsCurrent":4,"stars":1,"versions":1},"createdAt":1767759749838,"updatedAt":1778485729679},"latestVersion":{"version":"1.0.0","createdAt":1767759749838,"changelog":"- Initial release of the \"units\" skill for unit conversions and calculations using GNU Units.\n- Supports quick numeric conversions via the command line with the `units -t` flag.\n- Examples provided for basic, compound, and temperature unit conversions.\n- Added instructions for rounding output to a set number of decimal places.\n- Included guidance for looking up unit definitions and handling currency and shell safety issues.","license":null},"metadata":{"setup":[],"os":null,"systems":null},"owner":{"handle":"asleep123","userId":"s17cvc1d037fas6znwvzhgc5m983t697","displayName":"Asleep","image":"https://avatars.githubusercontent.com/u/122379135?v=4"},"moderation":null}