mcpField
P
preline-theme-generator

preline-theme-generator

github.com/htmlstreamofficialDesign & UI6.5k1.3k installsUpdated 10w ago
Repository

About preline-theme-generator

Preline Theme Generator is a skill for creating and checking theme CSS in project workflows. It uses bundled local scripts and defines safeguards for file scope and generation steps.

Key features

  1. 01Preview, write, and validate themes
  2. 02Generate CSS with bundled local scripts
  3. 03Follow palette and output guidance
  4. 04Limit edits to the new theme file
  5. 05Check theme token coverage

Use cases

  1. 01Create a new color theme
  2. 02Generate a theme from a brand color
  3. 03Preview theme CSS before writing
  4. 04Review and fix token coverage

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/htmlstreamofficial/preline --skill preline-theme-generator

After installing, type/preline-theme-generatorin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

examples.md
docs/
final-output-style.md
palette-guidance.md
token-reference.md
validation-checklist.md
workflow.md
scripts/
find-themes-dir.js
generate-theme.js
run-theme-generator.js

Details

From the project README

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

  1. Read docs/workflow.md.
  2. Read docs/palette-guidance.md.
  3. Read docs/final-output-style.md before writing a final theme file.
  4. Read docs/validation-checklist.md before closing the task.
  5. Read examples.md only if the user wants stylistic guidance or sample outputs.
  6. 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:

  1. Identify whether the task is preview, write, or validate.
  2. Normalize the request into explicit generator inputs.
  3. Resolve the target directory with scripts/find-themes-dir.js.
  4. Generate CSS only through scripts/run-theme-generator.js.
  5. Create or edit only the new theme file.
  6. Validate with docs/validation-checklist.md.
  7. 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

Comments

Markdown supported