genai-mesh-gradient
A research-informed GenAI visual-generation workflow. Translate user intent and design constraints into controllable mesh gradients; generate and refine mesh gradients for presentations, web backgrounds and brand visuals, with palette selection and brand-design guidance. Use editable Figma layers or SVG/code routes for sky-inspired, dreamlike, flower-inspired, diffuse, heightmap and multipoint effects, including reference reconstruction.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Check it deeper on your machine
It has changed since its scan on 11 Nov 2026.
As a Claude Code plugin, install it and then ask Claude Code:
/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/9929y/genai-mesh-gradient with scanskillsafety
Or from a terminal, clone it and run it:
git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/9929y/genai-mesh-gradient'
It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.
Badge for your README
Markdown
[](/listings/9929y--genai-mesh-gradient)HTML
<a href="/listings/9929y--genai-mesh-gradient"><img src="/api/listings/9929y--genai-mesh-gradient/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
Install the complete folder, including `SKILL.md`, `references/`, `scripts/` and `design/`. For Codex, a typical installation is:
git clone https://github.com/9929y/genai-mesh-gradient.git \ ~/.codex/skills/genai-mesh-gradient
Reload the client's skill list if needed. Other agents have their own loading conventions. Installing the files alone does not enable automatic invocation in every client or establish a Figma connection.
1. Provide the use case, size/aspect ratio, a reference or brand colors, the area reserved for content, and the required output format and editability. 2. If colors are undecided, compare a few palettes on the same composition before producing a larger set. 3. For native Figma output, connect a tool that can write to the canvas and specify the target file. The agent must check the connection's actual capabilities. 4. Review the result in its intended slide or page. Refine palette, distribution, fusion and contrast while preserving the chosen composition during color comparison.
Example request:
> Use $genai-mesh-gradient to create a 16:9 presentation-cover gradient. > Compare monochromatic, analogous and restrained contrasting palettes using > the same composition. Keep the left third quiet for a dark title. After I > choose a direction, build editable layers in my Figma file, inspect the result, > and explain how to change its colors and softness.
Previously published as **Mesh Gradient Generation** (`mesh-gradient-generation`). For an existing installation, rename its folder to `genai-mesh-gradient`, update its contents and saved prompts, then reload the client. The package supplies no automatic alias for the old invocation.
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
SKILL.md · Manifest · 200 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- ---
- name: genai-mesh-gradient
- description: A research-informed GenAI visual-generation workflow. Translate user intent and design constraints into controllable mesh gradients; generate and refine mesh gradients for presentations, web backgrounds and brand visuals, with palette selection and brand-design guidance. Use editable Figma layers or SVG/code routes for sky-inspired, dreamlike, flower-inspired, diffuse, heightmap and multipoint effects, including reference reconstruction.
- ---
- # GenAI Mesh Gradient
- A research-informed agent skill for controllable visual generation. The workflow connects
- user input, explicit design constraints and feedback to editable visual output.
- Read the English-first README for the two related papers and the precise connection.
- This package supplies agent instructions and procedural renderers; it does not
- implement or reproduce the papers' trained diffusion models. Do not present
- their reported metrics as results for this skill or infer sole invention from
- coauthorship. Use an external image-generation tool only when the task calls for
- model-generated pixels and label that output accurately.
- Turn a visual reference into an explicit recipe, render it in a suitable tool,
- inspect the result, and adjust the parameter responsible for the mismatch.
- Prefer an editable construction when the user needs to keep designing.
- This skill supplies design decisions and small rendering helpers. It does not
- install an app, establish a Figma connection, or grant file permissions.
- ## Start with the actual request
- Identify the reference or palette, intended use, dimensions, transparency,
- editability, and whether the user wants a still, ambient motion, or image reveal.
- Use provided context; ask only when a missing choice changes the outcome.
- If dimensions are unspecified, use a 1200 × 800 landscape study and say so.
- Read [art-direction.md](references/art-direction.md) for the intended use,
- palette selection, brand judgment and an editing process a non-specialist can
- follow. For a deck, design in its actual slide ratio with a quiet text zone.
- For a website, check mobile crop and text protection. Do not deliver an artwork
- that only looks good without its real foreground content.
- When color is undecided, offer a small comparison: monochromatic, analogous,
- and a restrained contrasting accent (or neutral-plus-accent for dense content).
- Use the same geometry and seed so the user is choosing color, not different
- compositions. Explain roles, a fitting use and a tradeoff; lock the selected
- palette before making a large batch. Do not overwrite supplied brand colors.
- Distinguish three tasks:
- - **Reconstruct:** preserve the reference's composition, color proportions,
- bright and dark masses, direction, and edge behavior. Do not replace these
- with a random attractive palette.
- - **Generate:** design a new composition from the requested palette and mood.
- Label it as an original study rather than an exact recreation.
- - **Image-derived abstraction:** extract color, connected regions, approximate
- coverage, position, luminance, and major structure before choosing a renderer.
- ## Choose a route by capability
- Read [adapters.md](references/adapters.md) for the selected tool only.
- | Need | Route | What stays editable |
- |---|---|---|
- | Figma still, color masses, soft topology | Native radial fills and optional vector shapes | Shape, fill, stop alpha, position, scale, stacking |
- | Portable still without a write connection | Layered SVG | Paths and gradient definitions in an SVG editor; import fidelity must be checked |
- | Warped flow, diffusion, paint simulation, continuous reveal | Canvas/WebGL or a tool with documented shader support | Parameters/code; an exported bitmap is flattened |
- | Model-generated material or complex illustration | Available image-generation tool | Usually pixels; never describe it as editable mesh geometry |
- Discover the actual connector tools before promising an action. A connection
- with only read tools cannot create native Figma layers. If a Figma write tool
- exists, use its current instructions and required session flow. Otherwise offer
- SVG or a runnable renderer, or explain the one missing connection. Do not
- silently substitute a bitmap for requested editable layers.
- ## Write a compact recipe before rendering
- Use normalized coordinates with the origin at the top left. Specify:
- ```text
- effect: sky-inspired | dreamlike | flower-inspired | diffuse | heightmap | multipoint
- optional browser study: atmospheric | fluid | pigment | oil | silhouette | petal
- canvas: width, height, opaque base or transparent
- palette: ordered colors with intended roles and rough area proportions
- regions: color, center(x,y), extent(rx,ry), direction, opacity, edge softness
- structure: bright/dark masses, silhouette or petal boundary if required
- material: grain scale/amount, optional warp, pooling or brush hierarchy
- seed: fixed for reproducible comparisons
- delivery: native Figma | layered SVG | rendered image | executable code
- ```
- Several disconnected regions may share one color. One average position per
- color loses a composition with the same hue in opposite corners.
- Region radii and alpha are not area coverage: overlap and stacking change the
- visible proportions. Inspect the composite before claiming a palette match.
- ## Build the still first
- For the Figma workflow, read [figma-recipes.md](references/figma-recipes.md):
- Sky-inspired, Dreamlike, Flower-inspired, Diffuse, Heightmap, and Multipoint.
- For matching an existing bitmap, also read the fitting and detail-calibration
- procedure there. These are distinct construction choices, not six filters.
- Read [effects.md](references/effects.md) only for the related browser-rendering
- families (atmospheric, fluid, pigment, brush, silhouette and petal). Keep each
- visual grammar separate from presets such as pale, dark, or saturated. A
- fidelity level is a mode of an effect, not a new effect family.
- 1. Block the base and major color masses. Match composition and light/dark
- balance before adding texture.
- 2. Adjust overlap, asymmetry, edge softness, and local contrast. A few strong
- masses often work better than many weak ones.
- 3. Add only the material cues that distinguish the requested family. Keep
- fine grain separate from low-frequency boundary distortion.
- 4. Render at the intended dimensions. Inspect both the whole image and a
- detail crop at normal display scale.
- 5. Fix the dominant mismatch, keeping seed and unrelated parameters fixed.
- Stop when the reference/use-case criteria pass.
- ## Simplify the user's edits
- Expose a few meaningful choices first: use-case/quiet zone, palette, composition,
- fusion/softness and contrast. Keep per-layer controls available for refinement.
- Return `massNodes` from the native helper so later edits can target each group's
- transform and its separate color fill without changing the mask.
- For size, aspect ratio, palette sample recipes and blur, read
- [palettes-and-layout.md](references/palettes-and-layout.md). At a 1536×1024
- reference size, compare **100 / 150 / 200 px** for broad light fields. The current soft
- Flower uses **125–160 px** and **56–85% plane opacity**; the 40-level Heightmap uses **24–38 px**;
- scale a chosen radius by min(width,height)/1024 when resizing the canvas.
- Changing export scale alone does not require changing the layer radius again.
- Tune sample-specific values for edge fusion and contour identity; use broader diffusion only when it serves the composition;
- judge each layer rather than imposing one number. The Gaussian-mask method has
- no extra layer blur by default. For a different aspect ratio, recompose the
- centers and quiet zone, and define physical mass radii relative to the short
- side; do not nonuniformly stretch or assume a centered crop will work.
- Use `scripts/palette_studies.js` for the exact four-pool browser palette examples
- and three recomposed Gaussian-mask layout specs. These are original sample
- recipes, not automatic replicas of the six Figma studies. Inspect a selected
- sample in `design/illustrations/` when matching its appearance; a method label
- alone is not enough. The old radial `petal` SVG sketch is not the Flower target.
- For normal recoloring, edit the named color fills, preserve geometry, then
- inspect the composite. For layout, move/scale/rotate a whole mass group.
- Keep raster corrections off during substantial redesign.
- The current blue/orange gallery can be reconstructed with
- `scripts/blue_orange_studies.js`, inlined after `figma_native.js`; read the
- current construction table in `figma-recipes.md`. This six-study builder has
- been executed in live Figma and returns native artboard/layer IDs. Its paths
- use a 3:2 composition; recompose before adapting to a different ratio.
- Helpers:
- - `scripts/figma_native.js` defines `buildMesh(figma, spec)` for native Gaussian
- alpha-mask groups with separate solid color fills. Read the adapter first.
- It deliberately creates no texture,
- segmentation, mesh control-point grid, or animation.
- - `python3 scripts/render_svg.py --effect atmospheric --output study.svg`
- creates an original deterministic SVG study. Run `--help` for dimensions,
- seed, palette and texture options. It provides four schematic families;
- it does not analyze an input image or reproduce all six advanced effects.
- ## Diagnose instead of adding more blur
- | Symptom | Likely cause | First correction |
- |---|---|---|
- | Defocused photograph | Renderer still depends on fine source pixels | Rebuild from simplified regions; discard fine texture |
- | Muddy/gray mixture | Too much overlapping complementary pigment | Separate major masses; reduce broad alpha; restore a light or dark anchor |
- | Visible colored circles | Similar circular masses and isolated boundaries | Vary aspect/placement; overlap; use shaped vectors where contours matter |
- | Horizontal sunset bands | Centers aligned on rows | Change topology and direction, not just hue |
- | Texture covers everything | Grain too large or opaque | Lower amount; inspect at actual display size |
- | Petal looks like a flower icon | Perfect radial symmetry, central rosette | Enlarge/crop planes; use a curved shadow and transmitted light if the reference calls for it |
- | Dreamlike looks ornamental | Thin closed highlight loop replaces broad light | Remove the outline and restore unequal offset light/shadow regions |
- | Heightmap stays simple despite many layers | Repeated scaled outline, no saddles | Change the height field and inspect splits/merges before increasing levels |
- | Export differs from preview | Different dimensions, color/filter handling or pipeline | Render both through the same pipeline; check actual exported pixels |
- ## Add motion only when requested
- Read [motion.md](references/motion.md). Keep the still's settings independent
- from reveal progress and ambient time. Do not assume every effect should end
- at a photograph: use the user's requested endpoint.
- ## Deliver with evidence
- Return the usable artifact or Figma node link, route, effect and key adjustable
- parameters. State what is editable and which effects were approximated or
- rasterized. Confirm export dimensions, background/alpha and orientation.
- For a reference match, discuss composition/coverage/edges rather than claiming
- pixel identity without an image comparison.
- Keep original references unchanged. Do not publish private file links, local
- paths, personal conversation transcripts, or third-party reference images as
- part of a reusable recipe. Use original examples or licensed assets.
- ## Scope of evidence
- The Figma recipes are grounded in read-only inspection of existing native
- artwork and recovered historical construction records. The original chat UI
- could not be restored. Node structures and representative renders were checked;
- design intent and undocumented algorithms are identified as interpretations.
- Browser effect and motion guidance additionally synthesizes archived prototype
- notes. Parameter ranges are starting points. See `index.html` for validation
- status. Neither raw history nor private Figma file links are bundled.
README.md · README · 204 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- # GenAI Mesh Gradient
- **A research-informed agent skill for controllable visual generation.**
- Translate a visual brief into a clear recipe, generate mesh-gradient artwork,
- and refine it through feedback. The skill combines palette and composition
- guidance with editable Figma construction, layered SVG alternatives and output
- inspection. Use it for presentation covers, website heroes, thumbnails and
- consistent brand visuals.
- [Research connection](#research-connection) · [Install and use](#install-and-use) ·
- [For agents](#for-agents) · [Illustrated guide](index.html) · [中文简要说明](#中文简要说明)
- ## Samples
- Six native Figma studies, each **1536×1024 (3:2)**, share a blue, apricot and warm-white
- palette. The WebP images are flattened full-size previews; the recipes and builder describe
- their editable construction. These are the existing October 24 studies.
- | Sky-inspired | Dreamlike |
- |---|---|
- | <img src="design/illustrations/sky-blue-orange.webp" width="384" height="256" alt="Sky: blue and apricot"> | <img src="design/illustrations/dreamlike-blue-orange.webp" width="384" height="256" alt="Dreamlike: offset light and shadow"> |
- | Flower-inspired | Diffuse |
- | <img src="design/illustrations/flower-soft-blue-orange.webp" width="384" height="256" alt="Flower: cropped translucent planes"> | <img src="design/illustrations/diffuse-blue-orange.webp" width="384" height="256" alt="Diffuse: blue mist and warm paper"> |
- | Heightmap | Multipoint |
- | <img src="design/illustrations/heightmap-soft-blue-orange.webp" width="384" height="256" alt="Heightmap: peaks, saddles and ridges"> | <img src="design/illustrations/multipoint-blue-orange.webp" width="384" height="256" alt="Multipoint: eleven Gaussian fields"> |
- | Study | Native construction | Reference settings |
- |---|---|---|
- | Sky-inspired | Broad diagonal current; 3 curved planes + 2 light fields | 125–155 px blur |
- | Dreamlike | Unequal offset light and shadow; 2 planes + 4 fields | 120–165 px blur |
- | Flower-inspired | Magnified cropped petals; 4 translucent planes + 2 reflections | Plane opacity 56–85%; blur 125–160 px |
- | Diffuse | 1 curve + 3 broad radial fields | 155–185 px blur |
- | Heightmap | Warped field with peaks, valleys and saddles; marching-squares contours | 40 levels; blur 24–38 px |
- | Multipoint | 11 Gaussian alpha-mask groups with separate color fills | No extra layer blur |
- [Full recipes and controls](references/figma-recipes.md) ·
- [Six-study builder](scripts/blue_orange_studies.js) ·
- [Required native helper](scripts/figma_native.js)
- The builder runs inside a connected Figma execution tool. Heightmap exposes
- `detail`, `warp`, `levels`, `blurMin` and `blurMax`; valid ranges and examples
- are in the recipes. The guide also compares the same Sky at 100/150/200 px blur.
- Four browser palette studies keep the same composition and change only color
- roles. Exact colors, layer order and fade stops are in the
- [palette/layout recipes](references/palettes-and-layout.md).
- | Monochromatic | Analogous warm |
- |---|---|
- |  |  |
- | Apricot/cobalt | Neutral/accent |
- |  |  |
- ## Research connection
- Generative interface research asks how outputs can respond to user input,
- design rules and feedback. This skill applies those ideas at the workflow level:
- it converts an open-ended brief into an explicit recipe that an agent can
- execute, inspect and revise.
- For example, “make it softer and leave room for a title” becomes a protected
- text area, color roles, region positions, opacity and edge-softness settings.
- The agent selects a rendering route and adjusts the parameter responsible for
- the visible mismatch. The package's practical contribution is this reusable
- workflow, its editable construction recipes and its rendering helpers.
- | Research idea | Application in the skill | Inspectable implementation |
- |---|---|---|
- | User input as a generation condition | Specify purpose, palette, reference structure, size and editability | [Recipe and route selection](SKILL.md) |
- | Design knowledge as a constraint | Protect content areas; control color roles, composition and scale | [Art direction](references/art-direction.md) and [Figma recipes](references/figma-recipes.md) |
- | Feedback during refinement | Inspect actual output; adjust a relevant parameter; hold composition fixed for palette comparison | [Diagnosis workflow](SKILL.md#diagnose-instead-of-adding-more-blur) and [interactive guide](index.html#direction) |
- | Usable output beyond a preview | Preserve separate color/mask groups and expose node IDs for later edits | [Native helper](scripts/figma_native.js) and [study builder](scripts/blue_orange_studies.js) |
- Related research:
- - [*Automated UI Interface Generation via Diffusion Models: Enhancing Personalization and Efficiency*](https://arxiv.org/abs/2503.20229)
- (2025; public preprint submitted March 26). Discusses conditional inputs,
- design optimization and feedback in UI generation.
- - [*Generative Modeling of Human-Computer Interfaces with Diffusion Processes and Conditional Control*](https://arxiv.org/abs/2601.06823)
- (2026; public preprint submitted January 11). Discusses user intent, context
- and task constraints in conditional interface generation.
- The connection is between research ideas and the design workflow. The repository
- contains agent instructions and procedural Figma/SVG helpers, rather than the
- papers' trained diffusion models, weights or experimental reproduction. An
- external image-generation tool can be used for model-generated material; its
- output is usually pixels. The papers' results do not measure this package.
- Independent adoption, productivity gains and business outcomes have not been
- established for the skill.
- ## Install and use
- Install the complete folder, including `SKILL.md`, `references/`, `scripts/`
- and `design/`. For Codex, a typical installation is:
- ```sh
- git clone https://github.com/9929y/genai-mesh-gradient.git \
- ~/.codex/skills/genai-mesh-gradient
- ```
- Reload the client's skill list if needed. Other agents have their own loading
- conventions. Installing the files alone does not enable automatic invocation in
- every client or establish a Figma connection.
- 1. Provide the use case, size/aspect ratio, a reference or brand colors, the area
- reserved for content, and the required output format and editability.
- 2. If colors are undecided, compare a few palettes on the same composition before
- producing a larger set.
- 3. For native Figma output, connect a tool that can write to the canvas and specify
- the target file. The agent must check the connection's actual capabilities.
- 4. Review the result in its intended slide or page. Refine palette, distribution,
- fusion and contrast while preserving the chosen composition during color comparison.
- Example request:
- > Use $genai-mesh-gradient to create a 16:9 presentation-cover gradient.
- > Compare monochromatic, analogous and restrained contrasting palettes using
- > the same composition. Keep the left third quiet for a dark title. After I
- > choose a direction, build editable layers in my Figma file, inspect the result,
- > and explain how to change its colors and softness.
- Previously published as **Mesh Gradient Generation** (`mesh-gradient-generation`).
- For an existing installation, rename its folder to `genai-mesh-gradient`, update
- its contents and saved prompts, then reload the client. The package supplies no
- automatic alias for the old invocation.
- ## For agents
- When working in the repository, read [AGENTS.md](AGENTS.md), then
- [SKILL.md](SKILL.md). A skill loader normally loads `SKILL.md` directly.
- Read only the references required for the task:
- | Task | Read next |
- |---|---|
- | Choose use case, palette, brand direction or editing controls | [Art direction](references/art-direction.md) |
- | Adapt sample colors, aspect ratio or blur | [Palette/layout recipes](references/palettes-and-layout.md) |
- | Build the six native effects or reconstruct a reference | [Figma recipes](references/figma-recipes.md) |
- | Operate Figma, export SVG or select another renderer | [Tool adapters](references/adapters.md) and the connector's current instructions |
- | Explore fluid, pigment, oil/brush or silhouette rendering | [Related effects](references/effects.md) |
- | Add ambient motion or source-image reveal | [Motion guidance](references/motion.md) |
- Inspect the target tool and existing artwork before editing. Return the artifact
- or node link, adjustable controls, verification results and relevant limits.
- Repository instructions do not authorize changes to unrelated files.
- ### Included helpers and editing limits
- - `scripts/figma_native.js`: `buildMesh(figma, spec)` creates isolated native
- Gaussian-mask groups with separate color fills and returns their node IDs.
- Inline it into a supported Figma execution tool; it is not a standalone plugin.
- - `scripts/blue_orange_studies.js`: rebuilds the six native studies after
- `figma_native.js` is inlined. Supply a clear x/y position; optional `keys`
- selects studies and `heightmap` controls detail, warp, levels and blur.
- The builder was executed and visually inspected in live Figma. Its paths use
- a 3:2 composition; recompose when changing the aspect ratio.
- - `scripts/render_svg.py`: a Python 3 standard-library generator for four
- original schematic families. It does not segment an input image or reproduce
- every advanced effect.
- ```sh
- python3 scripts/render_svg.py --effect atmospheric --seed 17 \
- --width 1200 --height 800 --output study.svg
- ```
- - `scripts/palette_studies.js`: four palette previews and three recomposed
- layouts. `layoutSpec` converts short-side support radii to the native helper's
- per-axis units. Browser-layout parity with live Figma remains unverified.
- - `index.html`: the single illustrated guide, with English explanations and
- short Chinese notes, real Figma samples, the Sky blur comparison, palette
- controls and 16:9 / 1:1 / 9:16 layout studies. Download the **whole repository**
- and open it locally. Its controls do not sync edits to Figma.
- Native layers, imported SVG and flattened images have different editing limits.
- The package does not include automatic PPT creation, image segmentation or a
- complete shader/reveal engine. For broad light fields, compare 100/150/200 px
- at 1536×1024; Flower uses 125–160 px and 56–85% plane opacity, while Heightmap
- uses 24–38 px across 40 levels. Scale the chosen radius with the short side.
- Gaussian-mask masses use no extra layer blur by default. Recompose for a new
- aspect ratio. The legacy SVG `petal` sketch is not the Flower visual target.
- Recipes draw on inspected native artwork and recovered construction records.
- The six-study builder and mask helper have been run in Figma; browser layouts
- still need target calibration. See the guide for verification scope.
- ## 中文简要说明
- 这份 Skill 帮助 AI Agent 把用途、配色、构图和修改要求写成具体配方,再生成可编辑的
- Figma 图层或 SVG。适合 PPT 封面、网页主视觉、缩略图和品牌视觉。
- 方法与生成式界面研究中的“条件输入、设计约束、反馈修改”相连。当前实现是 Agent
- 指令与图形脚本;论文模型和实验结果不属于本包的实现或成绩。
- 安装时保留完整目录,用 `$genai-mesh-gradient` 调用。说明画幅、品牌色、文字位置和
- 可编辑要求;需要 Figma 原生图层时,先接通支持画布写入的工具。MCP 在这里是 Agent
- 读取和操作 Figma 的连接通道,安装 Skill 本身不会建立连接。
- 先固定构图比较配色,选定后再调整融合、对比与细节。六类样例、参数及操作说明见
- [同一份图解页](index.html)。原生图层、SVG 与位图的可编辑程度不同,交付前应核对。
- ## License
- [MIT](LICENSE). Independent community project; not affiliated with Figma or an
- image-generation provider.
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.