本文へ移動
cccskills
無料GitHub で公開

fec-image-generation

Use when generating or editing diagrams, charts, visual assets, posters, UI mockups, product images, infographics, academic figures, comics, avatars, storyboards, brand boards, or image-edit workflows, especially when exported PNGs need visual QA and bounded self-repair. Prefer deterministic Mermaid/SVG/HTML/canvas sources for text-heavy diagrams; use HTML technical diagrams for browser-ready system blueprints, architecture, deployment topology, agent runtime, memory flow, before-after architecture, workflow, sequence, data-flow, lifecycle, runbook, PII/data-lineage, and state-machine diagrams. Do not use for ordinary UI polish without generated imagery.

インストール方法を見る

含まれるファイル(20)

  • SKILL.md10.9 KB
  • assets/interactive-diagram.html16.2 KB
  • assets/quality-examples/architecture.json2.3 KB
  • assets/quality-examples/invalid-explicit.json640 B
  • assets/quality-examples/README.md2.0 KB
  • assets/quality-examples/sequence.json1.0 KB
  • assets/quality-examples/sequence.mmd616 B
  • assets/quality-examples/workflow.json1.8 KB
  • assets/quality-examples/workflow.mmd382 B
  • references/artifact-routing.md4.3 KB
  • references/diagram-workflows.md6.8 KB
  • references/html-technical-diagrams.md13.4 KB
  • references/png-qa-autofix.md2.9 KB
  • scripts/diagram-browser.mjs7.6 KB
  • scripts/diagram-layout.mjs10.9 KB
  • scripts/export-diagram.mjs12.8 KB
  • scripts/interactive-diagram-server.mjs22.1 KB
  • scripts/mermaid-render.mjs4.5 KB
  • scripts/png-qa.mjs19.2 KB
  • scripts/tech-diagram-render.mjs63.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Image generation and chart workflow

Purpose

Generate or edit diagrams, visual assets, and image workflows, and perform reviewable self-checks and repair iterations on exported PNGs.

Procedure

  1. Determine product type

    • When accuracy of text, structure, and connections is a priority, use Mermaid, SVG, HTML/CSS, canvas, or a graphics library to generate editable sources and then export as PNG.
    • Use HTML technical diagrams when the user needs a browser-ready single file with dark/light theme support for system blueprints, architecture, deployment topology, agent runtime, memory flow, before-after architecture, workflow, sequence, data-flow, lifecycle, runbook, state-machine, or PII/data-lineage diagrams.
    • Use the compatible HTML workflow route when Mermaid is unavailable or browser-specific lane/style delivery is required for process maps, approvals, automation runs, exception paths, and cyclical operating flows that need readable start/end, decision, actor, numbered-step, and summary treatment without requiring diagrams.net.
    • Use themed HTML technical diagrams when a system, agent, memory, data, or tool-call map needs semantic node shapes, flow-aware arrows, and a browser-ready source that can still be exported and QA-checked.
    • Use the interactive live diagram route when the user benefits from watching nodes and edges appear incrementally in a local browser, or when they want to drag, relabel, remove, zoom, and export a quick diagram during the session.
    • When aesthetics, texture, photos, illustrations, comics, product images or brand atmosphere are priorities, use image generation or editing tools, and then save the final assets to the project or report directory.
  2. Clarify inputs and constraints

    • Collect audience, purpose, dimensions, language, required text, branding restrictions, editable source format, export format, and disabled elements.
    • For posters, UI mockups, brand boards and product images, first write a line of visual reading: target users, scenarios, sources of credibility, and main visual anchors.
  3. Select Generate Route

    • ER diagrams, UML class diagrams, sequence diagrams, technical architecture diagrams, ML/deep learning, flow charts, etc., give priority to creating structured sources according to diagram-workflows.md.
    • For themed browser-ready system blueprints, architecture, workflow, sequence, data-flow and lifecycle diagrams, read html-technical-diagrams.md, then render JSON IR with tech-diagram-render.mjs. For process workflows, model participants as lanes, ordered actions as nodes, and exception or loop paths as edges with optional waypoints:
      node skills/fec-image-generation/scripts/tech-diagram-render.mjs --input diagram.json --output diagram.html --type architecture --manifest diagram.layout.json
      
    • For agent and memory diagrams, prefer architecture IR with semantic node types such as agent, model, memory, vectorstore, graphdb, tool, document, queue, browser, user, and gateway. Add connection flow values (control, data, read, write, async, feedback) when arrow meaning matters; two or more flow types produce an automatic flow legend.
    • Use optional visual.style for source-owned theme direction: default, terminal, blueprint, minimal, glass, warm, openai, or editorial-dark. Treat these as delivery themes, not brand guarantees.
    • When README-friendly SVG, PNG, JPG, or JPEG artifacts are needed from generated HTML/SVG sources, export with export-diagram.mjs:
      node skills/fec-image-generation/scripts/export-diagram.mjs --input diagram.html --format svg
      node skills/fec-image-generation/scripts/export-diagram.mjs --input diagram.html --format png --output diagram.png --scale 2
      
    • For live interactive sketches, start interactive-diagram-server.mjs, open the served interactive-diagram.html page with a unique ?s=session-id, then POST small JSON commands to /cmd?s=session-id:
      node skills/fec-image-generation/scripts/interactive-diagram-server.mjs --port 6100
      curl -s "http://127.0.0.1:6100/cmd?s=checkout-flow" -d '{"cmd":"init","title":"Checkout Flow","direction":"TB"}'
      curl -s "http://127.0.0.1:6100/cmd?s=checkout-flow" -d '{"cmd":"node","id":"cart","label":"Review cart","type":"process"}'
      
    • Use the draw.io studio workflow instead when the priority is editable .drawio source, official diagrams.net shapes, or long-term manual editing.
    • Posters, UI mockups, product graphics, infographics, academic graphics, comics, avatars, storyboards, brand boards and image editing, press artifact-routing.md to choose generate, edit or hybrid routing.
  4. Export and self-check PNG

    • Read the exported PNG before each delivery to check whether the main body is truly rendered, whether the text is truncated, whether the connections are stacked, and whether the nodes overlap.
    • Run when there is a layout manifest:
      node skills/fec-image-generation/scripts/png-qa.mjs --png output.png --manifest layout.json --format markdown
      
    • Still running PNG basic checks without manifest:
      node skills/fec-image-generation/scripts/png-qa.mjs --png output.png --format json
      
  5. Automatic repair loop

    • Default maximum of 2 rounds; can be increased to a soft cap of 5 rounds when explicitly requested by the user.
    • The repair object is the source file, prompt, layout parameter or export size, and does not directly destructively modify PNG pixels.
    • Click png-qa-autofix.md to turn the problem into a specific fix: increase the canvas, wrap lines, move nodes, layer connections, adjust padding or re-export.
  6. Delivery records

    • Describe final source files, PNG paths, build routes, QA rounds, issues found and fixed, text or branding risks that still require manual confirmation.

Constraints

  • Text-intensive images should not be generated solely from bitmap models; editable structured sources must be retained.
  • HTML technical diagrams must keep the JSON source and generated HTML; exported PNG/SVG/JPG files are delivery artifacts, not the source of truth. Use .drawio instead when official vendor icons or long-term manual editing are the priority.
  • Themed semantic diagrams are implemented through the Frontend Craft renderer. Do not add Python, shell, cairosvg, rsvg-convert, Puppeteer, CDN capture libraries, copied SVG templates, or external icon packs as required dependencies for this route.
  • Interactive live diagrams are session-time previews. Save JSON/SVG/PNG exports when the diagram becomes a deliverable, and switch to HTML technical diagrams or .drawio when long-term source ownership matters.
  • Do not treat screenshots, fake data, or placeholder images as final product images unless the user explicitly requests a concept draft.
  • The original image is not directly overwritten; the editing workflow outputs a new file by default.
  • Readable labels, line attributions, legends, axes, and accessible alternative descriptions are not sacrificed for aesthetics.
  • PNG helper only does detection and suggestions; fixes must go back to source, prompt, or layout parameters.
  • Self-check results cannot replace manual confirmation of proper nouns, formulas, paper illustrations, brand specifications and compliance information.

Expected Output

Produce editable source, final PNG or edited image with generated routes and QA results. Diagrams should be clearly structured, with uncensored labels and uncluttered connections; visual assets should match purpose, size, brand tone, and delivery path.

Technical diagram quality and tool routing

Prefer locally installed Mermaid for standard sequence diagrams and flowcharts. Reuse fec-drawio-studio for architecture that needs long-term manual editing; local Graphviz is optional for dense topology. Record unavailable tools and fall back to the compatible JSON/HTML route without installation, downloads or CDN. Preserve complete text and every node/relationship; do not silently rearrange explicit sizes, coordinates or waypoints.

node skills/fec-image-generation/scripts/mermaid-render.mjs --input sequence.mmd --output sequence.svg --report sequence.render.json
node skills/fec-image-generation/scripts/export-diagram.mjs --input diagram.html --format png --output diagram.png --theme light --scale 2 --manifest diagram.layout.json --output-manifest diagram.actual.json
node skills/fec-image-generation/scripts/png-qa.mjs --png diagram.png --manifest diagram.actual.json --format json

Use the exported actual manifest for PNG QA. The source manifest has SVG coordinates and estimated bounds and cannot be reused unchanged at 2x. Browser export waits for fonts and measures real text bounds; standalone SVG embeds theme styles. Successful rendering, estimates and passing automation do not prove visual acceptance. Inspect the final PNG and record tool versions, theme, scale, repair rounds, unresolved issues and partial acceptance. Higher resolution cannot repair truncated text or layout collisions.

Bundled internal modules and reproducible fixtures:

The built-in sequence route supports participants and ordered messages. Use Mermaid for activations, alt/loop/par fragments and complex async semantics; never silently simplify them into plain messages. Enable optional ELK only when the installed Mermaid version supports it, otherwise use its compatible default layout.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

用于审查或改进前端无障碍、语义结构、键盘支持、焦点管理、ARIA 标签、屏幕阅读器行为、WCAG 2.2 问题、触控无障碍或辅助技术回归;中文触发词包括 无障碍、accessibility、a11y、WCAG、屏幕阅读器。

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

Use when reviewing or improving frontend accessibility, semantic structure, keyboard support, focus management, ARIA labels, screen reader behavior, WCAG 2.2 issues, touch accessibility, or assistive-technology regressions; Chinese triggers include accessibility, accessibility, a11y, WCAG, screen reader.

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

用于从参考系统中吸收想法、能力、工作流、架构、质量体系、生态扩展或工程实践,并通过原创的项目内重设计转化为当前项目能力,而不是复制原实现。

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

Use when absorbing ideas, capabilities, workflows, architecture, quality systems, ecosystem extensions, or engineering practices from any reference system into the current project through original, project-native redesign rather than copying.

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

Use when designing, implementing, or reviewing frontend-to-backend API integration, typed API clients, REST/tRPC/OpenAPI client choices, auth refresh, API error mapping, upload flows, SSE/WebSocket/polling choices, CORS-facing frontend behavior, or cross-boundary loading/error states. Do not use for backend-only service architecture or TanStack Query cache policy alone; Chinese triggers include API integration, front-end and back-end joint debugging, typed API client, Interface error handling, SSE, WebSocket.

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

用于设计、实现或审查前后端 API 集成、类型化 API client、REST/tRPC/OpenAPI 客户端选型、认证刷新、API 错误映射、上传流程、SSE/WebSocket/轮询选择、CORS 相关前端行为或跨边界 loading/error 状态。不要用于纯后端服务架构或仅 TanStack Query 缓存策略;中文触发词包括 API 集成、前后端联调、typed API client、接口错误处理、SSE、WebSocket。

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

bovinphang のスキルをすべて見る

このスキルの問題を報告する