本文へ移動
cccskills
無料GitHub で公開

add-theme-property

Checklist for adding or changing a field on ThemeConfig (a new design token, per-mode setting, or export option) end to end — schema, defaults, store + history, CSS apply, export, editor UI, AI, and tests. Use whenever ThemeConfig's shape changes.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md3.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Add a theme property: $ARGUMENTS

ThemeConfig is persisted in users' cookies, stored in saved presets, exported as JSON, generated by AI, and synced into the preview iframe. A change must work for all of them, including old data that lacks the new field.

Work through every step. Say explicitly when a step doesn't apply.

  1. Shared constants: if the property has a fixed value set (palettes, shades, fonts, ranges), add it to shared/constants/theme.ts so app, server, and AI prompt share it.
  2. Types + schema (app/types/theme.ts): add the field to ThemeConfig. In rawThemeSchema, make it .optional() and fill it in ThemeConfigSchema.transform() (usually mirroring the light-mode value for dark* fields). Existing cookies and presets must still parse.
  3. Defaults (app/utils/defaults.ts): add the value to DEFAULT_THEME (and to the light/dark override defaults if it's a token override).
  4. Presets (app/utils/presets.ts): built-in presets are full configs, so either add the field to each preset or rely on the schema transform, and make sure loadPreset still validates.
  5. Store (app/stores/theme.ts): add a setXForMode(mode, value) setter that mutates config.value then calls _pushHistory(). Continuous inputs (sliders, drags) also get a visual setter without history, committed once at the end. Add it to the returned API.
  6. Apply (app/composables/useThemeApply.ts → app/utils/cssGenerator.ts): semantic palette names go to appConfig.ui.colors; everything else is a CSS variable in :root / .dark. Output must still pass isCleanCSS; sanitize free-form values with sanitizeCSSValue.
  7. Export (app/composables/useThemeExport.ts, generateExportCSS): include the property in the CSS and app-config output where relevant (JSON export is automatic).
  8. Editor UI (app/components/editor/): a leaf control taking modelValue and emitting updates, wired in EditorPanel via useThemeModeAccessors so it edits the current color mode.
  9. AI: if the model should choose it, extend aiThemeSchema in server/api/ai/generate.post.ts, buildThemeConfig in server/utils/aiResponseBuilder.ts, and describe it in server/utils/aiSystemPrompt.ts (value lists come from shared constants).
  10. Docs: update app/data/help.md and any learn article describing the editor's controls.
  11. Tests:
    • tests/unit/types/theme.test.ts: the schema accepts old configs without the field and fills the default.
    • tests/unit/stores/theme.test.ts: the setter updates the right mode, pushes history, and undo/redo work.
    • tests/unit/utils/cssGenerator.test.ts / useThemeExport.test.ts: the variable/export output.
  12. Verify: /dev-workflow full, then check the preview updates live and survives a reload (/run-app).

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Add, update, or retire an AI provider model option for the BYOK theme generator (OpenAI, Anthropic, Google) and verify the provider requests native structured output for it. Use when model lists go stale or a new provider/model is requested.

日本語の概要は準備中です。原文の説明を表示しています。

mattycraig/nuxt-theme-builder92026年9月29日 更新

Add a new interactive design tool under /tools (like the color converter or contrast checker) — component, page, navigation, route lists, SEO, and tests. Use when building a new utility tool.

日本語の概要は準備中です。原文の説明を表示しています。

mattycraig/nuxt-theme-builder92026年9月29日 更新

Write and register a new Learning Hub article (Nuxt Content markdown under content/learn) with valid frontmatter, navigation entry, route list entry, and accurate product details. Use when adding or substantially rewriting a learn guide, reference, or tip.

日本語の概要は準備中です。原文の説明を表示しています。

mattycraig/nuxt-theme-builder92026年9月29日 更新

Add a new component showcase, block, or template preview page and register it everywhere it must appear (navigation, command palette, route lists, SEO, source view). Use when adding anything under /components, /blocks, or /templates.

日本語の概要は準備中です。原文の説明を表示しています。

mattycraig/nuxt-theme-builder92026年9月29日 更新

Audit websites for SEO, performance, security, technical, content, and 15 other issue cateories with 230+ rules using the squirrelscan CLI. Returns LLM-optimized reports with health scores, broken links, meta tag analysis, and actionable recommendations. Use to discover and asses website or webapp issues and health.

日本語の概要は準備中です。原文の説明を表示しています。

mattycraig/nuxt-theme-builder92026年9月29日 更新

Run the project's validation pipeline (lint → format → typecheck → unit tests) with auto-fixes, then optionally stage and write a Conventional Commit. Use before committing, when asked to "check", "validate", "run the workflow", or "get this commit-ready".

日本語の概要は準備中です。原文の説明を表示しています。

mattycraig/nuxt-theme-builder92026年9月29日 更新

mattycraig のスキルをすべて見る

このスキルの問題を報告する