Token导航 LogoToken导航TokenDH.com
图像处理操作浏览器github未标认证来源可访问许可证需确认审计通过

concept-to-image概念到图像

Agent Skill

用于辅助图像生成、图片编辑、视觉素材处理或图像模型工作流。它适合让 Agent 根据文本生成图片、处理背景、整理视觉提示词或调用相关图像工具。使用时需要确认输入图片、版权来源、输出格式和模型限制;涉及人物、品牌、商品或公开展示素材时,应额外核对授权、真实性和内容合规边界。

总安装

759

周安装

31

GitHub Stars

217

下载量

243
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:concept-to-image(概念到图像)
来源仓库:https://github.com/mathews-tom/praxis-skills
仓库路径:skills/concept-to-image
安装命令:
npx skills add https://github.com/mathews-tom/praxis-skills --skill concept-to-image
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/mathews-tom/praxis-skills --skill concept-to-image

简介

通过 HTML/CSS/SVG 中间层生成高质量视觉素材,支持 PNG 和 SVG 导出。

  • 适合将抽象概念转化为可视化内容,利用可编辑的 HTML 层进行精细化调整。
  • 使用 Playwright 脚本实现从代码到图像的自动化转换流程。
  • 安装前需确认权限范围和维护状态,注意是否涉及联网、命令执行或文件读写操作。
  • concept-to-image 属于图像处理类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Concept to Image

Creates polished visuals from concepts using HTML/CSS/SVG as a refineable intermediate, then exports to PNG or SVG.

Reference Files

FilePurpose
references/design-guide.mdDesign patterns, anti-patterns, color palettes, typography choices, layout examples
scripts/render_to_image.pyPlaywright-based export script — takes HTML in, PNG or SVG out
assets/template.htmlBase HTML template with .canvas container and CSS custom properties pre-configured

Why HTML as intermediate

HTML is the refineable layer between idea and image. Unlike direct canvas rendering, the user can see the HTML artifact, request changes ("make the title bigger", "swap the colors", "add a third column"), and only export once satisfied. This makes the workflow iterative and controllable.

Workflow

Concept → HTML artifact (view + refine) → PNG or SVG export
  1. Interpret the user's concept — determine what kind of visual best fits (diagram, infographic, card, chart, etc.)
  2. Design a self-contained HTML file using inline CSS and inline SVG — zero external dependencies
  3. Present the HTML as an artifact so the user can preview and request refinements
  4. Iterate on the HTML based on user feedback (colors, layout, content, sizing)
  5. Export to PNG and/or SVG when the user is satisfied, using scripts/render_to_image.py

Step 1: Interpret the concept

Determine the best visual format:

User intentVisual formatApproach
Explain a process/flowFlowchart or pipeline diagramSVG paths + boxes
Compare itemsSide-by-side or matrixCSS Grid
Show hierarchyTree or layered diagramNested containers + SVG connectors
Present dataChart or infographicSVG shapes + data labels
Social/marketing graphicCard or posterTypography-forward HTML/CSS
Icon, logo, badgeCompact symbolPure SVG
Educational conceptAnnotated diagramSVG + positioned labels

Step 2: Design the HTML

Read references/design-guide.md for detailed design patterns and anti-patterns.

Core rules:

  • Single file, self-contained: All CSS inline in <style>, all graphics as inline <svg>. No external resources.
  • Fixed viewport: Set explicit width and height on the root container matching the intended export size. This is critical — Playwright screenshots the element at this exact size.
  • Anti-AI-slop: Avoid centered-everything layouts, purple gradients, uniform rounded corners, and Inter/system font defaults. See design guide for alternatives.
  • SVG-first for shapes: Use inline SVG for icons, connectors, shapes, and any element that should scale cleanly. CSS for layout and typography.
  • Color with intention: 3-4 hues max + neutrals. Define as CSS custom properties. Every color encodes meaning.
  • Start from the template: Use assets/template.html as the base structure.

Sizing guidelines

Use caseRecommended size
Social media graphic1200×630
Infographic (portrait)800×1200
Presentation slide1920×1080
Square post1080×1080
Icon/badge256×256 or 512×512
Wide diagram1600×900

Set the .canvas container to the chosen size. The export script captures this element.

Step 3: Present and iterate

Present the HTML file to the user. They'll see it rendered as an artifact. Common refinement requests:

  • Color/theme changes → update CSS custom properties
  • Layout adjustments → modify grid/flexbox
  • Content changes → edit text/SVG elements
  • Size changes → update .canvas dimensions

Each iteration is a quick HTML edit, not a full re-render. This is the key advantage over direct image generation.

Step 4: Export to image

Once the user is satisfied, run the export script:

python3 scripts/render_to_image.py <input.html> <output.png|.svg> [--width 1200] [--height 630] [--scale 2] [--selector ".canvas"]

Parameters

ParamDefaultDescription
input(required)Path to HTML file
output(required)Output path. Extension determines format (.png or.svg)
--widthautoViewport width (overrides HTML-defined size)
--heightautoViewport height (overrides HTML-defined size)
--scale2Device scale factor for PNG (2 = retina quality)
--selector.canvasCSS selector for the element to capture
--full-pagefalseCapture the full page instead of a specific element

PNG export

Uses Playwright to launch headless Chromium and screenshot the .canvas element at the specified scale factor. Scale 2 produces retina-quality output (e.g., 1200×630 CSS pixels → 2400×1260 PNG).

SVG export

Two strategies, chosen automatically:

  1. SVG-native content: If the .canvas element contains a single root <svg>, extracts it directly as a clean SVG file. This produces a true vector SVG.
  2. HTML-based content: If the content is CSS/HTML-heavy, falls back to PNG export with a note that true SVG requires SVG-native design. The script will warn and suggest redesigning with SVG elements if vector output is needed.

Delivering the output

Present the output file to the user. Always deliver both the HTML (for future editing) and the image (final output).

Error Handling

ErrorCauseResolution
playwright not foundPlaywright package not installedRun npx playwright install chromium or pip install playwright && playwright install chromium
Browser launch failureHeadless Chromium fails to startVerify --headless mode is supported; check available memory (Chromium needs ~200 MB)
.canvas selector not foundHTML does not contain an element matching .canvasVerify assets/template.html was used as the base; check the root container has class="canvas"
Render timeoutComplex HTML takes too long to render before screenshotIncrease the timeout via --timeout flag in the script, or simplify the HTML (reduce DOM depth, inline fewer SVGs)
SVG export falls back to PNG.canvas element contains HTML/CSS content, not a root SVGSee SVG export section; redesign with a single root <svg> if vector output is required

Limitations

  • Playwright + Chromium required — the export script cannot run without a working Chromium installation.
  • macOS and Linux only for headless browser export. Windows Subsystem for Linux works; native Windows Playwright may require separate setup.
  • SVG export is best-effort — complex HTML/CSS layouts fall back to PNG. True vector SVG requires a single root <svg> as the .canvas child.
  • Max viewport 4096×4096 — Chromium refuses screenshots larger than this. Use --scale to achieve higher effective resolution within this limit.
  • No animation support — exported images are static snapshots. CSS animations and JavaScript-driven transitions are frozen at their initial state.

Output Example

After a successful export, the script prints the output path and file stats:

Exported: concept-diagram.png
  Size:       2400 × 1260 px  (2× scale from 1200 × 630 canvas)
  File size:  ~180 KB
  Format:     PNG (RGBA)

Filename pattern follows whatever was passed as the output argument. Typical file sizes:

  • Simple diagrams (text + shapes): 80–200 KB
  • Dense infographics with gradients: 300–600 KB
  • Full 1920×1080 at 2× scale: 500 KB–1.5 MB

Design anti-patterns to avoid

These produce generic "AI-generated" looking output:

  • Centered everything with equal spacing
  • Purple/blue gradient backgrounds
  • Uniform border-radius on all elements
  • Generic icon libraries (use custom inline SVG)
  • System font stack without typographic intention
  • Drop shadows on everything
  • Low information density (too much whitespace)

Font handling

Since this environment has limited font access, use web-safe font stacks with intentional fallbacks:

  • Technical/mono: 'Courier New', 'Consolas', monospace
  • Clean sans: 'Helvetica Neue', 'Arial', sans-serif
  • Editorial serif: 'Georgia', 'Times New Roman', serif
  • Display: Use SVG text with custom paths for display typography when needed

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.27%
按下载量换算91

Claude

28.81%
按下载量换算70

Cursor

17.82%
按下载量换算43

Gemini CLI

8.43%
按下载量换算20

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills