No. 085 Shape the design
Analyze Dependencies
Use when you need the shape and the files named before anyone edits
- Claude Code
- Codex
- Cursor
- Shape the design
# Analyze Dependencies Please perform a comprehensive dependency analysis of this codebase: ## 1. Dependency Overview First, gather dependency information from your project: - Check package files (package.json, requirements.txt, go.mod, pom.xml, etc.) - List all direct and transitive dependencies - Identify dependency management tools used ## 2. Security Audit Run security checks on dependencies: - Use your language's security audit tools - Check for known vulnerabilities in dependencies - Identify packages with security advisories ## 3. Usage Analysis Find which dependencies are actually used: - Use `chs search-imports` to find import statements - Check for unused dependencies that can be removed - Identify duplicate functionality across packages ## 4. Update Recommendations Provide an organized report with: - **Critical Security Updates** - Must update immediately - **Major Version Updates** - Breaking changes to consider - **Minor/Patch Updates** - Safe to update - **Unused Dependencies** - Can be removed - **Optimization Opportunities** - Alternative lighter packages ## 5. Implementation Plan Create a step-by-step plan to: 1. Remove unused dependencies 2. Update critical security issues 3. Plan major version migrations 4. Document any breaking changes Use the helper scripts throughout to verify changes and ensure nothing breaks.
When to use
“Analyze Dependencies” fits when you need the shape and the files named before anyone edits, because it says “Analyze Dependencies”, and its first written step is “Remove unused dependencies”.
For “Analyze Dependencies”, the extra line you type is the requirement those steps ask for, for example “make src/cart.js return 0 on an empty cart and skip a line with no price”, and the file then starts at “Remove unused dependencies”.
When not to use
Leave “Analyze Dependencies” unused when a test is already red and you need the cause, not a new diagram, because “Analyze Dependencies” points the other way
How to run it
Claude Code
Claude Code stores “Analyze Dependencies” as a Claude command and runs it with that command, putting the requirement in the argument, and CLAUDE.md should not also carry “Analyze Dependencies”.
Codex
Codex takes “Analyze Dependencies” as a paste above the task. Leave AGENTS.md unchanged so the next thread does not inherit “Analyze Dependencies”.
Cursor
Cursor should see “Analyze Dependencies” only as a chat paste of “Analyze Dependencies” for this turn. A file at .cursor/rules would keep applying after the turn ends.
Comparison
对比待补
This before-and-after was not run on this machine.
Related
- Stage: Shape the design
- Same stage: Database Best Practices
来源:Darin Cassler · https://github.com/cassler/awesome-claude-code-setup/blob/main/commands/analyze-dependencies.md · MIT · Copyright (c) 2025 Darin Cassler · 2026-12-01