mirror of
https://github.com/luongnv89/claude-howto.git
synced 2026-04-26 09:56:01 +02:00
5caeff2f1c
Reorder folders based on learning dependencies, complexity, and frequency of use: - 01-slash-commands (unchanged) - Quick wins for beginners - 02-memory (was 03) - Essential foundation - 03-skills (was 05) - Auto-invoked capabilities - 04-subagents (was 02) - Task delegation - 05-mcp (was 04) - External integration - 06-hooks (was 07) - Event automation - 07-plugins (was 06) - Bundled solutions - 08-checkpoints (unchanged) - Safe experimentation - 09-advanced-features (unchanged) - Power user tools Documentation improvements: - Add LEARNING-ROADMAP.md with detailed milestones and exercises - Simplify README.md for better scannability - Consolidate Quick Start and Getting Started sections - Combine Feature Comparison and Use Case Matrix tables - Reorder README sections: Learning Path → Quick Reference → Getting Started - Update all cross-references across module READMEs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
47 lines
936 B
Bash
47 lines
936 B
Bash
#!/bin/bash
|
|
# Auto-format code before writing
|
|
# Hook: PreToolUse:Write
|
|
|
|
FILE=$1
|
|
|
|
if [ -z "$FILE" ]; then
|
|
echo "Usage: $0 <file_path>"
|
|
exit 1
|
|
fi
|
|
|
|
# Detect file type and format accordingly
|
|
case "$FILE" in
|
|
*.js|*.jsx|*.ts|*.tsx)
|
|
if command -v prettier &> /dev/null; then
|
|
echo "Formatting JavaScript/TypeScript file: $FILE"
|
|
prettier --write "$FILE"
|
|
fi
|
|
;;
|
|
*.py)
|
|
if command -v black &> /dev/null; then
|
|
echo "Formatting Python file: $FILE"
|
|
black "$FILE"
|
|
fi
|
|
;;
|
|
*.go)
|
|
if command -v gofmt &> /dev/null; then
|
|
echo "Formatting Go file: $FILE"
|
|
gofmt -w "$FILE"
|
|
fi
|
|
;;
|
|
*.rs)
|
|
if command -v rustfmt &> /dev/null; then
|
|
echo "Formatting Rust file: $FILE"
|
|
rustfmt "$FILE"
|
|
fi
|
|
;;
|
|
*.java)
|
|
if command -v google-java-format &> /dev/null; then
|
|
echo "Formatting Java file: $FILE"
|
|
google-java-format -i "$FILE"
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
exit 0
|