analyze-dependencies
Please perform a comprehensive dependency analysis of this codebase:
Please help me identify and prioritize technical debt in ${FOCUS_AREA:-the entire codebase}.
How it fires
How this command gets triggered: by you, by Claude, or both.
/tech-debt-huntContext preview
What this command does when you run it.
Please help me identify and prioritize technical debt in ${FOCUS_AREA:-the entire codebase}.
Please help me identify and prioritize technical debt in ${FOCUS_AREA:-the entire codebase}.
Thresholds:
1. **Find TODOs and FIXMEs**:
# Get all TODOs with context
ch cq todos --with-context
# Find old TODOs (using git blame)
chs find-code "TODO|FIXME|HACK|XXX" 2>/dev/null | while IFS= read -r file; do
if [ -f "$file" ]; then
echo "=== $file ==="
git blame "$file" 2>/dev/null | grep -E "TODO|FIXME|HACK|XXX" || true
fi
done2. **Identify large files**:
# Find files exceeding threshold
ch cq large-files ${MAX_FILE_SIZE:-500}
# Show largest files first
find . -name "*.${FILE_EXT:-js|ts|py}" -exec wc -l {} + | sort -rn | head -203. **Find complex code**:
# High cyclomatic complexity
ch cq complexity ${MAX_COMPLEXITY:-15}
# Deeply nested code
chs find-code "^\\s{16,}" --files-with-matches
# Long functions (multiple patterns)
chs find-code "function.*\\{[^}]{500,}"4. **Check for outdated patterns**:
# Find deprecated usage
chs find-code "@deprecated|DEPRECATED"
# Old library usage
chs find-code "${OLD_PATTERNS:-callback\\(err\\)|var\\s+\\w+\\s*=\\s*require}"5. **Dependency debt**:
# Check for outdated packages ch ts deps --outdated # Find security vulnerabilities ch ts audit # Look for multiple versions ch ts deps --duplicates
6. **Code duplication**:
# Find similar patterns
for pattern in "${DUPLICATE_PATTERNS[@]:-"function.*{" "class.*{" "interface.*{"}"; do
echo "=== Checking pattern: $pattern ==="
chs find-code "$pattern" --count | sort -rn | head -10
done7. **Missing tests**:
# Find untested files
comm -23 \
<(find . -name "*.${FILE_EXT:-js}" | grep -v test | sort) \
<(chs find-file "*.test.*" | xargs grep -l "import\|require" | sort -u)Please analyze the findings and provide:
1. **Priority Matrix**:
2. **Effort Estimation**:
3. **Risk Assessment**:
4. **Recommendations**:
Please organize findings into:
## Technical Debt Report ### Critical Issues 1. [Issue] - [Location] - [Impact] - [Effort] ### Quick Wins 1. [Issue] - [Location] - [Benefit] - [Time] ### Long-term Improvements 1. [Area] - [Current State] - [Desired State] - [Plan]
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.