PTENES
MODULE 2.2

🎨 Setup flow, design system, and output

Now we move down to the part that turns into pixels. How the skill describes the palette, typography, twelve components, color-coded tags, visual effects, and JavaScript patterns—and how all of this condenses into a single HTML page that looks like a premium app.

6
Topics
50
Minutes
Inter.
Level
Practical
Type

A visual generation skill loads a built-in design system: color tokens, a type scale, and a component library. These three pillars combine to produce every block on the page. The diagram shows how the parts of the design system converge in the output.

Palette (:root) Typography Components Assembly blocks per trip ✨ visual effects ⚙️ JS + state HTML page

The embedded design system—illustrative. Effects and JS (cyan) are added during assembly.

Detailed content

1

🎨 The palette as CSS variables

The skill doesn’t say "use pretty colors." It embeds a block :root with named CSS variables: backgrounds, translucent surfaces, borders, and five accents with distinct meanings — blue (primary), orange (return/warning), green (confirmed), lavender (connection), and gold (event/VIP). Each accent has a matching "glow".

Real excerpt from the SKILL.md

:root {
  --bg: #06060a;               /* deep space black */
  --surface: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.07);
  --accent: #5ad1ff;          /* sky blue — primary */
  --orange: #ff7a59;          /* returns / warnings */
  --green:  #7dffaa;          /* confirmations / go */
  --purple: #c084fc;          /* transit / layovers */
  --gold:   #fbbf24;          /* events / VIP */
  --radius: 16px;
}

🎯 Why tokens, not loose colors

  • •Identity: every output looks the same, without Claude reinventing the palette.
  • •Meaning: color carries information (green = confirmed); it’s not just decoration.
  • •Theme: switching from light to dark is just rewriting the variables.

💡 Practical tip

In your skill, give the variables names semantic (--accent, --green), not color names (--blue1). A semantic name survives a palette change; a color name becomes a lie in the first revision.

:root
Core tokens.
5 accents
Each one makes sense.
Glow
A pair of each color.
Semantic
Name > value.
2

🔤 Typography and Scale

The skill defines an explicit type scale: Inter for text (weights 300–900), one font mono for timings and codes, and sizes by role — responsive hero via clamp(), section headings, body text, and uppercase labels with letter spacing.

✓ Good skill choices

  • ✓Mono for data: times and codes line up and stay readable.
  • ✓clamp() in the hero: fluid scaling without a media query.
  • ✓Uppercase labels + tracking: clear hierarchy for tags.

✗ What this prevents

  • ✗Random sizes with each generation.
  • ✗Misaligned times in a proportional font.
  • ✗A hero that overflows on mobile or disappears on desktop.

The scale, at a glance

Heroclamp(32px, 6vw, 50px) · 900
Section header16px · 800
Body12–13px
Labels / tags9–11px · uppercase

💡 Practical tip

Reserve the monospace font for data that align — hours, amounts, codes. It's a cheap trick that makes flight cards and budget tables look like a real product.

Inter
Text, 300–900.
Mono
Hours and codes.
clamp()
Fluid hero.
Scale
Paper defines the size.
3

🧱 The Component Library (12 blocks)

This is the largest section of the design system: twelve components, each described with its anatomy — what it contains, how it behaves on hover, when it expands. Hero, event banner, flight cards, day selector + schedule, hotel, pet care, SVG route map, stats bar, budget, checklists, navigation footer, and theme toggle.

A

Expandable flight cards

Component No. 3

Header with logo, number + route, and a colored tag (Leg 1/2/3, Transit, Return). When clicked, the body expands to show times, terminals, duration, aircraft, class, and booking code.

B

Day selector + schedule

Component No. 4

Day buttons in a horizontal scroll; the active one gets a green border. Clicking loads that day's timeline in a card below, with the time in mono and a description.

C

Interactive checklists

Component No. 10

Grouped by category (pre-flight, pet, return day). Each item toggles when clicked, with a progress bar and counter. State persists via localStorage.

📊 Why describe the anatomy

  • Each component becomes a finished item that Claude can build instead of improvising the layout from scratch.
  • Anatomy defines states (hover, expanded, active) — without it, interactivity disappears.
  • Reuse ensures that all the cards on the page behave the same way.

💡 Practical tip

Describe each component as "contains X, on hover does Y, on click does Z". This concise format gives Claude everything it needs to recreate the behavior without you pasting the entire CSS.

12 pieces
Library.
Anatomy
Contains + states.
Reuse
Same behavior.
Composition
Assemble > create.
4

🏷️ Color-coded tag system

The skill includes a table that maps meaning → color. The tags are uppercase pills with a translucent background in the corresponding color. It’s the “color-code everything” principle turned into a concrete rule: you can tell a flight’s status by its color alone, without reading the text.

The skill’s color map

Blue — outbound flight / primary
Green — confirmed / arrival
Orange — return / essential
Lavender — connection / transit
Gold — event / VIP
Gray — demo / placeholder

The anatomy of a tag

.tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 3px 8px;
  border-radius: 999px;   /* pílula */
}

💡 Practical tip

Lock in the meaning of the colors in the SKILL.md, not in your head. When the map is written down, every run uses the same color coding — and the page is scannable at a glance.

Fixed map
Meaning → color.
Bite-sized tips
Uppercase + tracking.
Scannable
Status without reading.
Principle
"Colour-code all."
5

✨ Visual Effects and the output example

The visual effects are what take the page out of the "document" zone: orbs (fixed radial blurs in the background), glassmorphism (backdrop-filter blur + inner border), shimmer in the banners, hover-lift in the cards and the contrail animated from the airplane. Below is a mockup of the result — an illustrative recreation, not a real screenshot.

travelwings-tokyo.html
7 days · 4 flights · 1 event

Tokyo 2026 ✈️

7
days
4
flights
2
events
1
hotel
NH204 · GRU → HND
ANA · May 18 · 01:20
Leg 1
Hotel Shibuya
check-in 15:00 · ref ABC123
Confirmed

Illustrative recreation of the output—not a real screenshot. Notice the color-coded tags and glassmorphism.

📊 What each effect delivers

  • Orbs: depth and atmosphere in the background, without competing with the content.
  • Glassmorphism: cards seem to float — the look of a modern app.
  • Hover-lift: tactile feedback; the user feels that the page responds.
  • Contrail: the playful detail that gives the brand personality.

💡 Practical tip

Effects are seasoning, not the main course. The skill describes a few well-defined ones. List only the effects that reinforce the brand — a page covered in animations gets tiring and looks amateurish.

Orbs
Atmosphere in the background.
Glass
Cards float.
Shimmer
Banner glow.
Contrail
Animated airplane.
6

⚙️ JavaScript and state persistence

The final piece of the design system is the JavaScript patterns. They turn the page from static to live: day-to-date switching with a data attribute, a flight accordion with a max-height transition, checklists that save in localStorage, a persisted theme toggle and automatically calculated progress bars.

The persistence pattern (essence)

// item da checklist salva estado por viagem
function toggle(item, tripKey) {
  item.classList.toggle('done');
  const done = [...document.querySelectorAll('.done')]
    .map(el => el.dataset.id);
  localStorage.setItem(tripKey, JSON.stringify(done));
  updateProgress();   // recalcula a barra
}
// ao abrir: restaura o que estava marcado
const saved = JSON.parse(localStorage.getItem(tripKey) || '[]');

✓ Patterns worth their weight in gold

  • ✓localStorage with a key per trip: multiple pages don't get in each other's way.
  • ✓Accordion using max-height: smooth transition without heavy JS.
  • ✓Automatic progress: based on the number of items checked, not fixed.

✗ Pitfalls

  • ✗Generic localStorage key that collides across trips.
  • ✗Forget to restore the state when opening the page.
  • ✗Depending on a framework for something vanilla can handle.

💡 Practical tip

Persisting state is what makes the user back to the page. A checklist that forgets what was checked off is useless. Whenever your skill generates something interactive, describe how the state is saved and restored.

localStorage
State persists.
Accordion
smooth max-height.
data-attr
Change of pace.
Vanilla
No framework.
✎

Hands-on exercises

1. Extract the design system

Choose a skill's palette (or one from an app you like) and write the block :root with semantic names. List 5 accents and what each one means.

2. Document a component

Choose a component for your future skill and describe it in the format "contains X · on hover Y · on click Z". Include the states (active, expanded, marked).

3. Create a runnable SKILL.md with a design system

Save as ~/.claude/skills/expense-report/SKILL.md, restart Claude Code and type /expense. The skill guides setup and generates HTML with an embedded design system and persistent state.

---
name: expense-report
description: Generates a self-contained HTML expense
  report with a built-in design system and saved
  state. Trigger on "/expense", "expense report",
  "log my expenses", "trip costs". Asks for the
  period, currency and categories BEFORE generating.
---

# Expense Report

## What This Skill Does
Generates a single self-contained HTML expense
report: a stats bar (total, count, avg), category
cards, an itemised table with mono-aligned values,
and a checklist of receipts that saves state. Looks
like an app, not a document.

## Setup Flow — CRITICAL
1. What period and currency?
2. Which categories? (travel, food, lodging, other)
3. Offer to read receipts from email/drive.
4. Confirm a summary, THEN generate.

## Design System
:root tokens — --bg, --surface, --accent (blue),
--green (paid), --orange (pending), --gold (flagged).
Inter for text, mono for amounts. Tags are uppercase
pills, colour-coded by status.

## Output Format
One HTML file. CSS in <style>, JS in <script>.
localStorage for the receipt checklist, keyed per
report. No external deps except Google Fonts.
Save as expense-{period}.html.

## Key Principles
1. Colour-code by payment status.
2. Mono-align all amounts.
3. Interactive > static (save receipt state).
4. One file, zero dependencies.

🎨 Module Summary

✓
Palette in tokens — :root with semantic names ensures consistent identity.
✓
Typography with scale — Inter + mono + clamp(); each role has its own size.
✓
Component library — 12 pieces with anatomy: Claude assembles, it doesn’t improvise.
✓
Color-coded tags + effects — fixed meaning for each color; restrained effects give it an app-like feel.
✓
Persistent JavaScript — localStorage and saved state: interactive beats static.

You completed Track 2! Next step:

Track 3 — Frontend & Generation Skills: live fixes in the browser and a complete funnel in one prompt.