turbo-add
Skill1 starsChanged 12 days agoMITView on GitHub
Turbo-themes uses a token-based theming system: theme definitions in src/themes/packs/ define color tokens, src/themes/registry.ts collects them, the build generates CSS from tokens, the theme-selector package provides UI components, and the site plus example projects consume the themes. Do NOT write theme packs from a template or trust a memorized file list. Instead: 1. Pick a reference theme and mirror its files: - Synced theme with npm package: src/themes/packs/catppuccin.synced.ts + scripts/sync-catppuccin.mjs - Synced theme: src/themes/packs/rose-pine.synced.ts - Manual theme with license/source metadata:…
In this repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- analyze-codeSkill
- analyze-projectSkill
- analyze-testsSkill
- audit-mergesSkill
- babysit-prSkill
- backlogSkill
- branchSkill
- coderabbitSkill
- commitSkill
- greptileSkill
- implement-issuesSkill
- issueSkill
- jiraSkill
- lintro-addSkill
- lintro-reviewSkill
- lintro-verifySkill
- lintSkill
- properizeSkill
- pr-raycastSkill
- prSkill
- raycastSkill
- rebaseSkill
- reconcileSkill
- scorecardSkill
- stand-ciSkill
- stand-generalSkill
- stand-odinSkill
- stand-pySkill
- stand-rustSkill
- stand-tsSkill
- sweep-prsSkill
- test-apiSkill
- test-shellSkill
- testSkill
- test-ui-qsfSkill
- test-uiSkill
- turbo-testSkill
- turbo-verifySkill
- which-prSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Do NOT write theme packs from a template or trust a memorized file list.
- Very specific: line 48
Verify with the current repo, not this skill: if a file in the grep output is generated (check for a "generated" header or a …
- Very specific: line 157
Tests fail on theme order: use data-theme-id attribute lookups, not array indices
- Very specific: line 164
Generated assets outdated: run bun run build and commit the generated files (theme-selector bundles, tokens.json in core/python/swift)
- Very specific: line 166
Type changes: if adding interfaces, update BOTH src/themes/types.ts AND packages/core/src/themes/types.ts — separate files kept in sync
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Adding a New Theme to Turbo-Themes
Turbo-themes uses a token-based theming system: theme definitions in
src/themes/packs/ define color tokens, src/themes/registry.ts collects them, the
build generates CSS from tokens, the theme-selector package provides UI components,
and the site plus example projects consume the themes.
Related Skills
stand-ts: TypeScript coding standardscommit: semantic commit format when committing changesturbo-verify: use after implementation to verify completeness
How to Implement: Copy a Reference, Discover the Touchpoints
Do NOT write theme packs from a template or trust a memorized file list. Instead:
- Pick a reference theme and mirror its files:
- Synced theme with npm package:
src/themes/packs/catppuccin.synced.ts+scripts/sync-catppuccin.mjs - Synced theme:
src/themes/packs/rose-pine.synced.ts - Manual theme with license/source metadata:
src/themes/packs/nord.ts - Manual theme:
src/themes/packs/bulma.ts,src/themes/packs/dracula.ts
- Synced theme with npm package:
Discover every touchpoint by grepping for an existing theme's variant id (pick one from
src/themes/registry.ts, e.g. a rose-pine or catppuccin variant):# Every file that mentions an existing variant — the new theme needs the # same touchpoints (packs, token JSON, icons, site data, examples, tests) rg -l 'rose-pine-moon' --hidden -g '!node_modules' -g '!dist' # Family-level touchpoints (type unions, family maps, vendor metadata) rg -l 'rose-pine' src/ packages/ apps/ scripts/- Also check root-level registrations the greps can miss because they do not
mention variant ids: the
theme:syncscript wiring inpackage.jsonand size limits intest/integration/bundle-size.test.ts. - Verify with the current repo, not this skill: if a file in the grep output is
generated (check for a "generated" header or a
build/theme:syncscript that writes it), update the source and rebuild instead of hand-editing.
Files to Create
scripts/sync-<theme>.mjs # Optional: sync from npm package
src/themes/packs/<theme>.synced.ts # Theme definitions (or <theme>.ts for manual)
schema/tokens/themes/<theme-id>.tokens.json # W3C Design Token file, one per variant
assets/img/<theme-id>.png # Theme icon, one per variant- Theme pack: copy the structure of the reference pack —
id,name,homepage,license(spdx/url/copyright),source(package/version/repository for synced themes), andflavorswith complete token groups (background,text,brand,state,border,accent,typography,content). Do NOT addiconUrlto flavors — icons resolve viaVENDOR_ICON_MAPin theme-mapper.ts. - W3C token files: mirror an existing file in
schema/tokens/themes/—$value/$typeformat,$schemapointing to../../turbo-themes.schema.json#/$defs/ThemeFile. - Icons: PNG per variant (typically 24x24), visually distinct for light/dark.
Sync Script Best Practices (if the theme has an npm palette package)
Copy scripts/sync-catppuccin.mjs and adapt. Key rules:
- Output path must be
src/themes/packs/— the registry imports from there, NOTpackages/core/src/themes/packs/. - Read the version from
node_modules/<pkg>/package.jsonand populatesource.versionfor traceability. - Normalize hex colors — source packages include
#inconsistently. - Deterministic ordering — sort variant keys for reproducible builds.
- Add the script to
theme:syncin package.json — the build pipeline must generate the file before TypeScript compilation.
Files to Update
Enumerate with the discovery greps above; the recurring touchpoints are:
src/themes/registry.ts— import the pack and spread its flavors intoallFlavorspackages/theme-selector/src/types.ts— add to theThemeFamilytype unionpackages/theme-selector/src/constants.ts— add toTHEME_FAMILIES(name + description)packages/theme-selector/src/theme-mapper.ts— add toVENDOR_FAMILY_MAP,VENDOR_ICON_MAP(string, or{light, dark}AppearanceIcons object when the family has both appearances), andFLAVOR_DESCRIPTIONSper variantapps/site/src/data/theme-meta.ts— single source of truth for the site: add tothemeGroups,themeNames(short dropdown labels), andthemeIcons.validThemeIdsis derived automatically;BaseLayout.astroandThemeDropdown.astroare data-driven from this file — no direct edits there.apps/site/src/pages/themes.astro— sidebar family section + JSthemeNamesapps/site/src/pages/index.astro— hero preview strip buttonsscripts/prepare-style-dictionary.mjs— add tovendorMeta(name + homepage)test/integration/bundle-size.test.ts— increase budget only if neededpackage.json— append sync script totheme:sync(if using one)
Example projects
Example files hardcode theme lists; discover the current set instead of assuming:
# Web examples with hardcoded theme arrays / dropdowns
rg -l 'VALID_THEMES|LIGHT_THEMES|lightThemes' examples/
rg -l 'THEMES' examples/stackblitz/react examples/stackblitz/vue
# Swift example touchpoints
rg -l 'ThemeId|ThemeDefinition' examples/swift-swiftui/In each hit, add the new variants everywhere an existing variant appears:
<select> options, VALID_THEMES/LIGHT_THEMES/THEMES arrays, Swift
ThemeId.swift enum cases, ThemeRegistry.swift ThemeDefinition palettes, and
ThemeRegistryTests.swift counts/labels. Files that import from
@lgtm-hq/turbo-themes-core/tokens (React hooks, Vue composables, Bootstrap
main.ts) auto-update — skip any file where the grep hit is an import, not a
hardcoded list.
Naming Conventions
- Theme ID: lowercase with hyphens (e.g.,
rose-pine-moon) - Variant label (token
labelfield): full display name including family (e.g., "Gruvbox Dark Hard") — match existing.tokens.jsonfiles - Short label (
themeNamesin theme-meta.ts): condensed dropdown label (e.g., "Dark Hard", "Moon") - Vendor / family: the theme family identifier (e.g.,
rose-pine)
Build and Test
uv run lintro chk # Lint
bun run build # Core build
bun run examples:build # Example projects
bun run test # Unit tests
bun run examples:test # Example E2E tests
cd apps/site && bun run build # Site build
cd apps/site && bun run dev # Visual checkTip: the turbo-test skill runs the full pipeline automatically.
Common Gotchas
- Theme reverts on navigation / wrong label / missing icon: variants missing
from
themeGroups/themeNames/themeIconsinapps/site/src/data/theme-meta.ts(the site is data-driven from this file — do not edit BaseLayout.astro for these) - Theme not in dropdown / wrong group:
VENDOR_FAMILY_MAPmissing or wrong - Tests fail on theme order: use
data-theme-idattribute lookups, not array indices - Bundle size test fails: increase the budget in bundle-size.test.ts
- CI
Cannot find module './packs/<theme>.synced.js': sync script missing fromtheme:syncin package.json - tokens.json shows wrong name/homepage: missing from
vendorMetain prepare-style-dictionary.mjs - Generated assets outdated: run
bun run buildand commit the generated files (theme-selector bundles, tokens.json in core/python/swift) - Type changes: if adding interfaces, update BOTH
src/themes/types.tsANDpackages/core/src/themes/types.ts— separate files kept in sync - Visual regression fails after hero changes: snapshots are generated on
Linux CI — run the
maintenance-generate-snapshots.ymlworkflow - Missing from examples: re-run the example discovery greps and diff the new theme's hits against an existing theme's hits
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

