chore: clean up hooks and migrate binary to Git LFS
- Remove Claude code hooks (post-write, pre-bash, session-end, session-start, stop, user-prompt-submit) - Migrate foundry.7z binary to Git LFS - Update serena project configuration Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
#!/bin/bash
|
||||
# PostToolUse Hook for Write - Logs file writes and can trigger actions
|
||||
|
||||
# Extract file path from parameters
|
||||
FILE_PATH="${CLAUDE_TOOL_PARAMETERS:-Unknown file}"
|
||||
|
||||
# Log the write operation
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] File written: $FILE_PATH" >> .claude/logs/writes.log
|
||||
|
||||
# Optional: Auto-format specific file types
|
||||
if [[ "$FILE_PATH" =~ \.(js|ts|jsx|tsx)$ ]]; then
|
||||
# Uncomment to enable auto-formatting with prettier
|
||||
# npx prettier --write "$FILE_PATH" 2>/dev/null || true
|
||||
echo " -> JavaScript/TypeScript file detected" >> .claude/logs/writes.log
|
||||
fi
|
||||
|
||||
if [[ "$FILE_PATH" =~ \.(py)$ ]]; then
|
||||
# Uncomment to enable auto-formatting with black
|
||||
# black "$FILE_PATH" 2>/dev/null || true
|
||||
echo " -> Python file detected" >> .claude/logs/writes.log
|
||||
fi
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
# PreToolUse Hook for Bash - Logs bash commands before execution
|
||||
|
||||
# Extract the bash command from CLAUDE_TOOL_PARAMETERS if available
|
||||
COMMAND="${CLAUDE_TOOL_PARAMETERS:-Unknown command}"
|
||||
|
||||
# Log the command
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] Executing: $COMMAND" >> .claude/logs/bash.log
|
||||
|
||||
# Optional: Add safety checks
|
||||
# Example: Block dangerous commands
|
||||
if echo "$COMMAND" | grep -qE "rm -rf /|mkfs|dd if="; then
|
||||
echo "WARNING: Potentially dangerous command blocked!" >&2
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
# SessionEnd Hook - Runs when a Claude Code session ends
|
||||
|
||||
# Log session end with timestamp
|
||||
echo "Session Ended: $(date '+%Y-%m-%d %H:%M:%S')" >> .claude/logs/session.log
|
||||
echo "" >> .claude/logs/session.log
|
||||
|
||||
# Optional: Clean up temporary files
|
||||
# rm -f .claude/tmp/*
|
||||
|
||||
echo "Session ended. Logs saved to .claude/logs/session.log"
|
||||
@@ -1,50 +0,0 @@
|
||||
#!/bin/bash
|
||||
# SessionStart Hook - Runs when a new Claude Code session starts
|
||||
|
||||
# Create log directory if it doesn't exist
|
||||
mkdir -p .claude/logs
|
||||
|
||||
# Log session start with timestamp
|
||||
echo "========================================" >> .claude/logs/session.log
|
||||
echo "Session Started: $(date '+%Y-%m-%d %H:%M:%S')" >> .claude/logs/session.log
|
||||
echo "Working Directory: $(pwd)" >> .claude/logs/session.log
|
||||
echo "User: $(whoami)" >> .claude/logs/session.log
|
||||
echo "========================================" >> .claude/logs/session.log
|
||||
|
||||
# Output session initialization message to Claude
|
||||
cat << 'EOF'
|
||||
🚀 **New Session Initialized - Foundry VTT Development Environment**
|
||||
|
||||
📋 **MANDATORY REMINDERS FOR THIS SESSION**:
|
||||
|
||||
1. ✅ **CLAUDE.md** has been loaded with project instructions
|
||||
2. ✅ **8 MCP Servers** are available: serena, sequential-thinking, context7, memory, fetch, windows-mcp, playwright, database-server
|
||||
3. ✅ **Specialized Agents** available: Explore, test-engineer, code-reviewer, refactoring-specialist, debugger, architect, documentation-writer, security-analyst
|
||||
|
||||
⚠️ **CRITICAL REQUIREMENTS** - You MUST follow these for EVERY task:
|
||||
|
||||
**At the START of EVERY task, provide a Tooling Strategy Decision:**
|
||||
- **Agents**: State if using (which one) or not using (with reason)
|
||||
- **Slash Commands**: State if using (which one) or not using (with reason)
|
||||
- **MCP Servers**: State if using (which ones) or not using (with reason)
|
||||
- **Approach**: Brief strategy overview
|
||||
|
||||
**At the END of EVERY task, provide a Task Completion Summary:**
|
||||
- What was done
|
||||
- Which features were used (Agents, Slash Commands, MCP Servers, Core Tools)
|
||||
- Files modified
|
||||
- Efficiency notes
|
||||
|
||||
📖 **See documentation**:
|
||||
- **CLAUDE.md**: Full project documentation (automatically loaded)
|
||||
- **.claude/SESSION_INSTRUCTIONS.md**: Quick reference for mandatory policies
|
||||
- "Mandatory Tooling Usage Policy" (CLAUDE.md lines 545-610)
|
||||
- "Task Initiation Requirements" (CLAUDE.md lines 905-920)
|
||||
- "Task Completion Status Messages" (CLAUDE.md lines 925-945)
|
||||
|
||||
🎯 **This Session's Focus**: Foundry VTT v11.315 + PF1e v10.8 macro development and debugging
|
||||
|
||||
💡 **Tip**: You can read .claude/SESSION_INSTRUCTIONS.md anytime for a quick reminder of mandatory policies.
|
||||
EOF
|
||||
|
||||
# Session initialized successfully
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Stop hook - Executed when Claude Code finishes responding
|
||||
# Purpose: Log completion of tasks
|
||||
|
||||
# Create logs directory if it doesn't exist
|
||||
mkdir -p .claude/logs
|
||||
|
||||
# Log the stop event
|
||||
echo "[$(date)] Claude finished responding" >> .claude/logs/session.log
|
||||
|
||||
# Note: The actual summary generation is done by Claude in the response
|
||||
# This hook just logs the event for tracking purposes
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
# UserPromptSubmit Hook - Runs when user submits a prompt
|
||||
|
||||
# Log prompt submission (without actual content for privacy)
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] User prompt submitted" >> .claude/logs/session.log
|
||||
|
||||
# Optional: Show notification (requires notify-send on Linux or similar)
|
||||
# notify-send "Claude Code" "Processing your request..." 2>/dev/null || true
|
||||
|
||||
# Optional: Track usage statistics
|
||||
PROMPT_COUNT_FILE=".claude/logs/prompt_count.txt"
|
||||
if [ -f "$PROMPT_COUNT_FILE" ]; then
|
||||
COUNT=$(cat "$PROMPT_COUNT_FILE")
|
||||
COUNT=$((COUNT + 1))
|
||||
else
|
||||
COUNT=1
|
||||
fi
|
||||
echo "$COUNT" > "$PROMPT_COUNT_FILE"
|
||||
Reference in New Issue
Block a user