mirror of
https://github.com/mattpocock/skills.git
synced 2026-04-30 22:13:54 +07:00
62f43a1817
- Introduced TDD skills including deep modules, interface design, mocking, refactoring, and testing guidelines. - Added skills for breaking plans into GitHub issues and creating PRDs from conversation context. - Implemented productivity skills for scaffolding exercises, setting up pre-commit hooks, and managing notes in Obsidian. - Created a caveman communication mode for concise technical responses and a grilling technique for thorough plan discussions. - Developed a skill for writing new agent skills with structured templates and guidelines. - Included git guardrails to prevent dangerous git commands and a migration guide for using @total-typescript/shoehorn in tests.
26 lines
507 B
Bash
Executable File
26 lines
507 B
Bash
Executable File
#!/bin/bash
|
|
|
|
INPUT=$(cat)
|
|
COMMAND=$(echo "$INPUT" | jq -r '.tool_input.command')
|
|
|
|
DANGEROUS_PATTERNS=(
|
|
"git push"
|
|
"git reset --hard"
|
|
"git clean -fd"
|
|
"git clean -f"
|
|
"git branch -D"
|
|
"git checkout \."
|
|
"git restore \."
|
|
"push --force"
|
|
"reset --hard"
|
|
)
|
|
|
|
for pattern in "${DANGEROUS_PATTERNS[@]}"; do
|
|
if echo "$COMMAND" | grep -qE "$pattern"; then
|
|
echo "BLOCKED: '$COMMAND' matches dangerous pattern '$pattern'. The user has prevented you from doing this." >&2
|
|
exit 2
|
|
fi
|
|
done
|
|
|
|
exit 0
|