Skip to content
Back to skills

Design

BSecurity

Professional design system - illustrations, UI mockups, social graphics, brochures, logos, infographics, and image editing. Routes to optimal pipeline (HTML Studio for layouts, Replicate AI for creative imagery, PPTX for presentations). Use when user asks to design, create visuals, generate graphics, make a mockup, create a brochure, design a logo, build an infographic or social graphic, or edit an image. Do NOT use for simple one-off image generation (use /image generate instead).

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 17, 2026
ai-agentspythongobashgitapi

Works with

  • api
  • mcp

Security analysis

B88/100
  • criticalSends environment variables or credentials to an external URL

Pro scans all 3 files and shows the line behind each finding

Scanned November 17, 2026

npx -y skills add HEADING-OS-Official/heading-os --skill design --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Design?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Design
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/heading-os-official-design/badge)](https://www.skillsdirectory.com/skills/heading-os-official-design)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: design
description: Professional design system - illustrations, UI mockups, social graphics, brochures, logos, infographics, and image editing. Routes to optimal pipeline (HTML Studio for layouts, Replicate AI for creative imagery, PPTX for presentations). Use when user asks to design, create visuals, generate graphics, make a mockup, create a brochure, design a logo, build an infographic or social graphic, or edit an image. Do NOT use for simple one-off image generation (use /image generate instead).
argument-hint: "[type] [brief]"
allowed-tools: "Read, Write, Edit, Bash(.venv/bin/python:*)"
model: sonnet
metadata:
  author: Misha Hanin
  email: misha.hanin@headingos.com
  version: "1.0"
x-heading-capability:
  what: >
    Professional design studio for social graphics, infographics, UI mockups, cards, brochures,
    logos, and AI imagery. Routes each task to the optimal pipeline - HTML Studio (free, layout/text),
    Replicate AI (creative imagery, vectors), or PPTX (presentations).
  how: >
    Run /design <type> <brief> (e.g. /design infographic, /design logo, /design photo, /design edit).
    HTML renders land in design-output; AI images in generated-images.
  when: >
    Use for any branded visual asset. For a simple one-off image from a prompt use /image generate;
    for presentation slides use /pptx-generator.
x-heading-routing:
  category: Design
  triggers:
    - design social
    - design infographic
    - design mockup
    - design illustration
    - design logo
  exclusions:
    - Presentations -> /pptx-generator
    - image from prompt -> /image generate
  router: auto
---
# Design System

Professional design studio with three rendering pipelines: HTML Studio (free, deterministic), Replicate AI (17 models), and Document Production (PPTX, PDF). Routes each task to the optimal pipeline automatically.

## Step 0: Read the visual design rule

Before you generate any visual, read `.claude/rules/visual-design-discipline.md` by path. Its path globs do not load it for this skill. Read the sections "The vocabulary of AI tells" and "Three reflexes no detector catches". Check the finished artifact against that table before you present it.

## Commands

| Command | Pipeline | Description |
|---|---|---|
| `/design social [brief]` | HTML Studio | Social media graphic (LinkedIn, Twitter) |
| `/design infographic [brief]` | HTML Studio | Data visualization, infographic |
| `/design mockup [brief]` | HTML Studio | UI/UX mockup, app screen, dashboard |
| `/design card [brief]` | HTML Studio | Branded card, quote card, stat card |
| `/design illustration [brief]` | Replicate AI | Creative illustration, conceptual art |
| `/design photo [brief]` | Replicate AI | Photorealistic image, product shot |
| `/design logo [brief]` | Replicate AI (SVG) | Logo, icon, native vector graphic |
| `/design text-graphic [brief]` | Replicate AI | Graphic with embedded text (poster, banner) |
| `/design brochure [brief]` | HTML + Replicate | Layout from HTML, illustrations from AI |
| `/design edit [instruction]` | Replicate AI | Edit existing image via natural language |
| `/design upscale [path]` | Replicate AI | Upscale image for print quality |
| `/design remove-bg [path]` | Replicate AI | Remove background from image |
| `/design draft [brief]` | Replicate AI | Fast concept at $0.003 via FLUX Schnell |

## Routing Logic

### Pipeline 1: HTML Studio (free, $0)

**When:** Task is layout-driven, text-driven, or data-driven.

Routes: `social`, `infographic`, `mockup`, `card`, brochure layouts.

**Workflow:**

Resolve the data outputs dir before any Bash command. Renders are DATA artifacts and
must land in the DATA overlay, never the engine tree. The `data-path-redirect`
PreToolUse hook rewrites a bare data-relative path for the Write tool, but it does NOT
cover Bash. So the step-4 Write lands in the overlay. A bare data-relative path in step 5
resolves against the engine root, and writes the render into the public clone.

```bash
cd "$(git rev-parse --show-toplevel)"
DESIGN_DIR="$(.venv/bin/python scripts/data-path.py path design-output)"
IMAGES_DIR="$(.venv/bin/python scripts/data-path.py path generated-images)"
```

1. Generate a complete, self-contained HTML file with inline CSS
2. Read the brand CSS for the brand design system variables (see Brand CSS Reference). It is `references/brand.css` under `$(.venv/bin/python scripts/data-path.py path skill-brand-assets skill=design)` in the data repository.
3. Apply the brand design the brand kit defines (see Brand CSS Reference): its backgrounds, accent colors and typefaces. Set type through `var(--font-heading)` and `var(--font-body)`, never with the fallback face as the primary one.
4. Save the HTML with the Write tool to `"$DESIGN_DIR/source/{name}.html"`. Do NOT write a bare path under `outputs`. The redirect hook only PREFIXES the data root. The file would land in the tree the move emptied: private, but unfindable.
5. Run the renderer against the resolved absolute path:
```bash
.venv/bin/python scripts/design-studio.py render \
  --file "$DESIGN_DIR/source/{name}.html" \
  --width {W} --height {H} \
  --brand default \
  -o "$DESIGN_DIR/{name}.png"
```
6. Read the generated image to show the user
7. If user wants changes, edit the HTML and re-render

**HTML generation rules:**
- Self-contained: all CSS inline, no external dependencies except Google Fonts
- Use CSS custom properties from brand.css: `var(--accent)`, `var(--bg)`, `var(--text)`, etc.
- Use utility classes from brand.css: `.card`, `.container`, `.grid-2`, `.accent`, `.display`
- Dark backgrounds ONLY - never white or light
- Maximum 6 lines of text per visual
- 40% empty space (breathing room)
- One main message per visual

### Pipeline 2: Replicate AI (API-driven)

**When:** Task needs creative imagery, photography, vectors, or text rendered into images.

Routes: `illustration`, `photo`, `logo`, `text-graphic`, `draft`, `edit`, `upscale`, `remove-bg`.

**Model selection:**

| Task | Model | Command |
|---|---|---|
| Illustration, brand art | `recraft-v4` | `generate --model recraft-v4` |
| Photorealistic image | `flux-2-pro` | `generate --model flux-2-pro` |
| Logo / icon (vector SVG) | `recraft-v4-svg` | `generate --model recraft-v4-svg` |
| Graphic with text | `ideogram-v3` | `generate --model ideogram-v3` |
| Fast concept draft | `flux-schnell` | `generate --model flux-schnell` |
| Edit existing image | `kontext` | `edit --model kontext --image {path}` |
| Upscale for print | `crisp-upscale` | `upscale --image {path}` |
| Remove background | `eraser` | `remove-bg --image {path}` |

**Generation command.** The size flags differ by family, and passing the wrong
pair is not an error: the model never sees them. `design-engine.py` prints a
`[WARN]` naming every flag it did not send, so read that line.

| Family | Models | Size flags | Also accepts |
|---|---|---|---|
| recraft | `recraft-v4*` | `--width --height` | (nothing else) |
| ideogram | `ideogram-v3*` | `--width --height` | (nothing else) |
| flux | `flux-2-pro`, `flux-schnell` | `--aspect` | `--count --format --seed` |
| banana | `banana`, `banana-pro` | `--aspect` | `--count --format --seed` |

Resolve `$IMAGES_DIR` first, as in Pipeline 1. `design-engine.py` writes `-o`
literally relative to the current directory.

```bash
# recraft / ideogram
.venv/bin/python scripts/design-engine.py generate --model {model} --prompt "{prompt}" \
  --width {W} --height {H} -o "$IMAGES_DIR/{name}.png"

# flux / banana
.venv/bin/python scripts/design-engine.py generate --model {model} --prompt "{prompt}" \
  --aspect {W}:{H} -o "$IMAGES_DIR/{name}.png"
```

Omit `-o` and the engine names the file from the returned bytes, which is the
only place the real format is knowable. Its default directory resolves
`data_path('generated-images')`, so an omitted `-o` is also overlay-safe and
lands in the family home. Pass `-o` and the
engine keeps your name, then prints a `[WARN]` when the contents disagree with
the extension.

**Edit/upscale/remove-bg.** Every `{path}` and `{output}` below is an absolute
path under `$IMAGES_DIR`.

```bash
.venv/bin/python scripts/design-engine.py edit --model kontext --image {path} --prompt "{instruction}" -o {output}
.venv/bin/python scripts/design-engine.py upscale --image {path} -o {output}
.venv/bin/python scripts/design-engine.py remove-bg --image {path} -o {output}
```

**Brand-aware prompting for AI generation:**
When generating images for the brand, append one line to the prompt. Build it from the principles in `brand-system.md` and the palette in `brand.json` (see Brand CSS Reference). With no brand kit, add nothing and tell the operator that the image carries no brand.

### Pipeline 3: Document Production

**When:** Task is a presentation deck.

Redirect: "For presentation slides, use `/pptx-generator` directly - it has the full 16-layout system with brand styling."

For PDF from HTML, use the design studio. Both paths are absolute, under
`$DESIGN_DIR`:
```bash
.venv/bin/python scripts/design-studio.py pdf --file {html_path} --brand default -o {output}.pdf
```

## Standard Dimensions

| Format | Width | Height | Use Case |
|---|---|---|---|
| LinkedIn post | 1200 | 628 | Standard LinkedIn image |
| LinkedIn square | 1080 | 1080 | Carousel slide |
| Instagram | 1080 | 1080 | Square social |
| Instagram story | 1080 | 1920 | Vertical story |
| Twitter/X | 1200 | 675 | Twitter image |
| Presentation | 1920 | 1080 | 16:9 slide |
| A4 portrait | 2480 | 3508 | Print (300 dpi) |
| A4 landscape | 3508 | 2480 | Print landscape |

## Output Locations

Every asset lives under the DATA overlay. `$DESIGN_DIR` and `$IMAGES_DIR` below
are the values resolved in Pipeline 1. Never a path built on the literal
`outputs`, which the HEADING OS 2 move emptied:

- HTML Studio renders: `$DESIGN_DIR/{name}.png` + source `$DESIGN_DIR/source/{name}.html`
- AI-generated images: `$IMAGES_DIR/{name}.png` (consistent with /flux-image)
- Project work (brochures, campaigns): `$DESIGN_DIR/{project-name}/`
- Multi-format exports: `$DESIGN_DIR/{name}-{W}x{H}.png`

## Model Reference

Full model registry with capabilities, pricing, and prompt tips: [references/models.md](references/models.md)

## Brand CSS Reference

Brand content lives in the private data repository, never in the engine. Resolve the two skill halves once:

```bash
DESIGN_BRAND="$(.venv/bin/python scripts/data-path.py path skill-brand-assets skill=design)"
PPTX_BRAND="$(.venv/bin/python scripts/data-path.py path skill-brand-assets skill=pptx-generator)"
```

Injectable brand design system (the brand typefaces with a fallback stack, the theme, accent colors, utility classes): `$DESIGN_BRAND/references/brand.css`. `scripts/design-studio.py` injects it from there; with no data repository it renders unbranded and says so.

Source of truth for colors and fonts: `brand.json`. Source of truth for the brand's principles: `brand-system.md`. Both sit in the one brand directory under `$PPTX_BRAND/brands/` other than `template`, the empty starter.

## Voice and Style

- Hyphens only (never em-dashes)
- Product names spelled exactly as `.claude/rules/terminology.md` gives them
- The brand's own background rule, as `brand-system.md` states it
- Signal over noise - every element earns its place
- The brand principles in `brand-system.md`, applied as written

## Sensitive sessions (SENSITIVE_MODE)

Before sending any prompt or query to an external API (Replicate imagery, web
search/fetch for references), check session sensitivity:

```bash
.venv/bin/python -c "from scripts.utils.sensitive import is_sensitive, sanitize_prompt_guidance; print(sanitize_prompt_guidance()) if is_sensitive() else None"
```

It prints guidance when sensitivity is not explicitly cleared, which is the
fail-closed default. In that case strip ALL project-identifying detail from the
prompt and query before the call. Use no codenames, no company names, no people
names, no deal terms, and no strategic specifics. Use abstract, generic descriptions. The asset stays local; only the
query goes external. This replaces the removed `secure-design` vault wrapper.

## NEVER

- Never pass a bare cwd-relative data path to a Bash command; resolve `$DESIGN_DIR` / `$IMAGES_DIR` by name first
- Never use MCP servers for design work
- Never call external APIs besides Replicate, and web search/fetch for references (both after the sensitivity check above)
- Never hardcode API tokens in any file
- Never use a background the brand's `brand-system.md` rules out
- Never skip brand CSS injection for HTML Studio designs
- Never generate final images without confirming the brief first
- Never output more than needed - start with one variant, iterate

Files in this skill

  • SKILL.md12.4 KB
  • references/models.md7.5 KB
  • triggers.json769 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.