analyze-dependencies
Please perform a comprehensive dependency analysis of this codebase:
Please help me debug this issue: $ISSUE_DESCRIPTION
How it fires
How this command gets triggered: by you, by Claude, or both.
/debug-issueContext preview
What this command does when you run it.
Please help me debug this issue: $ISSUE_DESCRIPTION
Please help me debug this issue: $ISSUE_DESCRIPTION
Error/symptom: $ERROR_MESSAGE Component/area (if known): ${COMPONENT:-unknown} When it started: ${TIMEFRAME:-recently} GitHub issue: ${ISSUE_NUMBER:-none} PR causing issue: ${PR_NUMBER:-unknown}
1. **Search for error patterns**:
# Search for the exact error
chs find-code "$ERROR_MESSAGE"
# Search for related terms
chs find-code "${RELATED_TERMS:-error exception fail}"2. **Check recent changes**:
# Get recent commit context ch ctx prepare-migration "debug $ISSUE_DESCRIPTION" # Show recent modifications chg log --oneline -20
3. **Trace the problem area**:
# Focus on suspected area
ch ctx focus "${COMPONENT:-src}" 3
# Find related files
chs find-file "*${COMPONENT}*"4. **Analyze code flow**:
5. **Check test coverage**:
# Find related tests chs find-file "*.test.*" | xargs grep -l "$COMPONENT" # Look for test failures ch ts test | grep -i "fail"
6. **Look for code quality issues**:
# Check for TODOs and debug code ch cq todos --with-context | grep -C3 "$COMPONENT" ch cq console-logs
7. **Check related GitHub items**:
# If issue number provided, get details
if [ -n "$ISSUE_NUMBER" ]; then
gh issue view "$ISSUE_NUMBER"
fi
# If PR number provided, check changes
if [ -n "$PR_NUMBER" ]; then
gh pr diff "$PR_NUMBER" | grep -C5 "$COMPONENT"
fi
# Search for related issues
gh issue list --search "$ERROR_MESSAGE" --limit 58. **Generate debugging report**:
Once root cause is identified:
# Slugify issue description using common function
source ~/.claude/scripts/common-functions.sh
ISSUE_SLUGIFIED=$(slugify "$ISSUE_DESCRIPTION" 50)
# Create fix branch from issue
git checkout -b "fix/${ISSUE_NUMBER:-bug}-${ISSUE_SLUGIFIED}"
# After implementing fix
git add -A
git commit -m "fix: $ISSUE_DESCRIPTION (#$ISSUE_NUMBER)"
git push -u origin HEAD
# Create PR linked to issue
gh pr create \
--title "fix: $ISSUE_DESCRIPTION" \
--body "## Description\n\nFixes $ERROR_MESSAGE\n\nCloses #$ISSUE_NUMBER\n\n## Root Cause\n\n[Explanation]\n\n## Solution\n\n[What was changed]\n\n## Testing\n\n- [ ] Error no longer occurs\n- [ ] No regressions\n- [ ] Tests added"Please analyze the codebase and help me resolve this issue systematically.
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.
Create a developer diary entry in `/docs/developer-diary/` that captures your personal insights about the current work.