agentleFS
a-ng-da-ng-d/claude-ui-color-palette/skills/ui-color-palette-generate-code/SKILL.md

ui-color-palette-generate-code

Skill1 starsChanged 7 months agoMITView on GitHub

Export palette configuration as code or design tokens via the generate_code MCP tool using base and themes. Supports CSS, SCSS, Less, Tailwind v3/v4, SwiftUI, UIKit, Compose, Android resources, DTCG, Style Dictionary, CSV, and more.

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 0 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use the ui-color-palette MCP tool generate_code to export palette configuration into the requested format.

    line 9
  2. Very specific:

    Reuse rule — Palette Inputs: If base and themes are already present in the conversation context, reuse them directly.

    line 13
  3. Very specific:

    Reuse rule — GeneratedCode: If code has already been generated for the requested format in this session, display it directly without …

    line 15
  4. Very specific:

    Ask which format (and colorSpace if applicable) if not already specified.

    line 53
  5. Very specific:

    Call generate_code with base, themes, and chosen parameters.

    line 55
  6. Very specific:

    Format hints: prefer tailwind-v4 over v3 for new projects — prefer dtcg-tokens for token interoperability.

    line 59

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Export Palette as Code

Use the ui-color-palette MCP tool generate_code to export palette configuration into the requested format.

generate_code now expects base and themes directly. A prior get_palette call is not required.

Reuse rule — Palette Inputs: If base and themes are already present in the conversation context, reuse them directly. Never regenerate the palette just to call generate_code.

Reuse rule — GeneratedCode: If code has already been generated for the requested format in this session, display it directly without calling generate_code again. Only regenerate if the user explicitly asks for a fresh export or changes a parameter (format, color space).


Tool — generate_code

ParameterTypeRequiredDescription
baseobjectYesBase palette configuration
themesarrayYesTheme configurations (light/dark or other modes)
formatenumNoOutput format (default: css)
colorSpaceenumNoColor space for output values (default: RGB)

format values

ValueDescriptioncolorSpace used?
cssCSS custom propertiesYes
scssSCSS variablesYes
lessLess variablesYes
tailwind-v3Tailwind CSS v3 configNo
tailwind-v4Tailwind CSS v4 @theme blockNo
swift-uiSwiftUI Color extensionsNo
ui-kitUIKit UIColor extensionsNo
composeJetpack Compose constantsNo
resourcesAndroid XML color resourcesNo
csvCSV spreadsheetNo
native-tokensNative JSON token formatNo
dtcg-tokensDTCG JSONYes
style-dictionary-v3Style Dictionary v3No
universal-jsonUniversal JSON flat key/valueNo

colorSpace applies only to css, scss, less, and dtcg-tokens. Values: RGB · LCH · OKLCH · LAB · OKLAB · HSL · HSLUV · HSV · CMYK · HEX · P3


Workflow

  1. Ask which format (and colorSpace if applicable) if not already specified.
  2. Confirm base and themes are available. If missing, ask for them or recover them from prior palette configuration context.
  3. Call generate_code with base, themes, and chosen parameters.
  4. Do not read or analyze the returned code. Present it directly in a fenced code block as returned by the tool. Do not parse, summarize, or reason over its content — the output can be very large.
  5. Offer to write it to a file or open a PR via gh-cli / gitlab-cli-skills.

Format hints: prefer tailwind-v4 over v3 for new projects — prefer dtcg-tokens for token interoperability.

Delegate this skill to palette-codegen for multi-format or normalized projection workflows.

  • palette-codegen — validates base and themes, selects the right projection, and generates code in the requested format

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.