agentleFS
dillonschultz93dillonschultz93/quieto-skills/design-token-migrate/SKILL.md

design-token-migrate

Skill1 starsChanged 7 months agoMITView on GitHub

Scan a codebase for hardcoded CSS values (hex colors, pixel dimensions) that match existing design tokens, and optionally apply exact-match replacements. Use when the user wants to migrate a codebase from hardcoded values to token references.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Verify a token system exists:

    line 12
  2. Very specific:

    If not found, tell the user to run /design-token-init first.

    line 18
  3. Distinctive:

    Ask the user which directory contains the stylesheets to scan.

    line 24
  4. Distinctive:

    Run the scan first (read-only, no file modifications):

    line 34
  5. Distinctive:

    If a report file was generated, read it:

    line 60
  6. Distinctive:

    Only proceed to apply if the user explicitly agrees.

    line 68
  7. Distinctive:

    After applying, help the user verify:

    line 90

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

Design Token Migrate

You are helping the user find and replace hardcoded values in their stylesheets with design token references.

Prerequisites

Verify a token system exists:

ls quieto.config.json tokens/

If not found, tell the user to run /design-token-init first.

Workflow

1. Identify the target directory

Ask the user which directory contains the stylesheets to scan. Common targets:

  • src/styles/
  • src/components/
  • src/
  • app/

The scanner looks at .css, .scss, .sass, .less, and .styl files. It automatically skips node_modules, dist, build, coverage, .next, and .nuxt.

2. Scan for hardcoded values

Run the scan first (read-only, no file modifications):

npx quieto-tokens migrate --scan <target-directory>

For example:

npx quieto-tokens migrate --scan src/styles

To save the report:

npx quieto-tokens migrate --scan src/styles --output migration-report.md

3. Review findings

Present the scan results to the user:

  • Total files scanned and how many contained matches
  • Match list: each match shows the file, line number, hardcoded value, suggested token replacement, and confidence level (exact or approximate)
  • Exact matches are safe to auto-replace; approximate matches need human review

If a report file was generated, read it:

cat migration-report.md

4. Apply replacements (with user consent)

Only proceed to apply if the user explicitly agrees. The apply mode modifies files in-place.

Important: The CLI checks for uncommitted git changes and warns the user. Recommend committing or stashing first:

git status

Then apply:

npx quieto-tokens migrate --apply <target-directory>

For example:

npx quieto-tokens migrate --apply src/styles --output migration-report.md

5. Verify changes

After applying, help the user verify:

git diff

Suggest running /design-token-audit to confirm the token system itself is still healthy, and running any project test suite or build to catch regressions.

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.