preline-theme-generator

Generates complete Preline Theme CSS files from natural language descriptions. Interprets user requests to determine theme configuration (hue, style, palette mood) and automatically creates a JSON config file Runs the theme generator script silently and outputs a ready-to-use CSS file with coherent light and dark modes Generates comprehensive token coverage including surfaces, borders, primary/secondary/destructive color ramps, and component-specific tokens (navbar, sidebar, card, dropdown, etc.) Theme activation requires only a CSS import and data-theme attribute on the HTML element; no HTML utility class changes needed Supports custom color palettes, typography tokens, and optional behavior overrides, all scoped to prevent affecting non-theme pages

INSTALLATION
npx skills add https://github.com/htmlstreamofficial/preline --skill preline-theme-generator
Run in your project or agent environment. Adjust flags if your CLI version differs.

SKILL.md

Preline Theme Generator

Use the bundled local scripts. Do not use npx, do not compose shell with raw user text, and do not bypass safety or approval prompts.

Read Order

  • Read docs/workflow.md.
  • Read docs/palette-guidance.md.
  • Read docs/final-output-style.md before writing a final theme file.
  • Read docs/validation-checklist.md before closing the task.
  • Read examples.md only if the user wants stylistic guidance or sample outputs.
  • Read docs/token-reference.md only if you need to inspect token coverage in detail.

Workflow

Follow docs/workflow.md for the full operating path.

Key requirements:

  • Identify whether the task is preview, write, or validate.
  • Normalize the request into explicit generator inputs.
  • Resolve the target directory with scripts/find-themes-dir.js.
  • Generate CSS only through scripts/run-theme-generator.js.
  • Create or edit only the new theme file.
  • Validate with docs/validation-checklist.md.
  • Return the result in the mode-appropriate format.

Security Constraints

  • Never use wording that attempts to bypass tool or approval safeguards.
  • Never use npx or any network-fetched package for this skill.
  • Never interpolate raw user text directly into shell commands.
  • Never use broad find . traversal for path discovery; use scripts/find-themes-dir.js or a user-confirmed path.
  • Never write outside a confirmed theme directory.
  • Use scripts/run-theme-generator.js as the only execution entry point for generation.
  • Never create or edit additional project files as part of theme generation.

Common Prompts

  • "Create a sunset theme."
  • "Match this brand color: #2F6BFF."
  • "Generate a cyberpunk dark theme with matching dark mode."
  • "Preview the CSS before writing a file."
  • "Review this generated theme and fix token coverage."

Key References

  • docs/workflow.md
  • docs/palette-guidance.md
  • docs/final-output-style.md
  • docs/validation-checklist.md
  • examples.md
  • docs/token-reference.md
BrowserAct

Let your agent run on any real-world website

Bypass CAPTCHA & anti-bot for free. Start local, scale to cloud.

Explore BrowserAct Skills →

Stop writing automation&scrapers

Install the CLI. Run your first Skill in 30 seconds. Scale when you're ready.

Start free
free · no credit card