← 返回 Skills 市场
ohernandez-dev-blossom

Aspect Calc

作者 Omar Hernandez · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
136
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install aspect-calc
功能描述
Calculate aspect ratios from dimensions and find missing width or height. Use when the user asks to calculate an aspect ratio, find the height for a given wi...
使用说明 (SKILL.md)

Aspect Ratio Calculator

Calculate simplified aspect ratios from pixel dimensions, find missing dimensions from a known ratio, and report decimal and percentage equivalents using GCD simplification.

Input

  • Two dimensions (width and height in pixels), OR
  • A known ratio (e.g., 16:9) and one dimension (width or height), to calculate the missing value

Output

  • Simplified ratio (e.g., 16:9)
  • Decimal ratio (e.g., 1.7778)
  • Percentage (width as % of height, e.g., 177.78%)
  • If solving for missing dimension: the calculated value

Instructions

  1. Parse the user's input to determine the mode:
    • Mode A: two pixel dimensions given → calculate ratio and metadata
    • Mode B: ratio + one dimension given → calculate the missing dimension
  2. Mode A — Ratio from dimensions: a. Compute divisor = GCD(width, height) using the Euclidean algorithm: GCD(a, b) = b === 0 ? a : GCD(b, a % b) b. Simplified ratio: (width / divisor):(height / divisor) c. Decimal: (width / height).toFixed(4) d. Percentage: (width / height * 100).toFixed(2)%
  3. Mode B — Dimension from ratio: a. Parse the ratio as rW:rH b. If width is given: height = round(width * rH / rW) c. If height is given: width = round(height * rW / rH)
  4. Identify if the ratio matches a known standard and name it:
    • 16:9 → HD Video / Widescreen
    • 4:3 → Classic TV / Standard
    • 1:1 → Square
    • 21:9 → Ultrawide
    • 9:16 → Mobile Video / Story
    • 3:4 → Portrait Classic
    • 3:2 → 35mm Film
    • 2:3 → Portrait Photo
  5. Output all results clearly.

Options

  • width: positive integer
  • height: positive integer
  • ratio: string in W:H format — for Mode B
  • locked: if true, preserve the current ratio when one dimension changes

Examples

Input: "What is the aspect ratio of 1920x1080?" Output:

  • Simplified ratio: 16:9 (HD Video / Widescreen)
  • Decimal: 1.7778
  • Percentage: 177.78% (width is 177.78% of height)

Input: "I have a 16:9 video, width is 1280px — what height do I need?" Output:

  • Width: 1280px, Ratio: 16:9
  • Height: 720px
  • (1280 × 9 / 16 = 720)

Input: "Simplify 2560x1440" Output:

  • Simplified ratio: 16:9 (HD Video / Widescreen)
  • Decimal: 1.7778
  • Percentage: 177.78%

Input: "What is the aspect ratio of 800x600?" Output:

  • Simplified ratio: 4:3 (Classic TV / Standard)
  • Decimal: 1.3333
  • Percentage: 133.33%

Input: "Give me height for a 21:9 ultrawide at 2560px width" Output:

  • Width: 2560px, Ratio: 21:9
  • Height: 1097px
  • (2560 × 9 / 21 ≈ 1097)

Error Handling

  • If either dimension is 0 or negative, return an error: "Dimensions must be positive integers greater than 0."
  • If a ratio is provided in an invalid format (not W:H), ask the user to use the W:H format (e.g., 16:9).
  • If both dimensions result in the same ratio numerator and denominator equal to 1 (e.g., prime dimensions with no common factor), output the ratio as-is and note it cannot be simplified further.
安全使用建议
This skill is an instruction-only aspect-ratio calculator and appears coherent and low-risk: it only describes local arithmetic (GCD and scaling) and asks for no credentials or installs. You can safely use it for interactive aspect-ratio questions. If you plan to trust results for critical uses (manufacturing, printing, legal dimensions), validate outputs independently or run a trusted implementation, since the SKILL.md is just prose and may depend on correct parsing/rounding rules when implemented.
功能分析
Type: OpenClaw Skill Name: aspect-calc Version: 1.0.0 The skill is a straightforward aspect ratio calculator that performs basic mathematical operations (GCD simplification, multiplication, and division) to determine dimensions or ratios. There are no network requests, file system access, or suspicious instructions in SKILL.md or _meta.json.
能力评估
Purpose & Capability
The name/description (aspect ratio calculations) match the SKILL.md instructions. No unrelated binaries, env vars, or config paths are requested.
Instruction Scope
Runtime instructions are limited to parsing inputs and performing arithmetic (GCD, division, rounding). There are no directives to read files, access environment variables, or transmit data externally.
Install Mechanism
No install spec or code files are present (instruction-only), so nothing is downloaded or written to disk.
Credentials
The skill requires no environment variables or credentials, which is appropriate for a local math helper.
Persistence & Privilege
always is false and the skill does not request persistent/system privileges. Autonomous invocation is allowed by default but is low-risk here because the skill has no external access.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install aspect-calc
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /aspect-calc 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of aspect-calc skill. - Calculates and simplifies aspect ratios from pixel dimensions or known ratio plus a dimension. - Outputs include the simplified ratio, decimal and percentage equivalents, and identifies standard ratios by name where possible. - Supports calculating missing width or height while preserving aspect ratio. - Includes user guidance, clear outputs, and detailed error handling for invalid or nonsensical inputs.
元数据
Slug aspect-calc
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Aspect Calc 是什么?

Calculate aspect ratios from dimensions and find missing width or height. Use when the user asks to calculate an aspect ratio, find the height for a given wi... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 136 次。

如何安装 Aspect Calc?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install aspect-calc」即可一键安装,无需额外配置。

Aspect Calc 是免费的吗?

是的,Aspect Calc 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Aspect Calc 支持哪些平台?

Aspect Calc 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Aspect Calc?

由 Omar Hernandez(@ohernandez-dev-blossom)开发并维护,当前版本 v1.0.0。

💬 留言讨论