/utility-add
Copy the bundled utilities.css and token-bridge.css into your React project. Auto-detects your styles directory and reports the recommended import order.
Syntax
Section titled “Syntax”/utility-add [--target=<dir>] [--families=<list>] [--no-bridge]Options
Section titled “Options”| Option | Default | Description |
|---|---|---|
--target=<dir> | Auto-detected | Override the destination directory |
--families=<list> | All families | Comma-separated list of family partials to include (e.g. color-bg,spacing,flex) |
--no-bridge | Bridge included | Skip copying token-bridge.css — use when the project ships its own theme without acss-kit |
Examples
Section titled “Examples”Full install (auto-detect directory):
/utility-addInstall to a custom directory:
/utility-add --target=app/styles/Install only specific families:
/utility-add --families=color-bg,color-text,spacing,flex,displayInstall without the token bridge (standalone use without acss-kit):
/utility-add --no-bridgeWorkflow
Section titled “Workflow”-
Detect styles directory — runs
detect_utility_target.py. Uses theutilitiesDirfrom.acss-target.jsonif present; falls back tosrc/styles/,src/css/,app/styles/, orstyles/in that order. Pass--target=<dir>to override. -
Detect build stack — runs
detect_stack.pyto classify framework and entrypoint. Result is merged into.acss-target.jsonunder astackkey. If acss-kit is not installed, this step is skipped with a warning. -
Copy files — copies the prebuilt
utilities.cssverbatim (or a filtered bundle when--families=is set) andtoken-bridge.css(unless--no-bridge) to the detected directory. -
Print import order — reports the required import sequence:
import "./styles/token-bridge.css"; // first — defines the aliasesimport "./styles/utilities.css"; // then — utility classes consume them -
Print summary — files written, total bundle size, families included.
-
Verify integration — runs
verify_integration.pyagainst the recorded entry point (skipped when acss-kit is absent). Missing imports are surfaced as a numbered fix-up list; the command never auto-edits your entry file.
Partial family install
Section titled “Partial family install”To install only the families you need (reduces bundle size):
/utility-add --families=color-bg,color-text,spacing,flex,displayThis generates a filtered utilities.css containing only the specified families, concatenated in canonical order. You can add more families later by re-running the command — the file is always regenerated from scratch.
Re-running safely
Section titled “Re-running safely”/utility-add always overwrites utilities.css and token-bridge.css. It is safe to re-run to pick up updated bundles after a plugin version update or after changing which families are included.
Related
Section titled “Related”/utility-bridge— regenerate the token bridge after a theme update/utility-list— browse families and classes/utility-tune— adjust spacing, breakpoints, or family settingsutilities skill— full skill reference