shadcn-errors-cli-sync-mismatch
Installation
SKILL.md
shadcn CLI Sync Mismatch : Recovering and Preventing Overwrite of Local Edits
shadcn copies component source into your repo. Once copied, the file
in components/ui/<name>.tsx is YOUR code. The CLI does NOT remember
that you edited it. Re-running shadcn add <name> --overwrite (or
running add <name> with -y and accepting the prompt) replaces the
file byte-for-byte with the current registry version. Local edits are
gone. There is no undo inside the CLI ; recovery is git-only.
This skill defines the diff-first workflow that prevents that loss, three resolution strategies for picking up upstream changes, and the custom-variants-in-a-separate-file pattern that makes re-adds safe.
Companion skills :
shadcn-core-cli: full reference for every CLI command and flagshadcn-impl-component-install: initial component installation flowshadcn-errors-styling-conflicts: when re-adds expose Tailwind class-order conflicts in your customizations