<!-- AANCER developer pages, part 8 of 16. All parts: https://aancer.ai/dev/llms.txt -->

## Install and test

### User skills

| Action | API | Permission |
|---|---|---|
| Create from JSON | `POST /api/skills?workspaceId=<ws>` with the JSON body, returns 201 | `skills.manage_own` |
| Upload SKILL.md or ZIP | `POST /api/skills?workspaceId=<ws>` as multipart: one file, optional field `scope=workspace`, at most 20 MB | `skills.manage_own` |
| List | `GET /api/skills?workspaceId=<ws>` returns items with `enabled`, `mandated`, `locked`. Admins add `&all=1` to see pack skills that are off | `chat.use` |
| Edit, delete | `PUT /api/skills/{id}`, `DELETE /api/skills/{id}` | `skills.manage_own` |
| Export | `GET /api/skills/{id}/export.zip?workspaceId=<ws>` | `chat.use` |
| Switch on or off for me | `PUT /api/me/skills/{id} {enabled, workspaceId}` | `chat.use` |

UI: **Library > Skills**.

```bash
curl -X POST "https://aancer.example.com/api/skills?workspaceId=ws-procurement" \
  -H "Authorization: Bearer $TOKEN" \
  -F "file=@SKILL.md" -F "scope=workspace"
```

### Pack skills

1. Sign, import and activate the pack. See [Packs](/developers/packs).
2. Enable the skill per workspace: `PUT /api/skills/{id}/workspaces {"workspaces": ["ws-procurement"]}`. The installed skill id is `pack:<packId>:<itemId>`.
3. Or mandate it: `PUT /api/skills/{id}/mandate {"workspaces": ["ws-procurement"], "alsoInAgents": true}`. A mandated skill applies to every chat in that workspace, and to agents when `alsoInAgents` is true.

Both need `skills.mandate` and admin rights in every changed workspace. Users cannot edit pack skills. A new pack version updates the content and keeps the enable and mandate choices. Retiring the pack removes the skill.

### Test it

Open a chat in the workspace and ask something that matches the description or a trigger phrase. If the answer does not follow the skill, make the description say more clearly when the skill applies, or mandate the skill in a test workspace to check the instructions on their own.

## Common errors

| Code | Message | Fix |
|---|---|---|
| `SKILL_INVALID` | the skill needs a name / the name is longer than 120 characters | |
| `SKILL_INVALID` | the skill needs a description / the description is longer than 1000 characters | For pack skills, count the `Use when:` text too |
| `SKILL_INVALID` | the skill has no instructions / the instructions are longer than 20000 characters | |
| `SKILL_INVALID` | invalid connector name: "..." / at most 20 connectors | Lower-case connector names, for example `google-drive` |
| `SKILL_INVALID` | SKILL.md must start with a front matter block between --- lines | |
| `SKILL_INVALID` | multi-line name is not supported; keep it on one line | |
| `SKILL_INVALID` | the ZIP has no SKILL.md at its root / file type not allowed / the ZIP is larger than 20 MB / the ZIP holds more than 200 files | |
| `SKILL_INVALID` | the skill was refused by content screening | Remove text that tries to override system rules or hide instructions |
| `SKILL_INVALID` | a workspace skill needs a workspace | Pass `workspaceId` |
| `SKILL_INVALID` | only skills installed from a pack are enabled per workspace | Use mandate, or ship the skill in a pack |
| `SKILL_NAME_TAKEN` | a skill named "..." already exists in this workspace | Names are unique per scope, ignoring case |
| `SKILL_MANDATE_LIMIT` | workspace ... already has 8 mandated skills | Remove a mandate first |
| `FORBIDDEN` | this skill is mandated in this workspace and cannot be switched off | |
| Pack import | `/items/<id>/spec: must NOT have additional properties` | Only the six fields in the table. There is no `files` field |

## Limits and editions

- Name 120 characters, description 1000, instructions 20,000. Up to 20 connectors and 10 triggers.
- ZIP upload: at most 20 MB and 200 files.
- The chat index shows up to 30 enabled skills. Up to 8 skills can be mandated per workspace.
- Skills are controlled by permissions: `skills.manage_own`, `skills.mandate`, `chat.use`.
- Check your edition on [aancer.ai/pricing](https://aancer.ai/pricing).


---

Source: https://aancer.ai/developers-themes

---
title: Themes and branding | AANCER Developers
description: Brand AANCER with a theme pack: colour tokens, fonts, logos, login page and e-mail colours, plus locale overlays that rename UI words.
---

## Themes

The look of AANCER is a set of design tokens such as `--bg`, `--ac` and `--t0`, defined for seven theme blocks: `light` (default), `dark`, `midnight`, `high-contrast`, `trust-authority`, `legal` and `terminal`. A **theme pack** is a signed pack with one `theme` item. It overrides those tokens and sets the platform name, tagline, fonts, logos, login page and e-mail colours. It is corporate identity as data: no code, no redeploy, nothing loaded from the internet. Fonts and logos ship inside the pack.

A theme can apply to the whole installation (including the login page and invitation e-mails) or to one workspace (the app shell only). A `locale` item in the same pack can rename UI words to match your organisation's vocabulary.

Without a pack, an administrator can set simple branding by hand under **Platform Settings > Branding**.

## Quick start

A theme with tokens only, no files. Use schema version 2.

```json
{
  "v": 2, "kind": "bundle", "id": "acme.ci", "version": "1.0.0", "title": "Acme corporate identity",
  "publisher": { "name": "Acme Example Ltd", "keyId": "pub-0123456789ab" },
  "requires": { "platform": ">=1.0.0" },
  "items": [
    {
      "kind": "theme", "schemaVersion": 2, "id": "acme-ci", "scope": "install",
      "spec": {
        "id": "acme-ci",
        "platformName": "Acme Cloud",
        "tagline": "Sovereign AI for Acme",
        "defaultTheme": "light",
        "typography": { "ui": "system-ui, sans-serif" },
        "themes": {
          "light": { "--bg": "#FAFAF7", "--s1": "#FAFAF7", "--s2": "#FFFFFF", "--t0": "#1B2430", "--ac": "#0F6E74", "--aci": "#FFFFFF", "--pr": "#0B1F3A" },
          "dark":  { "--bg": "#0E1420", "--s1": "#0E1420", "--s2": "#151C2A", "--t0": "#E9EDF3", "--ac": "#5CC6C9", "--aci": "#0B1F22" }
        },
        "login": { "backgroundColor": "#0B1F3A", "tagline": "Welcome to Acme Cloud", "legalFooter": "Acme Example Ltd" },
        "email": { "headerBackground": "#0B1F3A", "buttonColor": "#0F6E74" }
      }
    }
  ]
}
```

Keep the item `id` and `spec.id` equal.

## File layout

```text
acme-ci/
  manifest.json            # one theme item, "spec": {"$ref": "content/theme.json"}
  content/
    theme.json             # the theme document
    fonts/<name>.woff2     # woff2 only, at most 2 MiB each
    logos/<name>.png       # png, svg, jpg or ico, at most 2 MiB each
```

File names under `fonts/` and `logos/` use lower-case `[a-z0-9._-]` only. `aancer-pack sign` lists every file in `assets` with its hash.

## Field reference

JSON Schema: [theme.schema.json](https://aancer.ai/dev/schemas/theme.schema.json). The root is the version 2 theme. `$defs/themeV1` is the simple branding form and `$defs/locale` is the locale overlay.

### Theme item

| Field | Type | Required | Rules |
|---|---|---|---|
| `kind` | string | yes | `"theme"` |
| `schemaVersion` | integer | yes | `2`. Version `1` is the simple six-field branding form |
| `id` | string | yes | `^[a-z0-9][a-z0-9._-]{0,63}$`, equal to `spec.id` |
| `scope` | string | no | `install` (default) or `workspace`. One active theme per installation and one per workspace |
| `workspace` | string | if scope is `workspace` | a workspace id or `{{param.<id>}}` |
| `spec` | object | yes | the theme document, or `{"$ref": "content/theme.json"}` |

### Theme document (version 2)

| Field | Type | Required | Rules |
|---|---|---|---|
| `id` | string | yes | `^[a-z0-9][a-z0-9._-]{0,63}$` |
| `platformName` | string | yes | 1 to 64 characters. Replaces "AANCER" in the shell and on the login page |
| `tagline` | string | no | at most 120 characters |
| `defaultTheme` | string | no | the block a new user sees first: `light`, `dark`, `midnight`, `high-contrast`, `trust-authority`, `legal`, `terminal` |
| `fonts` | array | no | at most 12 font files |
| `fonts[].family` | string | yes | 1 to 64 characters, the name you use in `typography` |
| `fonts[].src` | string | yes | `content/fonts/<file>.woff2`, a real woff2 file |
| `fonts[].weight` | string | no | for example `"400"` or `"400 700"`. Default `"400"` |
| `fonts[].style` | string | no | `normal` or `italic` |
| `fonts[].display` | string | no | `swap` (default), `block`, `fallback`, `optional`, `auto` |
| `fonts[].unicodeRange` | string | no | at most 200 characters |
| `typography` | object | no | CSS font stacks: `ui`, `mono`, `display`, `label`, each at most 200 characters |
| `logos` | object | no | `light`, `dark`, `monochrome`, `favicon`, `emailHeader`. Each a path under `content/logos/` |
| `themes` | object | yes | keys are theme block ids; `light` is required. Each block maps token to value |
| `login` | object | no | `backgroundColor`, `backgroundImage` (path under `content/logos/`), `tagline` (120), `legalFooter` (500). Install scope only |
| `email` | object | no | `headerBackground`, `bodyBackground`, `textColor`, `buttonColor`, each a colour. Install scope only |

Every family in `typography` must be declared in `fonts` or be a generic family such as `system-ui`, `sans-serif`, `serif`, `monospace`, `ui-monospace`, `ui-sans-serif`, `-apple-system`, `'segoe ui'`, `roboto`, `'helvetica neue'`, `arial`, `menlo` or `consolas`.

Colour values: `#rgb`, `#rrggbb`, `rgb(r,g,b)` or `rgba(r,g,b,a)` with `a` written as `0`, `1` or a decimal such as `0.3` or `.3`. No `var()`, `hsl()` or colour names. `--shadow-card` takes free CSS of at most 200 characters.

The theme document must not contain `http:`, `https:`, `//`, `data:` or `url(` anywhere. This includes text fields such as the tagline and the legal footer. Ship files in `content/` instead.

SVG logos must not contain `<script`, event handler attributes, `<foreignObject` or references to external resources.

### Tokens you can set

| Token | Paints |
|---|---|
| `--bg` | page background |
| `--s0` to `--s4` | surfaces, lowest to highest |
| `--t0`, `--t1`, `--t2` | text: headings, body, muted |
| `--ac`, `--aci`, `--acs`, `--acb` | accent, text on accent, accent surface, accent border |
| `--pr`, `--prs`, `--prb` | primary buttons, surface, border |
| `--te`, `--tei`, `--tes`, `--teb` | success colours |
| `--am`, `--ams`, `--amb` | warning colours |
| `--re`, `--res`, `--reb` | danger colours |
| `--b`, `--bm`, `--bs` | borders: light, medium, strong |
| `--scrollbar` | scrollbar thumb |
| `--anchor`, `--anchor-raised`, `--ink-on-anchor`, `--ink-on-anchor-dim` | the dark navigation rail and its text |
| `--shadow-card` | card shadow |

Fonts are set through `typography`, not tokens. Motion tokens cannot be changed.

### How blocks combine

Tokens you leave out keep the stock value. Your `light` block is applied over the stock light block. Every other block is the stock block, plus your accent colours (`--ac`, `--aci`, `--acs`, `--acb`, `--pr`, `--prs`, `--prb`), plus your own block for that id if you wrote one. The dark blocks (`dark`, `midnight`, `trust-authority`, `terminal`) take the accent from your `dark` block if it sets one. Otherwise AANCER brightens your light accent for dark backgrounds.

### Contrast checks

Every resolved block is checked:

- Text pairs warn below 4.5:1: `--t0` on `--bg`, `--t0` on `--s2`, `--t1` on `--s1`, `--t2` on `--s1`, `--aci` on `--ac`, `--tei` on `--te`, `--ink-on-anchor` on `--anchor`, `--ink-on-anchor-dim` on `--anchor`.
- Interface colours warn below 3:1: `--ac`, `--pr`, `--re`, `--am`, `--te` on `--s1`.
- Import is refused below 1.5:1 for `--t0` on `--bg`, `--t0` on `--s2`, `--aci` on `--ac` and `--ink-on-anchor` on `--anchor`.

### Simple branding (version 1)

| Field | Type | Required | Rules |
|---|---|---|---|
| `platformName` | string | no | 1 to 64 characters |
| `tagline` | string | no | at most 160 characters |
| `logoUrl`, `logoDarkUrl`, `faviconUrl` | string or null | no | a relative path served by the installation, such as `/branding/logo.png` |
| `primaryColor` | string | yes | `#rrggbb`, becomes the accent |
| `secondaryColor` | string | yes | `#rrggbb`, becomes the primary button colour |
| `loginBackgroundColor` | string or null | no | `#rrggbb` |
| `defaultTheme` | string | no | `light`, `dark`, `midnight`, `high-contrast` |

Use version 2 for new work.

### Locale overlay

A `locale` item renames UI strings: `{ "locale": "de", "keys": { "<UI key>": "<text>" } }`.

| Field | Rules |
|---|---|
| `locale` | `en`, `de`, `es` or `ar` |
| `keys` | 1 to 2000 entries. Each key must be an existing UI string key. Each value at most 500 characters |

Values cannot contain `<` or `>` or the names of third-party products. Keys starting with `_meta` are not overridable. Placeholders such as `{{count}}` must match the original string. A locale overlay applies to the whole installation: use install scope, one overlay per locale.

Next part: https://aancer.ai/dev/parts/pages/09-full-examples.md
