htmlstreamofficial/preline / skills/theme-generator
preline-theme-generator
VerifiedGenerate, preview, save, or validate Preline theme CSS using the bundled local generator in this skill. Use when the user asks to create a new Preline theme, match a brand color, translate a mood into a theme, generate light and dark theme CSS, preview theme output without writing files, or review and fix generated theme tokens. Do not use for generic non-Preline CSS work or arbitrary command execution.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 2.4 KB |
| docs/final-output-style.md | markdown | 2.8 KB |
| docs/palette-guidance.md | markdown | 10.3 KB |
| docs/token-reference.md | markdown | 20.9 KB |
| docs/validation-checklist.md | markdown | 2.2 KB |
| docs/workflow.md | markdown | 5.8 KB |
| examples.md | markdown | 5.9 KB |
| scripts/find-themes-dir.js | script | 1.7 KB |
| scripts/generate-theme.js | script | 36.9 KB |
| scripts/run-theme-generator.js | script | 3.5 KB |
scripts/find-themes-dir.js
View on GitHub#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const TRUSTED_THEME_DIRS = [
'src/assets/css/themes',
'src/css/themes',
'src/styles/themes',
'assets/css/themes',
'styles/themes',
'dist/assets/css/themes',
'npm/preline/css/themes',
];
function parseArgs(argv) {
const options = {
all: false,
absolute: false,
cwd: process.cwd(),
};
for (let i = 0; i < argv.length; i += 1) {
const arg = argv[i];
if (arg === '--all') {
options.all = true;
continue;
}
if (arg === '--absolute') {
options.absolute = true;
continue;
}
if (arg === '--cwd') {
const value = argv[i + 1];
if (!value) {
throw new Error('Missing value for --cwd');
}
options.cwd = path.resolve(value);
i += 1;
continue;
}
if (arg === '--help') {
console.log(`Usage:
node scripts/find-themes-dir.js [--all] [--absolute] [--cwd <path>]
Checks a short allowlist of trusted Preline theme directories and prints matches.
`);
process.exit(0);
}
throw new Error(`Unknown argument: ${arg}`);
}
return options;
}
function hasBaseTheme(dir) {
return fs.existsSync(path.join(dir, 'theme.css'));
}
function main() {
const options = parseArgs(process.argv.slice(2));
const matches = TRUSTED_THEME_DIRS.map((relativeDir) => {
const absoluteDir = path.resolve(options.cwd, relativeDir);
return {
relativeDir,
absoluteDir,
};
}).filter(({ absoluteDir }) => hasBaseTheme(absoluteDir));
if (matches.length === 0) {
process.exit(1);
}
const output = options.all ? matches : [matches[0]];
output.forEach(({ relativeDir, absoluteDir }) => {
console.log(options.absolute ? absoluteDir : relativeDir);
});
}
try {
main();
} catch (error) {
console.error(error.message);
process.exit(1);
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |