compacto-ui

Search documentation

Jump to a page or a component.

Skills

Two Claude Code skills that keep a consuming repo's copies current. They live in skills/ in this repo and install into the consuming repo's .claude/skills/.

What they do

/cui-diff[item ...] [--ref <branch>] [--source <path>]

Read-only. Compares every copied component against public/r/ upstream and reports in sync, outdated (with a diff and whether the file has local edits), or not installed — plus local-only components and npm packages the outdated items need.

/cui-sync[item ...] [--all] [--force] [--ref <branch>] [--source <path>]

Rewrites outdated copies from upstream, pulls in any registryDependencies they now need, prints the install command for missing npm packages, and runs typecheck. Skips files with uncommitted local changes unless --force.

Install

Paste this into Claude Code inside the consuming repo. It fetches both skill files from this repository and writes them where Claude Code discovers project skills.

Install the compacto-ui skills into this repo. Fetch each URL with curl and write the body verbatim to the path shown, creating directories: https://raw.githubusercontent.com/sawissac/compacto-ui/main/skills/cui-diff/SKILL.md -> .claude/skills/cui-diff/SKILL.md https://raw.githubusercontent.com/sawissac/compacto-ui/main/skills/cui-sync/SKILL.md -> .claude/skills/cui-sync/SKILL.md Then run /cui-diff and show me the report.

Commit .claude/skills/ so every contributor gets the same two commands. Re-run the prompt to pick up a newer version of a skill.

Usage

/cui-diff
/cui-diff button dialog
/cui-sync
/cui-sync data-table --force
/cui-sync --source ../compacto-ui
  • /cui-sync with no arguments updates only items already installed — it never adds a component you did not ask for. Name an item to install it; --all bootstraps everything.
  • A file with uncommitted local changes is skipped and its diff against upstream printed. Commit or stash, then rerun — or rerun with --force to overwrite.
  • --ref pins a branch, tag or commit of compacto-ui; --source reads public/r/ from a local checkout instead of the network, for offline work or an unpushed branch.
  • Neither skill edits compacto-ui. If a local change should go upstream, that is a PR to this repo.

How they resolve files

  • The alias root comes from the consuming repo's tsconfig.json — compilerOptions.paths["@/*"], usually ./src/*. Every registry file path is joined onto it, so the skills need no configuration.
  • Comparison is byte-for-byte against files[].content in public/r/<name>.json — the same artifact an agent or the shadcn CLI copies. A formatting-only difference still counts as outdated; the report says when a diff is whitespace-only.
  • Both skills stop if the fetch fails. They never reconstruct a component from memory.