- Added 44 external skills from obra/superpowers, ui-ux-pro-max-skill, claude-codex-settings - Added 8 autonomous agents (commit-creator, pr-creator, pr-reviewer, etc.) - Added 23 slash commands for Git/GitHub, setup, and plugin development - Added hooks for code formatting, notifications, and validation - Added MCP configurations for Azure, GCloud, Supabase, MongoDB, etc. - Added awesome-openclaw-skills registry (3,002 skills referenced) - Updated comprehensive README with full documentation Sources: - github.com/obra/superpowers (14 skills) - github.com/nextlevelbuilder/ui-ux-pro-max-skill (1 skill) - github.com/fcakyon/claude-codex-settings (29 skills, 8 agents, 23 commands) - github.com/VoltAgent/awesome-openclaw-skills (registry) - skills.sh (reference) - buildwithclaude.com (reference)
44 lines
1.3 KiB
Bash
Executable File
44 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
# Example PreToolUse hook for validating Bash commands
|
|
# This script demonstrates bash command validation patterns
|
|
|
|
set -euo pipefail
|
|
|
|
# Read input from stdin
|
|
input=$(cat)
|
|
|
|
# Extract command
|
|
command=$(echo "$input" | jq -r '.tool_input.command // empty')
|
|
|
|
# Validate command exists
|
|
if [ -z "$command" ]; then
|
|
echo '{"continue": true}' # No command to validate
|
|
exit 0
|
|
fi
|
|
|
|
# Check for obviously safe commands (quick approval)
|
|
if [[ "$command" =~ ^(ls|pwd|echo|date|whoami)(\s|$) ]]; then
|
|
exit 0
|
|
fi
|
|
|
|
# Check for destructive operations
|
|
if [[ "$command" == *"rm -rf"* ]] || [[ "$command" == *"rm -fr"* ]]; then
|
|
echo '{"hookSpecificOutput": {"permissionDecision": "deny"}, "systemMessage": "Dangerous command detected: rm -rf"}' >&2
|
|
exit 2
|
|
fi
|
|
|
|
# Check for other dangerous commands
|
|
if [[ "$command" == *"dd if="* ]] || [[ "$command" == *"mkfs"* ]] || [[ "$command" == *"> /dev/"* ]]; then
|
|
echo '{"hookSpecificOutput": {"permissionDecision": "deny"}, "systemMessage": "Dangerous system operation detected"}' >&2
|
|
exit 2
|
|
fi
|
|
|
|
# Check for privilege escalation
|
|
if [[ "$command" == sudo* ]] || [[ "$command" == su* ]]; then
|
|
echo '{"hookSpecificOutput": {"permissionDecision": "ask"}, "systemMessage": "Command requires elevated privileges"}' >&2
|
|
exit 2
|
|
fi
|
|
|
|
# Approve the operation
|
|
exit 0
|