Stats
Actions
Tags
From sub-kopring-engineer
Runs shell scripts before and after every Write/Edit tool call to enforce code quality or formatting, with a cleanup script on session stop. Executes bash and can modify files.
3 events · 3 hooks
Safety signals detected in this hook configuration
Where this hook configuration is defined
Defined inline in plugin.json manifest
Event handlers and matchers — expand Raw Configuration for the full JSON
root=$(git rev-parse --show-toplevel 2>/dev/null); if [ -n "$root" ] && [ -f "$root/gradlew" ]; then changed=$(git -C "$root" diff --name-only HEAD -- '*.kt' '*.kts' '*.java' 2>/dev/null); if [ -z "$changed" ]; then echo '[Hook] No source changes — skipping test gate'; exit 0; fi; cd "$root" && ./gradlew test --quiet 2>&1 | tail -5; result=$?; if [ $result -ne 0 ]; then echo 'Tests failed. Fix before ending session.'; exit 2; fi; fiEdit|Writefile=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.file_path // .path // empty' 2>/dev/null); if [ -n "$file" ] && echo "$file" | grep -qiE '(application-prod|secrets|credentials|private-key)'; then echo '{"decision":"block","reason":"Production secret file edit blocked"}'; exit 2; fiEdit|Writefile=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.file_path // .path // empty' 2>/dev/null); if [ -n "$file" ] && echo "$file" | grep -qE '\.(kt|kts|java)$'; then echo "[Hook] Lint: $file"; cd "$(git rev-parse --show-toplevel 2>/dev/null || echo .)" && relfile=$(echo "$file" | sed "s|^$(pwd)/||" ) && if echo "$file" | grep -qE '\.java$'; then ./gradlew checkstyleMain -PcheckstyleIncludes="**/${relfile##*/}" --quiet 2>&1 | tail -20 || true; else ./gradlew ktlintCheck --include "**/${relfile##*/}" --quiet 2>&1 | tail -20 || true; fi; finpx claudepluginhub hungrytech/hungrytech-claude-skills --plugin sub-kopring-engineer