remove-files

Removes files and their related tests, styles, and references from a codebase.

Updated Oct 3, 2025
One-click install
npx skills add https://github.com/zunokit/zuno-marketplace-ui --skill remove-files-zunokit
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: remove-files
Source: https://github.com/zunokit/zuno-marketplace-ui/tree/main/.claude/skills/remove-files
Command: npx skills add https://github.com/zunokit/zuno-marketplace-ui --skill remove-files-zunokit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Deleting a file in a codebase often leaves behind orphaned tests, styles, mocks, broken imports, dead routes, and stale navigation links. This Skill safely removes a file or feature together with all its related files and cleans up every reference so the repository stays consistent. ## Core Features & Use Cases - Unused file cleanup (Option A): Detects files that are never imported and removes them along with related tests, stories, styles, snapshots, mocks, and fixtures. - User-requested feature removal (Option B): Removes a named file, route, or module even when it is in use, then updates imports, route constants, nav links, and copy that reference it. - Safe deletion workflow: Follows a defined deletion order (snapshots/mocks → tests/stories → main files → styles/types), skips files used by other features, and verifies with build, lint, and tests. - Use Case: You want to delete the wallets route from a Next.js app. The Skill removes the route directory, its tests and styles, deletes the ROUTES.WALLETS constant, removes sidebar links, and confirms the build still passes. ## Quick Start Ask the assistant to remove the wallets feature and all its related files, tests, and references from the project.

Frequently Asked Questions about remove-files

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

FAQPage Schema
How do I safely delete a file and its related files in a codebase?▼

Identify the candidate file, find related files sharing the same stem (tests, stories, styles, mocks, fixtures), verify they are not used elsewhere, then delete in safe order: snapshots and mocks first, then tests, the main file, and finally style and type files. Run build, lint, and tests afterward.

How to remove a feature or route and update all its references?▼

Remove the feature's files, then search the repo for imports, route constants like ROUTES.WALLETS, href and Link usages, and nav or menu entries pointing to it. Delete or rewrite each reference so no broken imports or dead links remain, then verify with build and tests.

How do I find unused files in a JavaScript or TypeScript project?▼

Search the workspace for imports, requires, and dynamic imports of the module path and filename. A file is unused if nothing references it and it is not an entry point like page.tsx or layout.tsx, an index re-export, or referenced in config such as tsconfig paths or tailwind content.

When should I not delete a file during dead code cleanup?▼

Do not delete entry points, public API re-exports, or files referenced by other features unless the user explicitly asked to remove that feature. If usage is ambiguous, check dynamic imports and config references, and ask the user before deleting.

What related files should be deleted along with a component?▼

Files sharing the same stem: stem.test or stem.spec files, stem.stories files, stem.module.css or scss styles, snapshots under __snapshots__, mocks under __mocks__, fixtures, and stem.types.ts or stem.d.ts files used only by that module.