← 返回 Skills 市场
xueyetianya

Gradient

作者 bytesagain4 · GitHub ↗ · v2.0.0 · MIT-0
cross-platform ⚠ suspicious
227
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install gradient
功能描述
Generate CSS gradient code, preview gradient combinations, and build gradient palettes using bash and Python. Use when creating linear, radial, or conic grad...
使用说明 (SKILL.md)

Gradient — CSS Gradient Generator & Palette Builder

Generate production-ready CSS gradient code for linear, radial, and conic gradients. Create gradient palettes, preview combinations, adjust angles and color stops, and export gradient collections. All gradient definitions are stored locally in JSONL format for reuse and sharing.

Prerequisites

  • Python 3.6+
  • Bash 4+

Data Storage

All gradient records and palettes are stored in ~/.gradient/data.jsonl. Each record is a JSON object with fields including id, name, type (linear, radial, conic), css, stops, angle, created_at, and additional metadata.

Commands

Run via: bash scripts/script.sh \x3Ccommand> [options]

Command Description
create Create a new gradient with type, colors, angle, and optional name
list List all saved gradients with names, types, and CSS preview
get Get full details and CSS code for a specific gradient by ID or name
update Update an existing gradient's colors, angle, or name
delete Remove a gradient from the collection by ID
linear Shortcut to generate a linear gradient with angle and color stops
radial Shortcut to generate a radial gradient with shape, position, and stops
conic Shortcut to generate a conic gradient with start angle and stops
random Generate random gradients with optional constraints on hue or type
palette Generate a collection of related gradients from a base color
export Export gradients as CSS classes, Tailwind config, or SCSS variables
preview Generate an HTML preview page for one or all gradients
help Show usage information
version Print the tool version

Usage Examples

# Create a simple linear gradient
bash scripts/script.sh create --name sunset --type linear --angle 135 --stops "#ff6b6b,#feca57,#48dbfb"

# Shortcut for linear gradient
bash scripts/script.sh linear --angle 90 --stops "#667eea,#764ba2"

# Create a radial gradient
bash scripts/script.sh radial --shape circle --position center --stops "#00d2ff,#3a7bd5"

# Create a conic gradient
bash scripts/script.sh conic --from 0 --stops "#ff0000,#00ff00,#0000ff,#ff0000"

# List all saved gradients
bash scripts/script.sh list

# Get details for a gradient
bash scripts/script.sh get --id abc123

# Update a gradient
bash scripts/script.sh update --id abc123 --angle 180 --stops "#e74c3c,#9b59b6"

# Delete a gradient
bash scripts/script.sh delete --id abc123

# Generate 5 random gradients
bash scripts/script.sh random --count 5

# Generate gradients with warm hues only
bash scripts/script.sh random --count 3 --hue 0-60

# Build a palette from a base color
bash scripts/script.sh palette --color "#3498db" --count 5

# Export as CSS
bash scripts/script.sh export --format css --output gradients.css

# Export as Tailwind config
bash scripts/script.sh export --format tailwind --output tailwind-gradients.js

# Generate HTML preview
bash scripts/script.sh preview --output preview.html

Output Format

create, linear, radial, and conic output the CSS gradient string to stdout. list returns a formatted table. get returns full JSON metadata. export writes to the specified file format. preview generates a self-contained HTML file.

Notes

  • Gradient types: linear, radial, conic.
  • Linear gradients support angles in degrees (0-360) or keywords (to right, to bottom left).
  • Radial gradients support shapes: circle, ellipse; positions: center, top left, etc.
  • Color stops accept hex (#rrggbb), rgb(), hsl(), or CSS named colors.
  • Each stop can include an optional position percentage: #ff0000:30%.
  • The palette command generates harmonious gradient variations from a single base color.
  • Export formats: css (classes), tailwind (JS config), scss (variables with mixins).
  • Preview HTML includes responsive cards showing each gradient with its CSS code.

Powered by BytesAgain | bytesagain.com | [email protected]

安全使用建议
This skill appears to be a self-contained, local CSS gradient generator that stores its data in ~/.gradient/data.jsonl and writes export/preview files you request. Before installing or running: (1) review the script if you want to confirm there are no edits you disagree with, (2) be aware it will create and write files under $HOME/.gradient, and (3) run it in a controlled environment if you prefer (e.g., a throwaway user account or container). No network calls or credential access are requested by the code or SKILL.md.
功能分析
Type: OpenClaw Skill Name: gradient Version: 2.0.0 The Gradient skill bundle provides a utility for generating and managing CSS gradients, but it contains a vulnerability in its file handling logic. Specifically, the `export` and `preview` commands in `scripts/script.sh` accept an `--output` argument and write content to that path without any validation or sanitization. This allows for arbitrary file overwrites if the agent is directed to use a sensitive path (e.g., `~/.bashrc` or SSH configurations), posing a risk of system compromise through prompt injection.
能力评估
Purpose & Capability
Name/description match the provided files and instructions. The script generates gradients, previews, palettes, and exports CSS/Tailwind/SCSS, and stores records in ~/.gradient/data.jsonl — all consistent with the stated purpose. No unrelated resources (cloud credentials, external services) are requested.
Instruction Scope
SKILL.md instructs use of the included bash script (bash scripts/script.sh ...) and documents local storage and export behavior. The runtime actions are scoped to local file operations (reading/writing ~/.gradient/data.jsonl and user-specified export/preview files). It does not instruct reading other system-wide config files or exfiltrating data to remote endpoints.
Install Mechanism
No install spec is present (instruction-only skill with an included script). There are no downloads or package installs declared; the tool relies on Python 3 and Bash which are reasonable prerequisites for a script of this type.
Credentials
The skill requests no environment variables or credentials. Its only persistent footprint is a data directory under the user's home (~/.gradient), which is reasonable for a local CLI utility. There are no requests for unrelated secrets or config paths.
Persistence & Privilege
always is false and the skill does not declare any elevated or system-wide modifications. It writes only to its own data directory and to user-specified export/preview files. It does not modify other skills or agent configuration.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install gradient
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /gradient 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.0
Domain-specific upgrade
元数据
Slug gradient
版本 2.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Gradient 是什么?

Generate CSS gradient code, preview gradient combinations, and build gradient palettes using bash and Python. Use when creating linear, radial, or conic grad... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 227 次。

如何安装 Gradient?

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

Gradient 是免费的吗?

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

Gradient 支持哪些平台?

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

谁开发了 Gradient?

由 bytesagain4(@xueyetianya)开发并维护,当前版本 v2.0.0。

💬 留言讨论