---
name: sunao-skin
description: Create, edit, check and package skins for Sunao, the desktop player for Suno songs (macOS, Windows). Use when the user asks for a Sunao skin or theme, wants to restyle Sunao, or needs a skin fixed, validated or prepared for the Sunao skin gallery.
---

# Sunao skins

A Sunao skin is a folder of data: `skin.json` (identity and, optionally, a layout tree), `skin.css` (a
stylesheet applied on top of the app's), and assets (fonts, images, an icon). Never code: the app refuses
anything else. This skill tells you how to work and what makes a skin fail; `reference.md` next to this file
is the complete reference, `hooks.json` the list of classes the app guarantees.

## Design: start from an idea, never from an existing app

Without a skin, Sunao has a common streaming layout: a library on the left, the page in the middle, a player
bar at the bottom. A skin that only recolors it looks like every music app. Aim for a skin nobody could
mistake for another product.

- **Never imitate an existing product**: no look-alike of a streaming service, media player or app, no
  logos, trademarks or signature color schemes. If the user asks for a skin "like X", say that skins must be
  original, find out what they like about X (density, warmth, playfulness…) and express that in a new way.
- **Start from a concept that belongs to the user**: a mood, an era, a material, a place, an object, a music
  genre, an art movement, a memory. Ask for it. If they leave it open, propose three clearly different
  directions in two lines each (concept, palette, typography, layout idea) and let them choose.
- **Derive everything from the concept**: named colors and what each one does, typefaces (fonts can ship
  with the skin), shapes, density, motion, and the structure. The layout tree can rearrange or drop every
  part except `page`: one column, a stage for the song playing, a floating player, a compact strip, panels
  side by side or stacked… Choose the structure for the concept, not the default one.
- **Make one bold choice** and keep the rest quiet and consistent. Then challenge the result: if it could
  pass for a recolored music app, push further.
- **Don't reuse examples**: the snippets in `reference.md` show syntax, not a design to follow.

## Install

Save this file and the files next to it in a `sunao-skin/` folder among your skills:

- Claude Code: `~/.claude/skills/sunao-skin/` (or `.claude/skills/sunao-skin/` inside a project);
- Codex: `~/.codex/skills/sunao-skin/`;
- any other agent: wherever it keeps skills or standing instructions.

```sh
mkdir -p ~/.claude/skills/sunao-skin && cd ~/.claude/skills/sunao-skin && \
  curl -fsSLO https://sunao.theslumdogemillionaire.com/agents/sunao-skin/SKILL.md -O https://sunao.theslumdogemillionaire.com/agents/sunao-skin/reference.md \
  -O https://sunao.theslumdogemillionaire.com/agents/sunao-skin/hooks.json
```

The same files as one archive: https://sunao.theslumdogemillionaire.com/agents/sunao-skin.zip. Once installed, tell the user you're ready
and ask what skin they want.

## Hard rules: otherwise the skin is refused

- A `<id>/` folder with `skin.json`: `"id"` equal to the folder name (`a-z`, `0-9`, `-`, 2 to 41
  characters), `"name"`, `"version"` (for example `"1.0.0"`), `"api": 1`.
- `skin.css` without `@import`, without `url()` other than a relative path inside the skin's folder (no
  `http`, no `//`, no `/…`, no `..`, even encoded), without `image-set()`, `image()` or `src()`. Only
  `data:image/…` and `data:font/…` are allowed inline.
- Sizes: `skin.json` ≤ 64 KB, `skin.css` ≤ 1 MB; in the archive, 300 files and 25 MB at most.
- Allowed files: `.json .css .png .jpg .jpeg .webp .gif .svg .woff .woff2 .ttf .otf .txt .md .bmp`, and
  `LICENSE`, `README`, `NOTICE`, `OFL`. No symbolic links.
- `icon` (optional): relative path to a square PNG of 256 to 1024 px, 1 MB at most. It becomes the app's
  icon while the skin is active.
- `layout` (optional): only the parts and options listed in `reference.md` (Layout); exactly one `page`,
  at most one `topbar`, `library`, `panel`. Node classes: 4 at most, `a-z0-9-`.
- The ids of the skins shipped with the app (such as `suno`) are taken; the check below says so if yours is.
- To be published in the gallery: a `preview.png` thumbnail, 16:10 (640×400 is ideal), showing the app with
  the skin.

## Where to work

The user's skins folder (Sunao > Settings > Display > Skin > Choose a skin > Open the skins folder):

- macOS: `~/Library/Application Support/Sunao/skins/<id>/`
- Windows: `%APPDATA%\Sunao\skins\<id>\`
- Linux: `~/.config/Sunao/skins/<id>/`

Write the skin there directly. If a skin makes the app unusable, View > Back to the default skin (⌘⌥0 /
Ctrl Alt 0) always works: no stylesheet can hide it.

## Live preview in the running app

With Sunao open, write the skin's id into a file named `.preview` at the root of the skins folder:

```sh
printf 'my-skin' > ~/Library/Application\ Support/Sunao/skins/.preview      # macOS
```

The app applies the skin, then writes the outcome next to it:

- `.preview.json`: `{ "id", "ok", "at", "error" }`; `error` gives the reason when the skin is refused;
- `.preview.png`: a screenshot of the window with the skin (read it to see your work).

From then on, every save in the skin's folder reloads it in the app and updates both files. A save that
breaks a rule is refused: the app keeps showing the last valid version and `.preview.json` says why. Wait
about a second after a save before reading the result (compare its `at` with the time of your save). The
screenshot shows whatever page the user is on: ask them to open the views you need (a song page, the charts,
the full screen view…).

## Steps

1. **Read** `reference.md` (Layout and Stylesheet sections) and `hooks.json` (guaranteed classes, by area),
   for what is possible, not for what to make.
2. **Decide** with the user (see Design): the concept, then the direction they choose. Write it down as a
   comment at the top of `skin.css`: the concept in one sentence, 4 to 6 named colors and their roles, the
   typefaces, the layout idea, the one bold choice.
3. **Write** `skin.json` (with its layout tree if the structure changes, which is most of the time), then
   `skin.css`: set the app's tokens (see Stylesheet in `reference.md`), then restyle area by area, targeting
   only classes from `hooks.json` and your own (declared in `layout`). Tokens alone only recolor the default
   layout: go further.
4. **Check** with the gallery's rules, the app's exact rules plus the gallery's (zip the folder first):

   ```sh
   cd <skins folder> && zip -qr /tmp/<id>.zip <id> && \
     curl -sS --data-binary @/tmp/<id>.zip -H 'content-type: application/zip' https://sunao.theslumdogemillionaire.com/api/skins/check
   ```

   The answer is JSON: `ok`, `errors` (the skin would be refused), `warnings` (classes outside the contract,
   missing files, animations without a reduced-motion fallback). Fix every error; fix every warning or make
   it a deliberate choice. Messages from the app's rules are in French.
5. **Look**: live preview (above), then read `.preview.png` after each change. Ask the user to show the
   home page, a song page, the charts, the full screen view, the settings and the mini player; playing,
   paused and with nothing playing; the minimum window (960 × 640); Arabic (right to left, Settings >
   Interface language).
6. **Package**: `preview.png` is the gallery thumbnail, 16:10. Crop it from `.preview.png` (the window with
   the skin applied), for example to 1280 × 800, then zip the folder.
7. **Publish**, only if the user asks for it. Never ask for their password. Ask them for a publishing
   token: they create one on their account page (https://sunao.theslumdogemillionaire.com/en/account, "Tokens for AI agents"); keep it in
   an environment variable, never in a file of the skin. Show them the id, name and version you are about
   to publish and wait for an explicit yes, then:

   ```sh
   curl -sS --data-binary @/tmp/<id>.zip -H 'content-type: application/zip' \
     -H "authorization: Bearer $SUNAO_TOKEN" https://sunao.theslumdogemillionaire.com/api/skins
   ```

   The answer is JSON: `ok`, `url` (the skin's page), `version`, `warnings`, or `errors`. The same checks as
   the website apply: a skin belongs to whoever first published it, and a version can't be published twice
   (raise `version` in `skin.json` for an update). Without a token, the user publishes the zip themselves at
   https://sunao.theslumdogemillionaire.com/en/skins/new.

## Pitfalls already met

- **Your classes share the app's namespace.** A column named `rail` inherits the styles of the slider's
  `.rail` (4 px tall). Prefix your classes (`mk-…`) and check they aren't in `hooks.json`.
- **`grow` on a part inside a column** gives it `flex: 1 1 0`: with the parts' `min-height: 0`, it collapses
  to 0 px and its content spills over what follows. Only use `grow` on the intended axis, or force
  `flex: 0 0 auto` in the stylesheet.
- **`.part > *` has `flex: 1 1 auto; min-height: 0`**: a part's content can shrink below its size.
- **Order and specificity**: `skin.css` comes after the app's stylesheet; at equal specificity it wins. A
  `:not(.x)` counts the class `.x` in its specificity.
- **`display: contents`** removes the box: its window-drag area (`-webkit-app-region`) and its margins go
  away. Put `drag` on the parent and `no-drag` on everything clickable.
- **Title bar**: on macOS the traffic lights are on the left (x = 20, y = (height − 14) / 2), in Arabic too;
  on Windows the system buttons take ~140 px at the top right. Leave room with `.os-win32`, `.os-darwin` and
  `[dir=rtl]`.
- **Preact writes `title=""`** when the value is empty: `[title]` still matches. Write
  `[title]:not([title=""])`.
- **A CSS animation restarts every time an element starts matching its selector.** An animation on
  `.like.on` replays for every liked song when a list loads. For a click effect, tie it to `:focus`.
- **Content per language**: tie it to its state too. `html[lang=en] .x:has(input:placeholder-shown)::before`,
  not `html[lang=en] .x::before` (which still shows once the field is filled).
- **`direction: ltr` on a pseudo-element** flips its own `inset-inline-*`: use `left`/`right` and a
  `[dir=rtl]` rule.
- **A scrolling list clips what overflows it** (labels, bubbles). Use `position: fixed` with CSS anchor
  positioning (`anchor-name` on the hovered element, `position-anchor`, `anchor()`), supported by the app's
  Chromium.
- **Free translated labels**: `content: attr(aria-label)` shows an icon button's localized name. A skin
  can't translate: don't hard-code interface text, except with one rule per language.
- **Latin-only fonts**: plan a fallback for `html:is([lang=ru], [lang=ar], [lang=hi], [lang=bn], [lang=zh])`.
- **Grain and noise**: a PNG texture quickly looks dirty; look at it at 1× and 2× before keeping it.
- **Tabular figures** (`tabular-nums`): good in columns, too wide in a sentence.

## Structures to know

```
card           .card > .card-art > (img.cover | .cover.ph) + button.play-btn.float[.show]
                     + .card-title + .card-sub + .card-style
song row       .tracks > .tr.head, .tr[.cur] > .td.idx (.n | .eq, .row-play) + .td.title-cell
                     (.cover + .tt > a.t-title + .t-sub) + .td.num… + .like + duration
header         header.hero[.banner] > (.hero-cover | img.banner-img) + .hero-text
                     > .hero-kind + h1.hero-title[.mid] + .hero-meta (span, .sep)
actions        .actions > .play-btn (size in style), .icon-btn.like, .icon-btn.big, .ghost
top bar        header.topbar > .nav-btns (.nav-arrow) + .top-center (.home-btn, label.search-box > input,
                     .browse-btn) + .top-right (.bell > .top-icon, .account > .avatar-btn)
library        nav.sidebar[.folded] > .side-lib > .lib-head, .chips.lib-filters, .lib-tools, .side-lists
               as a rail: nav.sidebar.rail-lib > .side-lists > .lib-item[.on] > (art + .lib-name)
                     + .rail-sep ; button.rail-create
track part     .bar-left > (.bar-cover) + .tt > a.t-title + .t-sub + .t-style ; .like
panel          aside.right.view-<now|lyrics|queue|devices> > .right-head + .right-body
bar            footer.bar > .bar-left + .bar-center (.controls, .progress) + .bar-right
slider         .slider[--v] > .rail > (.buf + .fill) ; .knob
```

State hooks: `html[data-play]` (`playing`, `paused`, `idle`), `--cover` (the dominant color of the playing
song's cover as `r, g, b`, absent with no song: `rgba(var(--cover, 255, 106, 61), .2)`), `.main[data-view]`
(the page shown: `home`, `track`, `artist`…). See `reference.md` for the full list.

## What a careful skin looks like

- Every state: hover, press, visible keyboard focus, disabled; playing, paused, nothing playing; empty
  lists; long titles; right to left; minimum window and short window.
- An accent color that signals something (what's playing, what's active), not decoration.
- Readable contrast (body text ≥ 4.5:1 on its background).
- A consistent scale of radii and spacing; icon edges aligned with text edges.
- Nothing animating continuously outside playback; everything stops under `prefers-reduced-motion`.
- Say what you couldn't see (a real macOS or Windows window, a language you didn't check).
