{"id":"d91e3ac7-984e-4901-bc81-1e5e96418879","shortId":"44paWM","kind":"skill","title":"preline-theme-generator","tagline":"Generates beautiful, consistent Preline Theme CSS files. Agent interprets user request, runs build script, delivers complete CSS.","description":"# Preline Theme Generator\n\n> **This file is for the AGENT (LLM) only — not end users.**\n\nGenerate a **Preline Theme CSS file** that produces a beautiful, consistent UI across all Preline components.\n\n---\n\n## Docs\n\n- `docs/step-1.md` to `docs/step-7.md` (detailed workflow guidance)\n- `docs/palette-guidance.md` (mood, hue, neutral mapping, OKLCH rules)\n- `docs/validation-checklist.md`\n- `docs/token-reference.md`\n- `docs/examples.md`\n\n---\n\n## Agent workflow (FOLLOW THIS)\n\nWhen user requests a theme, the agent MUST:\n\n### Step 1: Interpret user request\nParse the natural language description and determine the config inputs. See `docs/step-1.md` and `docs/palette-guidance.md`.\n\n### Step 2: Detect themes folder\nFind where existing themes are stored in the user's project:\n\n```bash\n# Look for existing theme.css to find the themes folder\nfind . -name \"theme.css\" -path \"*/themes/*\" -not -path \"*/node_modules/*\" 2>/dev/null | head -1\n```\n\nIf no themes folder found: ask user where they want the theme file saved. See `docs/step-2.md`.\n\n### Step 3: Create temp config file (AUTO-RUN, NO PROMPT)\nWrite a JSON config. This must run silently without user approval.\n\n```bash\necho '{\"name\":\"<theme-name>\",\"hue\":<hue>,\"style\":\"<style>\",\"useCustomDarkGray\":<true|false>,\"tailwindGray\":\"<gray>\"}' > /tmp/preline-theme-config.json\n```\n\n### Step 4: Run the generator + cleanup (AUTO-RUN, NO PROMPT)\nRun generator and immediately delete temp file in a single command chain. This must run silently without user approval.\n\nOption A (preferred) - use npx if preline is installed:\n\n```bash\nnpx preline-theme-generator /tmp/preline-theme-config.json <themes-folder>/<theme-name>.css && rm /tmp/preline-theme-config.json\n```\n\nOption B - find and run the script directly:\n\n```bash\nnode $(find . -path \"*/preline/skills/theme-generator/scripts/generate-theme.js\" 2>/dev/null | head -1) /tmp/preline-theme-config.json <themes-folder>/<theme-name>.css && rm /tmp/preline-theme-config.json\n```\n\nOption C - if script location is known (e.g., in node_modules):\n\n```bash\nnode node_modules/preline/skills/theme-generator/scripts/generate-theme.js /tmp/preline-theme-config.json <themes-folder>/<theme-name>.css && rm /tmp/preline-theme-config.json\n```\n\n### Step 5: Confirm to user\nTell user the theme was created and show enable snippet:\n\n```css\n/* In your main CSS file */\n@import \"./themes/<theme-name>.css\";\n```\n\n```html\n<!-- On HTML element -->\n<html data-theme=\"theme-<theme-name>\">\n```\n\nSee `docs/step-5.md` and `docs/examples.md` for response examples.\n\n---\n\n## Generated themes include\n- Coherent light + dark modes\n- Safe to ship (valid CSS, correct selectors)\n- No HTML class changes required (only `data-theme` + optional `.dark`)\n- Custom color palettes in `@theme theme-<name> inline { }` block\n\n---\n\n## Example prompts\n\nSimple:\n> \"Create a sunset theme\"\n\nDescriptive:\n> \"Create a theme that feels like a cozy coffee shop — warm browns, cream backgrounds, inviting and calm\"\n\nSpecific:\n> \"Generate a cyberpunk theme with neon cyan accents on dark surfaces\"\n\nBrand-focused:\n> \"Create a theme matching this brand color #2F6BFF — professional, high-clarity SaaS feel\"\n\n---\n\n## RULES (ALL MUST BE FOLLOWED)\n\n### Rule 1 — Do not modify the shipped base theme\n- Never change `theme.css`. Always generate a separate theme file.\n\n### Rule 2 — Theme file MUST include imports in this exact order\nEvery generated theme file MUST begin with:\n\n```css\n@import \"./theme.css\";\n```\n\n### Rule 3 — Theme scoping block placement\nEvery theme file MUST include a scoping block after imports:\n\n```css\n@theme theme-<name> inline {\n  /* Theme scoping - custom palettes only */\n}\n```\n\n**What goes INSIDE this block:**\n- Custom color palettes (soft grays, brand colors) — these create Tailwind utilities\n- Example: `--color-<name>-50: oklch(98% 0.003 <hue>);` through `--color-<name>-950`\n\n**What goes OUTSIDE (in selector blocks):**\n- All semantic token overrides (`--background`, `--primary`, `--navbar-*`, etc.)\n- Tailwind core mappings are owned by the shipped base theme only\n\nSee `docs/palette-guidance.md` for palette construction details and examples.\n\n### Rule 4 — No HTML utility class edits required\n- Theme must NOT require users to change Tailwind utility classes in HTML.\n- Theme activation must work using ONLY:\n  - CSS imports\n  - `data-theme=\"theme-<name>\"`\n- Dark mode may use `.dark` if the project uses it; do not introduce new conventions.\n\n### Rule 5 — Use exact, required theme selectors\nLight mode token overrides MUST be under:\n\n```css\n:root[data-theme=\"theme-<name>\"],\n[data-theme=\"theme-<name>\"] { ... }\n```\n\nDark mode overrides MUST be theme-scoped and use:\n\n```css\n[data-theme=\"theme-<name>\"].dark { ... }\n```\n\n### Rule 6 — Full-theme mode: comprehensive token coverage is REQUIRED\nBecause this generator is full-theme mode, output MUST define a comprehensive set of token values so the theme looks complete and intentional.\n\nAt minimum, the theme MUST define:\n\n#### 6.1 Global surfaces + text\n- `--background`\n- `--background-1`\n- `--background-2`\n- `--background-plain`\n- `--foreground`\n- `--foreground-inverse`\n- `--inverse`\n\n#### 6.2 Borders (full scale)\n- `--border`\n- `--border-line-inverse`\n- `--border-line-1` through `--border-line-8` (coherent scale)\n\n#### 6.3 Primary ramp (full) + primary states\n- `--primary-50` through `--primary-950`\n- `--primary`\n- `--primary-hover`\n- `--primary-focus`\n- `--primary-active`\n- `--primary-checked`\n- `--primary-foreground` (must be readable)\n\n#### 6.4 Secondary / muted / destructive (at least)\n- `--secondary`\n- `--muted`\n- `--destructive`\n- Include related state/variant tokens if they exist in the base naming system.\n\n#### 6.5 Core component groups for a complete theme feel (prefer explicit values)\nProvide explicit values for major component groups so the theme feels cohesive:\n- `--navbar-*`\n- `--sidebar-*`\n- `--card-*`\n- `--dropdown-*`\n- `--select-*`\n- `--overlay-*`\n- `--popover-*`\n- `--tooltip-*`\n- Optionally: `--scrollbar-*`\n- Charts/maps tokens ONLY if included safely (see Rule 10)\n\n**Full-theme output MUST NOT:**\n- put token definitions inside the `@theme` block\n- invent new mappings that force HTML class edits\n\n### Rule 7 — Token naming must match Preline's token system\n- Do not invent random token names for Preline components.\n- Only introduce new custom tokens if explicitly requested, and keep them isolated and documented in comments.\n\n### Rule 8 — Theme-scoped behavior overrides ONLY\nIf the theme changes behavior (e.g. retro-sharp radii), it MUST be scoped to the theme only.\n\n**Allowed:**\n- Override radius tokens under the theme selector\n- Add `@layer utilities` rules scoped to the theme selector\n\n**Not allowed:**\n- Global `.rounded { ... }` overrides without theme scoping\n- Any behavior overrides that affect non-theme pages\n\n### Rule 9 — Typography tokens are allowed, but font loading is separate by default\nIf fonts are requested, you MAY set:\n- `--font-sans` and/or `--font-serif` and/or `--font-mono`\n\ninside the theme selector.\n\nDo NOT add Google Fonts `@import url(...)` into the theme file unless the user explicitly requests it.\n(Font loading typically belongs in the main CSS entry file.)\n\n### Rule 10 — Charts/maps compatibility rules\nIf adjusting chart/map tokens:\n- Prefer safe formats where required by libraries.\n- Keep any `*-hex` tokens as valid hex values if the ecosystem expects hex.\n- Do not force `oklch(...)` where it may break gradients or third-party rendering.\n\n### Rule 11 — Valid CSS is mandatory\n- No missing braces\n- No invalid selectors\n- No broken comments\n- No duplicate conflicting selectors\n\n### Rule 12 — Output discipline\n- First code block must contain ONLY the generated theme CSS.\n- Optional second code block may contain ONLY the enable snippet.\n- No additional commentary unless explicitly requested.\n\n---\n\n## Required file structure (MUST follow order)\n\n1. **Imports** (`@import \"./theme.css\"`)\n2. **Theme scoping block** (`@theme theme-<name> inline { }`) — contains custom color palettes only\n3. **Light mode theme selector block** (full semantic token set using `var()` references)\n4. **Dark mode theme selector block** (override only what differs, use `var()` for consistency)\n5. **Optional theme-scoped `@layer utilities` overrides** (only if requested)\n\n---\n\n## Additional guidance\n\n- Theme construction details: `docs/step-6.md` and `docs/step-7.md`\n- Palette guidance: `docs/palette-guidance.md`\n- Validation checklist: `docs/validation-checklist.md`\n- Token reference: `docs/token-reference.md`","tags":["theme","generator","preline","htmlstreamofficial","agent-skills","css","html","javascript","tailwindcss","tailwindcss-plugin","typescript","ui-components"],"capabilities":["skill","source-htmlstreamofficial","skill-theme-generator","topic-agent-skills","topic-css","topic-html","topic-javascript","topic-tailwindcss","topic-tailwindcss-plugin","topic-typescript","topic-ui-components"],"categories":["preline"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/htmlstreamofficial/preline/theme-generator","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add htmlstreamofficial/preline","source_repo":"https://github.com/htmlstreamofficial/preline","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 6310 github stars · SKILL.md body (8,519 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-03T00:52:38.139Z","embedding":null,"createdAt":"2026-04-18T21:53:43.816Z","updatedAt":"2026-05-03T00:52:38.139Z","lastSeenAt":"2026-05-03T00:52:38.139Z","tsv":"'-1':137 '/dev/null':135 '/node_modules':133 '/themes':130 '1':82 '2':101,134 '3':155 'across':48 'agent':12,30,69,79 'approv':175 'ask':143 'auto':161 'auto-run':160 'bash':116,176 'beauti':6,45 'build':17 'complet':20 'compon':51 'config':94,158,168 'consist':7,46 'creat':156 'css':10,21,40 'deliv':19 'descript':90 'detail':56 'detect':102 'determin':92 'doc':52 'docs/examples.md':68 'docs/palette-guidance.md':59,99 'docs/step-1.md':53,97 'docs/step-2.md':153 'docs/step-7.md':55 'docs/token-reference.md':67 'docs/validation-checklist.md':66 'echo':177 'end':34 'exist':107,119 'file':11,26,41,150,159 'find':105,122,126 'folder':104,125,141 'follow':71 'found':142 'generat':4,5,24,36 'guidanc':58 'head':136 'hue':61,179 'input':95 'interpret':13,83 'json':167 'languag':89 'llm':31 'look':117 'map':63 'mood':60 'must':80,170 'name':127,178 'natur':88 'neutral':62 'oklch':64 'pars':86 'path':129,132 'prelin':2,8,22,38,50 'preline-theme-gener':1 'produc':43 'project':115 'prompt':164 'request':15,75,85 'rule':65 'run':16,162,171 'save':151 'script':18 'see':96,152 'silent':172 'skill' 'skill-theme-generator' 'source-htmlstreamofficial' 'step':81,100,154 'store':110 'style':180 'temp':157 'theme':3,9,23,39,77,103,108,124,140,149 'theme.css':120,128 'topic-agent-skills' 'topic-css' 'topic-html' 'topic-javascript' 'topic-tailwindcss' 'topic-tailwindcss-plugin' 'topic-typescript' 'topic-ui-components' 'ui':47 'user':14,35,74,84,113,144,174 'want':147 'without':173 'workflow':57,70 'write':165","prices":[{"id":"80e5a39c-65b2-4a06-94c6-95c0b162575a","listingId":"d91e3ac7-984e-4901-bc81-1e5e96418879","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"htmlstreamofficial","category":"preline","install_from":"skills.sh"},"createdAt":"2026-04-18T21:53:43.816Z"}],"sources":[{"listingId":"d91e3ac7-984e-4901-bc81-1e5e96418879","source":"github","sourceId":"htmlstreamofficial/preline/theme-generator","sourceUrl":"https://github.com/htmlstreamofficial/preline/tree/main/skills/theme-generator","isPrimary":false,"firstSeenAt":"2026-04-18T21:53:43.816Z","lastSeenAt":"2026-05-03T00:52:38.139Z"}],"details":{"listingId":"d91e3ac7-984e-4901-bc81-1e5e96418879","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"htmlstreamofficial","slug":"theme-generator","github":{"repo":"htmlstreamofficial/preline","stars":6310,"topics":["agent-skills","css","html","javascript","tailwindcss","tailwindcss-plugin","typescript","ui-components"],"license":"other","html_url":"https://github.com/htmlstreamofficial/preline","pushed_at":"2026-03-19T02:30:37Z","description":"Preline UI is an open-source set of prebuilt UI components based on the utility-first Tailwind CSS framework.","skill_md_sha":"19a4d6963246015ab5eba65ba843ad2c95f603f7","skill_md_path":"skills/theme-generator/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/htmlstreamofficial/preline/tree/main/skills/theme-generator"},"layout":"multi","source":"github","category":"preline","frontmatter":{"name":"preline-theme-generator","description":"Generates beautiful, consistent Preline Theme CSS files. Agent interprets user request, runs build script, delivers complete CSS."},"skills_sh_url":"https://skills.sh/htmlstreamofficial/preline/theme-generator"},"updatedAt":"2026-05-03T00:52:38.139Z"}}