analyze-dependencies
Please perform a comprehensive dependency analysis of this codebase:
Please help me ensure we're ready to deploy to ${ENVIRONMENT:-production}.
How it fires
How this command gets triggered: by you, by Claude, or both.
/pre-deploy-checkContext preview
What this command does when you run it.
Please help me ensure we're ready to deploy to ${ENVIRONMENT:-production}.
Please help me ensure we're ready to deploy to ${ENVIRONMENT:-production}.
Deployment type: ${DEPLOY_TYPE:-standard} Target branch: ${TARGET_BRANCH:-main} Skip checks: ${SKIP_CHECKS:-none}
1. **Remove debug code**:
# Check for console logs ch cq console-logs # Find debug flags chs find-code "DEBUG|debug.*=.*true|__DEV__" # Check for development URLs chs find-code "localhost|127\\.0\\.0\\.1|192\\.168\\."
2. **Environment configuration**:
# Find environment variables
chs find-code "process\\.env\\.|ENV\\[|getenv\\("
# Check for missing defaults
chs find-code "process\\.env\\.\\w+" 2>/dev/null | while IFS= read -r match; do
echo "$match" | grep -q "||" || echo "Missing default: $match"
done
# Verify .env.example is updated
diff .env .env.example 2>/dev/null || echo "Check .env files"3. **Security scan**:
# Final secrets check
ch cq secrets-scan
# Check file permissions
find . -type f -name "*.${SCRIPT_EXT:-sh|py}" -exec ls -la {} \; | grep -v "r--"
# Verify no sensitive files
chs find-file "*.pem|*.key|*.env|*.secret"4. **Build verification**:
# Clean build # Remove any build artifacts (adjust paths for your project) # Examples: dist/, build/, target/, out/, _site/ # Run your project's build command # Examples: npm run build, make build, gradle build, etc. # Verify no source maps or debug files in production # Check your build output directory for .map files or debug symbols
5. **Test suite**:
# Run your project's test suite # Examples: npm test, pytest, go test, mvn test, etc. # Run E2E/integration tests if available # Check test coverage if configured
6. **Database checks**:
# Find migration files
chs find-file "*migration*|*migrate*" --sort-date | tail -5
# Check for migration conflicts
git diff "${TARGET_BRANCH:-main}" --name-only | grep -i migration
# Look for schema changes
chs find-code "CREATE TABLE|ALTER TABLE|DROP TABLE"7. **Performance checks**:
# Check build size (if applicable)
# Look for unexpectedly large files in your build output
# Find large assets in your build directory
# Adjust the path to match your build output location
# Check for unoptimized images
find . -name "*.png" -o -name "*.jpg" -size "+${IMG_SIZE:-500k}"8. **Documentation**:
# Check if README is updated
git diff ${TARGET_BRANCH:-main} README.md
# Verify API docs if applicable
chs find-file "*api*.md|*API*.md"
# Check changelog
git log --oneline ${TARGET_BRANCH:-main}..HEAD > PENDING_CHANGES.txt# Generate deployment summary
echo "=== Deployment Summary ==="
echo "Environment: ${ENVIRONMENT:-production}"
echo "Branch: $(git branch --show-current)"
echo "Commit: $(git rev-parse --short HEAD)"
echo "Changes: $(git rev-list --count ${TARGET_BRANCH:-main}..HEAD) commits"
echo ""
echo "Files changed:"
git diff --stat ${TARGET_BRANCH:-main}Please verify all checks pass and provide a deployment recommendation.
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.