P
preline-theme-generator
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
- 01Preview, write, and validate themes
- 02Generate CSS with bundled local scripts
- 03Follow palette and output guidance
- 04Limit edits to the new theme file
- 05Check theme token coverage
Use cases
- 01Create a new color theme
- 02Generate a theme from a brand color
- 03Preview theme CSS before writing
- 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-generatorAfter installing, type/preline-theme-generatorin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
examples.mddocs/final-output-style.mdpalette-guidance.mdtoken-reference.mdvalidation-checklist.mdworkflow.mdscripts/find-themes-dir.jsgenerate-theme.jsrun-theme-generator.jsDetails
From the project READMEPreline 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.mdbefore writing a final theme file. - Read
docs/validation-checklist.mdbefore closing the task. - Read
examples.mdonly if the user wants stylistic guidance or sample outputs. - Read
docs/token-reference.mdonly 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
npxor any network-fetched package for this skill. - Never interpolate raw user text directly into shell commands.
- Never use broad
find .traversal for path discovery; usescripts/find-themes-dir.jsor a user-confirmed path. - Never write outside a confirmed theme directory.
- Use
scripts/run-theme-generator.jsas 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.mddocs/palette-guidance.mddocs/final-output-style.mddocs/validation-checklist.mdexamples.mddocs/token-reference.md
Comments
Markdown supported