Agents: - Add YAML frontmatter (model, tools) to all 7 existing agents - New agents: planner (opus), build-error-resolver (sonnet), loop-operator (sonnet) Skills: - search-first: research before building (Adopt/Extend/Compose/Build) - verification-loop: full quality gate pipeline (Build→TypeCheck→Lint→Test→Security→Diff) - strategic-compact: when and how to run /compact effectively - autonomous-loops: 6 patterns for autonomous agent workflows - continuous-learning: extract session learnings into instincts Hooks: - Profile system (minimal/standard/strict) via run-with-profile.sh - config-protection: block linter/formatter config edits (standard) - suggest-compact: remind about /compact every ~50 tool calls (standard) - auto-tmux-dev: suggest tmux for dev servers (standard) - session-save/session-load: persist and restore session context (Stop/SessionStart) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
50 lines
1.1 KiB
Bash
Executable File
50 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# Auto-start dev server in tmux session when build/dev commands are detected
|
|
# Event: PreToolUse | Matcher: Bash
|
|
# Profile: standard
|
|
# Non-blocking (exit 0)
|
|
|
|
INPUT=$(cat)
|
|
COMMAND=$(echo "$INPUT" | jq -r '.tool_input.command // empty')
|
|
|
|
if [ -z "$COMMAND" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
# Detect dev server commands
|
|
DEV_PATTERNS=(
|
|
'npm\s+run\s+dev'
|
|
'pnpm\s+(run\s+)?dev'
|
|
'yarn\s+dev'
|
|
'next\s+dev'
|
|
'vite\s*$'
|
|
'vite\s+dev'
|
|
)
|
|
|
|
IS_DEV_COMMAND=false
|
|
for pattern in "${DEV_PATTERNS[@]}"; do
|
|
if echo "$COMMAND" | grep -qE "$pattern"; then
|
|
IS_DEV_COMMAND=true
|
|
break
|
|
fi
|
|
done
|
|
|
|
if [ "$IS_DEV_COMMAND" = false ]; then
|
|
exit 0
|
|
fi
|
|
|
|
# Check if tmux is available
|
|
if ! command -v tmux &>/dev/null; then
|
|
exit 0
|
|
fi
|
|
|
|
# Check if dev server is already running in a tmux session
|
|
SESSION_NAME="claude-dev"
|
|
if tmux has-session -t "$SESSION_NAME" 2>/dev/null; then
|
|
echo "Dev server already running in tmux session '$SESSION_NAME'. Use 'tmux attach -t $SESSION_NAME' to view." >&2
|
|
exit 0
|
|
fi
|
|
|
|
echo "Tip: Long-running dev servers work better in tmux. Run: tmux new -d -s $SESSION_NAME '$COMMAND'" >&2
|
|
exit 0
|