Added three new major feature categories with complete documentation and examples: ## New Features ### 07-hooks/ - Event-driven automation with 6 example hook scripts - Pre/post tool hooks, session hooks, and git hooks - Auto-formatting, security scanning, test automation - Complete documentation with best practices ### 08-checkpoints/ - Conversation state snapshots and rewind capability - Safe experimentation and approach comparison - Real-world examples: DB migration, performance optimization, UI iteration - Checkpoint management commands and workflows ### 09-advanced-features/ - Planning Mode: detailed implementation plans before coding - Extended Thinking: deep reasoning for complex problems - Background Tasks: long-running operations without blocking - Permission Modes: unrestricted, confirm, read-only, custom - Headless Mode: CI/CD integration and automation - Session Management: multiple work sessions - Interactive Features: keyboard shortcuts, command history - 10+ configuration examples for different scenarios ## Documentation Updates - README.md: Added sections for all new features with examples - INDEX.md: Updated with new categories, file listings, and search keywords - QUICK_REFERENCE.md: Added quick reference for new features - claude_concepts_guide.md: Comprehensive guide sections for new concepts ## Statistics - Total files: 90+ (up from 71) - Categories: 9 (up from 6) - New hook scripts: 6 - New documentation files: 10+ - Configuration examples: 10+ scenarios All examples are production-ready and follow Claude Code best practices. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
67 lines
1.8 KiB
Bash
67 lines
1.8 KiB
Bash
#!/bin/bash
|
|
# Send notifications on events
|
|
# Hook: PostPush
|
|
|
|
REPO_NAME=$(basename $(git rev-parse --show-toplevel 2>/dev/null) 2>/dev/null)
|
|
COMMIT_MSG=$(git log -1 --pretty=%B 2>/dev/null)
|
|
AUTHOR=$(git log -1 --pretty=%an 2>/dev/null)
|
|
BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
|
|
|
|
echo "📢 Sending notification to team..."
|
|
|
|
# Slack webhook example (replace with your webhook URL)
|
|
SLACK_WEBHOOK="${SLACK_WEBHOOK_URL:-}"
|
|
|
|
if [ -n "$SLACK_WEBHOOK" ]; then
|
|
curl -X POST "$SLACK_WEBHOOK" \
|
|
-H 'Content-Type: application/json' \
|
|
-d "{
|
|
\"text\": \"New push to *$REPO_NAME*\",
|
|
\"attachments\": [{
|
|
\"color\": \"good\",
|
|
\"fields\": [
|
|
{\"title\": \"Branch\", \"value\": \"$BRANCH\", \"short\": true},
|
|
{\"title\": \"Author\", \"value\": \"$AUTHOR\", \"short\": true},
|
|
{\"title\": \"Commit\", \"value\": \"$COMMIT_MSG\"}
|
|
]
|
|
}]
|
|
}" \
|
|
--silent --output /dev/null
|
|
|
|
echo "✅ Slack notification sent"
|
|
fi
|
|
|
|
# Discord webhook example (replace with your webhook URL)
|
|
DISCORD_WEBHOOK="${DISCORD_WEBHOOK_URL:-}"
|
|
|
|
if [ -n "$DISCORD_WEBHOOK" ]; then
|
|
curl -X POST "$DISCORD_WEBHOOK" \
|
|
-H 'Content-Type: application/json' \
|
|
-d "{
|
|
\"content\": \"**New push to $REPO_NAME**\",
|
|
\"embeds\": [{
|
|
\"title\": \"$COMMIT_MSG\",
|
|
\"color\": 3066993,
|
|
\"fields\": [
|
|
{\"name\": \"Branch\", \"value\": \"$BRANCH\", \"inline\": true},
|
|
{\"name\": \"Author\", \"value\": \"$AUTHOR\", \"inline\": true}
|
|
]
|
|
}]
|
|
}" \
|
|
--silent --output /dev/null
|
|
|
|
echo "✅ Discord notification sent"
|
|
fi
|
|
|
|
# Email notification example
|
|
EMAIL_TO="${TEAM_EMAIL:-}"
|
|
|
|
if [ -n "$EMAIL_TO" ]; then
|
|
echo "New push to $REPO_NAME by $AUTHOR" | \
|
|
mail -s "Git Push: $BRANCH" "$EMAIL_TO"
|
|
|
|
echo "✅ Email notification sent"
|
|
fi
|
|
|
|
exit 0
|