← 返回 Skills 市场
ohernandez-dev-blossom

Clip Path Generate

作者 Omar Hernandez · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
135
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install clip-path-generate
功能描述
Generate CSS clip-path code for shapes. Use when the user asks to create a clip path, clip an element to a shape, generate clip-path CSS, or make a polygon,...
使用说明 (SKILL.md)

CSS Clip-Path Generator

Generate clip-path CSS values for circle, ellipse, polygon, and inset shapes, with optional -webkit- vendor prefix.

Input

  • Shape type: circle | ellipse | polygon | inset (default circle)
  • Shape-specific parameters:
    • circle: radius % (default 50), cx % (default 50), cy % (default 50)
    • ellipse: rx % (default 50), ry % (default 35), cx % (default 50), cy % (default 50)
    • inset: top %, right %, bottom %, left % (default all 10)
    • polygon: list of x% y% point pairs (at least 3 points)
  • Vendor prefix: boolean (default false)

Output

  • clip-path: \x3Cvalue>;
  • Optionally -webkit-clip-path: \x3Cvalue>; if vendor prefix requested

Instructions

  1. Parse the user's request for shape type and parameters.
  2. Build the clip-path value:
    • circle: circle(\x3Cradius>% at \x3Ccx>% \x3Ccy>%)
    • ellipse: ellipse(\x3Crx>% \x3Cry>% at \x3Ccx>% \x3Ccy>%)
    • inset: inset(\x3Ctop>% \x3Cright>% \x3Cbottom>% \x3Cleft>%)
    • polygon: polygon(\x3Cx1>% \x3Cy1>%, \x3Cx2>% \x3Cy2>%, ...) — join all points with ,
  3. If the user mentions a named preset shape, map to its polygon points:
    • Triangle: polygon(50% 10%, 90% 90%, 10% 90%)
    • Pentagon: polygon(50% 5%, 95% 35%, 80% 90%, 20% 90%, 5% 35%)
    • Hexagon: polygon(50% 5%, 90% 25%, 90% 75%, 50% 95%, 10% 75%, 10% 25%)
    • Star: polygon(50% 5%, 61% 35%, 95% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 5% 35%, 39% 35%)
    • Arrow: polygon(5% 35%, 60% 35%, 60% 10%, 95% 50%, 60% 90%, 60% 65%, 5% 65%)
  4. Output clip-path: \x3Cvalue>;
  5. If vendor prefix requested, also output -webkit-clip-path: \x3Cvalue>; above the standard property.
  6. Include a short usage example showing the property applied to a .element class.

Options

  • shape: circle | ellipse | polygon | inset — default circle
  • radius: 0–50 — default 50 (circle only)
  • cx: 0–100 — default 50
  • cy: 0–100 — default 50
  • rx: 0–50 — default 50 (ellipse only)
  • ry: 0–50 — default 35 (ellipse only)
  • top / right / bottom / left: 0–50 — default 10 (inset only)
  • vendorPrefix: true | false — default false

Examples

Input: "Circle clip path, 40% radius, centered" Output:

clip-path: circle(40% at 50% 50%);

Input: "Triangle clip path" Output:

clip-path: polygon(50% 10%, 90% 90%, 10% 90%);

Input: "Ellipse clip, 60% wide 40% tall, centered, with webkit prefix" Output:

-webkit-clip-path: ellipse(60% 40% at 50% 50%);
clip-path: ellipse(60% 40% at 50% 50%);

Input: "Inset rectangle 15% margin all sides" Output:

clip-path: inset(15% 15% 15% 15%);

Error Handling

  • If polygon has fewer than 3 points, inform the user and ask for at least 3 coordinate pairs.
  • If any percentage is outside 0–100, clamp it and note the adjustment.
  • If shape type is unrecognized, default to circle and notify the user.
  • For Safari compatibility, remind the user to add the -webkit-clip-path vendor prefix (or set vendorPrefix to true).
安全使用建议
This skill appears safe to install: it's an instruction-only clip-path CSS generator that asks for no credentials and does not run or download code. Before relying on it programmatically, confirm the intended percentage limits (the README lists 0–50 for some params but also mentions clamping to 0–100) and test outputs (especially polygon points) to ensure they match your UI needs. If you plan to feed untrusted data into an automated workflow using this skill, validate and sanitize numeric inputs yourself.
功能分析
Type: OpenClaw Skill Name: clip-path-generate Version: 1.0.0 The skill is a straightforward CSS generator for the 'clip-path' property. It contains no executable code, network requests, or file system access, and its instructions in SKILL.md are strictly limited to parsing user input and formatting CSS strings.
能力评估
Purpose & Capability
Name/description (generate clip-path CSS) matches the instructions. The skill requires no binaries, env vars, or installs — which is appropriate for a pure CSS generator.
Instruction Scope
The SKILL.md stays within scope (parsing user requests and producing clip-path values, vendor prefix, usage examples). Minor inconsistency: option ranges list some parameters as 0–50 (radius, rx, ry, inset sides) while error handling says percentages outside 0–100 are clamped; clarify whether the intended hard limits are 50% or 100% to avoid confusion when programmatically enforcing limits.
Install Mechanism
No install spec or code files — lowest-risk pattern for a utility that only emits CSS values.
Credentials
No environment variables, credentials, or config paths are requested; nothing disproportionate to the stated purpose.
Persistence & Privilege
Skill is not always-enabled and does not request elevated persistence or modify other skills or system settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install clip-path-generate
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /clip-path-generate 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of clip-path-generate: generates CSS clip-path code for custom and preset shapes. - Supports generating clip-path for circle, ellipse, inset, and polygon shapes. - Recognizes named preset shapes: triangle, pentagon, hexagon, star, and arrow. - Allows custom percentage parameters for precise shape positioning and sizing. - Optionally adds -webkit-clip-path vendor prefix for compatibility. - Provides clear error messages for invalid shapes or parameters. - Includes CSS usage examples for easy implementation.
元数据
Slug clip-path-generate
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Clip Path Generate 是什么?

Generate CSS clip-path code for shapes. Use when the user asks to create a clip path, clip an element to a shape, generate clip-path CSS, or make a polygon,... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 135 次。

如何安装 Clip Path Generate?

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

Clip Path Generate 是免费的吗?

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

Clip Path Generate 支持哪些平台?

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

谁开发了 Clip Path Generate?

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

💬 留言讨论