Claude Code is your intelligent coding assistant, designed to streamline your programming tasks with precision and speed. Enhance your coding efficiency and reduce errors with its advanced AI-driven capabilities.
npx skills add sh/agentsClaude Code is your intelligent coding assistant, designed to streamline your programming tasks with precision and speed. Enhance your coding efficiency and reduce errors with its advanced AI-driven capabilities.
1. **Set up your environment**: Ensure you have Node.js v16+ and npm/yarn installed. Clone your project repository locally. 2. **Run the analysis**: Execute the prompt in your terminal with your project directory path: `claude code "Use Claude Code to analyze [PROJECT_DIRECTORY] repository..."` 3. **Review the report**: The AI will generate a detailed dependency audit with removal candidates, impact estimates, and replacement suggestions. Save this as `dependency-audit-[DATE].md`. 4. **Implement changes**: Use the report to remove unused packages (`npm uninstall [package]`) and install recommended replacements. Always test after changes. 5. **Verify impact**: Run your build process before and after changes to measure actual bundle size and build time improvements. Use tools like `webpack-bundle-analyzer` for visual confirmation. **Pro Tips:** - For monorepos, specify the subdirectory (e.g., `packages/frontend`) - Include `--ignore="**/node_modules/**"` in your analysis scope if needed - For TypeScript projects, add type checking by including `tsc --noEmit` in the analysis
Code generation
Debugging assistance
Documentation creation
npx skills add sh/agentsgit clone https://github.com/sh/agentsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use Claude Code to analyze the [PROJECT_DIRECTORY] repository and identify all unused or redundant dependencies listed in package.json. Generate a detailed report with: 1) List of dependencies to remove, 2) Estimated savings in bundle size and build time, 3) Potential breaking changes for each removal, and 4) Recommended replacement packages if applicable. Focus on dependencies that haven't been imported in any JavaScript/TypeScript files in the last 6 months. [PROJECT_DIRECTORY]
### Dependency Audit Report for Acme Corp's React Dashboard **Generated:** 2023-11-15 | **Project:** react-dashboard-v2.1.0 **Analysis Scope:** All JS/TS files modified since 2023-05-15 #### 🗑️ Unused Dependencies (12 total) 1. **lodash@4.17.21** (1.2MB) - Last imported: 2022-11-03 (8+ months ago) - Potential savings: 1.2MB bundle reduction, 15% faster build time - Breaking changes: None (pure utility library) - Replacement: native ES6 methods (Array.prototype.flatMap, etc.) 2. **moment@2.29.4** (65KB) - Last imported: 2023-01-10 (10+ months ago) - Potential savings: 65KB, 8% faster build - Breaking changes: Date formatting may differ - Replacement: date-fns@2.30.0 (modern alternative) 3. **chart.js@3.9.1** (150KB) - Last imported: 2022-08-15 (15+ months ago) - Potential savings: 150KB, 22% faster build - Breaking changes: Complete API rewrite in v4 - Replacement: Recharts@2.8.0 (React-specific charts) #### ⚠️ Partially Used Dependencies (3 total) - **axios@1.6.0**: Only used in 2/15 API service files - **react-router-dom@6.14.2**: Only used in 3/20 components - **@testing-library/react@13.4.0**: Only used in 1/8 test files #### 📊 Impact Summary - **Total bundle reduction:** 2.1MB (18% of current bundle) - **Build time improvement:** 42% faster (from 4.2s to 2.4s) - **Security risk reduction:** 12 fewer dependencies to audit - **Maintenance effort:** 3 hours to implement changes #### 🚀 Recommended Next Steps 1. Run `npm uninstall lodash moment chart.js` 2. Install replacements: `npm install date-fns recharts` 3. Update import statements in affected files 4. Run full test suite and update snapshots 5. Deploy to staging for final validation **Note:** The analysis excluded devDependencies. Run `npm prune --production` after removing unused packages to clean up node_modules.
AI assistant built for thoughtful, nuanced conversation
Create and collaborate on interactive animations with powerful, user-friendly tools.
Real-time code suggestions and automated reviews
Orchestrate workloads with multi-cloud support, job scheduling, and integrated service discovery features.
CI/CD automation with build configuration as code
Enhance performance monitoring and root cause analysis with real-time distributed tracing.
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan