📦 Extract Design — 技能工具

v1.0.1

Use this skill when the user wants to extract a webpage's design language into a reusable HTML style reference file, including typography, colors, spacing, s...

0· 139·0 当前·0 累计
by @vintlin (Vint)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/4/16
0
安全扫描
VirusTotal
无害
查看报告
OpenClaw
可疑
medium confidence
The skill's purpose (extracting a site's design into reusable style files) is coherent with the provided files, but there are mismatches and operational assumptions (undisclosed runtime dependencies, network/browser use, and a brittle filesystem glob/write pattern) that merit caution before installing or running it.
评估建议
This skill appears to do what it says — extract a website's visual system and save specimen files — but take precautions before running it: - Review the two Python scripts (scripts/extract-styles.py, scripts/extract-keyframes.py) yourself to confirm they only visit target URLs and extract style data, and do not exfiltrate local files or credentials. - The skill needs Python + Playwright and a headless browser to work, but the registry metadata did not declare these. Make sure those dependencies...
详细分析 ▾
用途与能力
Name, README, SKILL.md, and the included assets/scripts consistently describe a design-extraction skill. The presence of extract-styles.py and extract-keyframes.py and many sample output manifests/specimens aligns with the described capability of extracting tokens, motifs, and producing specimen HTML/JSON.
指令范围
SKILL.md restricts output to the skill's own assets/theme directory and requires using internal reference templates — that keeps writes scoped to the skill. It also instructs resolving the skill directory using a glob (**/skills/extract-design/SKILL.md) which is brittle and may cause the agent to search the filesystem. Runtime behavior implied by README and scripts (Playwright + live render extraction, network access to target pages, downloading assets) is expected for the stated task but expands the scope to network I/O and headless browser execution. There is no instruction in SKILL.md to read unrelated credentials or project files, and the skill explicitly forbids writing into the user's project directory.
安装机制
The registry entry contains no install spec, but README claims the Python + Playwright runtime (pip install playwright && playwright install chromium). That is a practical dependency mismatch: the skill includes Python scripts that likely require Playwright and a headless browser, but the skill metadata did not declare these requirements or provide an install step. Lack of an explicit install spec means the environment must already provide Python, Playwright, and a browser — if not, a user or agent may attempt to install them interactively (higher-risk operations).
凭证需求
The skill declares no environment variables, no credentials, and no config paths. The included files reference external asset URLs (target-site images/CSS) which is consistent with extracting a site. There are no obvious requests for unrelated secrets or cloud credentials.
持久化与权限
The skill writes output files into its own assets/theme/ directory (persistence within the skill bundle). always is false and model invocation is allowed (default). Writing into the skill directory is reasonable for cached specimens, but the write behavior means the skill will modify its own files on disk; users should be aware of and accept that the skill will create and update files inside the agent's skill storage location.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.12026/3/19

Add @keyframes extraction, consolidate motion docs, add ampcode/planetono/tiwis specimens

无害

安装命令

点击复制
官方npx clawhub@latest install extract-design
镜像加速npx clawhub@latest install extract-design --registry https://cn.longxiaskill.com

技能文档

Output Location

CRITICAL: All extracted style files MUST be saved to the skill's own assets/theme/ directory — never to the user's project directory, never to a relative path from the current working directory.

Before writing any output file, resolve the skill directory by running:

Glob pattern: /skills/extract-design/SKILL.md

The directory containing that SKILL.md file is SKILL_DIR. All output goes under SKILL_DIR/assets/theme/.

Output files use the source domain or project name as a prefix:

SKILL_DIR/assets/theme/
├── {name}-style-manifest.json    # Structured style manifest
└── {name}-style-specimen.html    # Universal style specimen HTML

Examples (where SKILL_DIR is whatever path the Glob resolved):

  • {SKILL_DIR}/assets/theme/ampcode-style-manifest.json
  • {SKILL_DIR}/assets/theme/ampcode-style-specimen.html
  • {SKILL_DIR}/assets/theme/vercel-style-manifest.json
  • {SKILL_DIR}/assets/theme/vercel-style-specimen.html

Create the assets/theme/ directory if it does not exist before writing.


Reference Files

The references/ directory inside this skill contains two files you MUST use during every extraction. Both paths are relative to SKILL_DIR (resolved via Glob above):

  • {SKILL_DIR}/references/extraction-checklist.md — comprehensive checklist for all extraction dimensions. Work through every section; note why if a dimension is not applicable.
  • {SKILL_DIR}/references/style-specimen.html — structural template for Output C. Your generated specimen must follow the same structure.

WARNING*: The template contains / REPLACE / placeholders for every CSS token value. You MUST replace ALL of them with values measured from the target site. Do NOT keep any placeholder value in the final output. A / REPLACE / in the output file means the extraction is incomplete.


When to use

Use this skill when the user wants to:

  • 提取某个网页的视觉风格
  • 让 AI 学习一个网站的设计语言并生成同风格页面
  • 从网页中抽取字体、字号、字色、背景样式、图片背景、条纹/网格/纹理、动画、卡片样式、代码块样式
  • 将网页风格沉淀为一个可复用的 HTML 参考文件
  • 构建设计样张页 / style specimen / design reference file
  • 将一个具体网页抽象成更通用的设计系统表达
  • 抽取整页“氛围感 / atmosphere / art direction”,而不仅是组件样式

Do not use this skill if the user wants:

  • 仅截图网页
  • 仅复制页面 DOM 或下载页面资源
  • 仅修复某个单独 CSS 问题
  • 仅做像素级 1:1 复刻
  • 仅导出 raw CSS dump

This skill is for style system extraction, not page cloning.


Core principle

Your task is not to reproduce the page structure.

Your task is to extract the page's visual system and represent it as:

  • Primitive tokens
  • Semantic tokens
  • Background / atmosphere system
  • Decorative motif system
  • Component archetypes
  • Interaction rules
  • A universal style specimen HTML

The final result must be a general-purpose reference file that another AI can read and use to generate new pages in the same style.

Think in terms of:

  • design tokens
  • semantic roles
  • theme layers
  • background atmosphere
  • decorative motifs
  • component patterns
  • state behavior
  • motion language
  • responsive rules
  • art direction

Do not think in terms of:

  • copying all classes
  • mirroring page DOM
  • dumping raw CSS blindly
  • preserving irrelevant content text
  • flattening atmospheric styling into a single background color

The goal is:

Preserve not only the component language, but also the page atmosphere, decorative motifs, and art direction. A faithful extraction must capture both system structure and visual mood.


Output contract

When using this skill, produce three outputs:

Output A — Extraction summary

A concise explanation of the extracted style system:

  • overall design character
  • typography system
  • color system
  • spacing/layout rhythm
  • surface/elevation language
  • background / atmosphere language
  • decorative motifs
  • motion language
  • component family
  • theme/responsive behavior
  • extraction confidence
  • limitations

Output B — Structured style manifest

A required machine-readable JSON file saved to {SKILL_DIR}/assets/theme/{name}-style-manifest.json, describing:

  • meta
  • primitives
  • semantic tokens
  • background system
  • motifs
  • themes
  • motion tokens
  • component archetypes
  • responsive rules
  • accessibility notes
  • limitations

Output C — Universal style specimen HTML

A single HTML file containing:

  • CSS tokens
  • theme layers
  • background/atmosphere layers
  • motif samples
  • component styles
  • specimen sections
  • a design manifest in
数据来源ClawHub ↗ · 中文优化:龙虾技能库