shadcn-reinstall

Reinstall shadcn/ui via the official CLI with confirmation-gated file changes.

Updated May 6, 2026
One-click install
npx skills add https://github.com/korwlik23/skills --skill shadcn-reinstall
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shadcn-reinstall
Source: https://github.com/korwlik23/skills/tree/main/v1/shadcn-reinstall
Command: npx skills add https://github.com/korwlik23/skills --skill shadcn-reinstall

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps you recover from risky shadcn/ui state drift by planning a safe reinstall path while preventing accidental loss of customized components and uncommitted changes.

Core Features & Use Cases

  • Confirmation-gated destructive changes: Detects the shadcn-owned surface and asks before deleting, overwriting, or reinitializing critical files.
  • Evidence-based shadcn reinstall workflow: Uses the official shadcn CLI flow (init/add) and keeps actions aligned with what the project actually contains.
  • Post-reinstall cleanup and optional refinements: Verifies via lint/typecheck/build when possible, and optionally splits cva() variants or renames the cn utility within a user-approved scope.
  • Use Case: Reinstall shadcn/ui after a botched upgrade, missing components, or regenerated utilities that broke imports in a React/Next frontend.

Quick Start

Ask an AI agent to run the shadcn-reinstall skill to audit your project, present a deletion/reinstall plan, then reinstall shadcn/ui safely using the official CLI and verify the result.

Frequently Asked Questions about shadcn-reinstall

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reinstall shadcn/ui without losing my customized React components?

To reinstall shadcn/ui safely, you must audit the project's git status and components.json to identify shadcn-owned files, then use confirmation gates before deleting and regenerating components via the official CLI. This prevents accidental loss of your customized UI files.

What is the best way to fix broken component imports after a shadcn/ui upgrade?

Fixing broken component imports after a shadcn/ui upgrade requires an evidence-based reinstall workflow that inspects your UI and utility paths, removes confirmed shadcn-generated files, and regenerates them using the official shadcn init and add CLI commands.

How do I reset my frontend UI when components.json is missing or wiped?

Resetting your frontend UI with a wiped components.json involves inspecting your project's actual file structure to find shadcn-owned surfaces, confirming the deletion scope, and reinitializing the shadcn configuration safely via the official CLI to restore your setup.

Can I safely rename the cn utility in my React project during a shadcn reset?

Yes, you can safely rename the cn utility during a shadcn reset by operating within a user-approved scope, ensuring the change is verified through lint, typecheck, and build processes to maintain correct component imports.

Does the shadcn reinstall process work with Next.js projects?

Yes, the shadcn reinstall process works with React and Next.js frontend projects, targeting environments that need a safe UI reset, cleanup, or correction after broken imports or utility namespace changes.

Why should I use a confirmation-gated workflow for shadcn dependency safety?

You should use a confirmation-gated workflow for shadcn dependency safety because it detects the shadcn-owned surface and explicitly asks before deleting, overwriting, or reinitializing critical files, preventing destructive unintended state drift.