analyze-dependencies
Please perform a comprehensive dependency analysis of this codebase:
Please analyze this codebase for performance issues and optimization opportunities:
How it fires
How this command gets triggered: by you, by Claude, or both.
/performance-checkContext preview
What this command does when you run it.
Please analyze this codebase for performance issues and optimization opportunities:
Please analyze this codebase for performance issues and optimization opportunities:
Check for files that might be too large:
# Find large files chs large-files 500 # Files over 500 lines # Check overall codebase size ch ts size # For Node projects find . -name "*.js" -o -name "*.ts" | xargs wc -l | sort -n
Search for potential bottlenecks:
# Nested loops chs find-code "for.*for\|while.*while" chs find-code "\.forEach.*\.forEach\|\.map.*\.map" # Synchronous operations chs find-code "readFileSync\|execSync\|statSync" # Inefficient array operations chs find-code "\.shift()\|\.unshift()" # Large data in memory chs find-code "JSON\.parse.*readFile\|\.split.*readFile"
Check for heavy dependencies:
# Find large imports
chs search-imports "moment\|lodash"
# Check for whole package imports
chs find-code "import .* from ['\"]\w+['\"]" # vs specific imports
# Find dynamic imports
chs find-code "import(\|require("Look for async problems:
# Missing await
chs find-code "async.*{" | xargs grep -L "await"
# Promise chains that could be async/await
chs find-code "\.then.*\.then\|\.catch.*\.then"
# Potential race conditions
chs find-code "Promise\.all\|Promise\.race"Identify potential memory issues:
# Event listeners without cleanup chs find-code "addEventListener" | xargs grep -L "removeEventListener" # Timers without cleanup chs find-code "setInterval\|setTimeout" | xargs grep -L "clear" # Global variables chs find-code "^(var\|let\|const).*window\.\|global\."
Create a prioritized list of:
For each issue, provide:
Focus on changes that will have measurable impact!
Give Claude the super powers it deserves with this power user collection of bash scripts and slash commands
Please perform a comprehensive dependency analysis of this codebase:
Please help me document all APIs in this codebase systematically:
Automatically identify and fix CI failures or review feedback on the current PR, then push the fixes.