Stats
Actions
Tags
From claude-unity-harness
Enforces documentation quality policies on file writes: guards paths, requires doc content, validates READMEs, checks frontmatter. Updates context on session start, stop, and user prompt. Runs Python scripts, writes files.
7 events · 9 hooks
Safety signals detected in this hook configuration
Where this hook configuration is defined
Defined in hooks/hooks.json
Event handlers and matchers — expand Raw Configuration for the full JSON
*mkdir -p .claude && NOW=$(date -u '+%Y-%m-%dT%H:%M:%SZ') && MEM=.claude/project-memory.json && LAST=$(git log --oneline -1 2>/dev/null | sed 's/^[a-f0-9]* //' | tr -d '"' | tr -d '\r\n' || echo "") && BR=$(git branch --show-current 2>/dev/null | tr -d '\r\n' || echo "") && CF=$(git status --porcelain 2>/dev/null | awk '{print $NF}' | grep -v '^$' | awk 'BEGIN{ORS=","}{print "\"" $0 "\""}' | sed 's/,$//') && if [ -f "$MEM" ]; then if command -v python3 >/dev/null 2>&1; then CLAUDE_CF="[$CF]" python3 -c 'import json,sys,os; mem=sys.argv[1]; d=json.load(open(mem)); d.update({"changedFiles":json.loads(os.environ.get("CLAUDE_CF","[]")),"lastCommit":sys.argv[2],"branch":sys.argv[3],"savedAt":sys.argv[4]}); open(mem,"w").write(json.dumps(d,indent=2,ensure_ascii=False))' "$MEM" "$LAST" "$BR" "$NOW" 2>/dev/null || true; else for FV in "savedAt=$NOW" "lastCommit=$LAST" "branch=$BR"; do F="${FV%%=*}"; V="${FV#*=}"; if grep -q "\"$F\"" "$MEM"; then if [ "$(uname)" = "Darwin" ]; then sed -i '' "s/\"$F\":\"[^\"]*\"/\"$F\":\"$V\"/" "$MEM" || true; else sed -i "s/\"$F\":\"[^\"]*\"/\"$F\":\"$V\"/" "$MEM" || true; fi; else if [ "$(uname)" = "Darwin" ]; then sed -i '' "\$s/}$/,\"$F\":\"$V\"}/" "$MEM" || true; else sed -i "\$s/}$/,\"$F\":\"$V\"}/" "$MEM" || true; fi; fi; done; fi; else printf '{"currentFeature":"","changedFiles":[%s],"lastCommit":"%s","branch":"%s","savedAt":"%s"}\n' "$CF" "$LAST" "$BR" "$NOW" > "$MEM"; fi5ms*Write|EditFILE=$(echo "$CLAUDE_TOOL_INPUT" | grep -o '"file_path" *: *"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' 2>/dev/null || true); if echo "$FILE" | grep -q '\.cs$'; then printf '=== [claude-unity-harness] Unity C# 규칙 ===\n- private 필드: m_ 접두사 (m_health)\n- 상수: k_ 접두사 (k_MaxCount)\n- 정적: s_ 접두사 (s_instance)\n- 중괄호: Allman 스타일 (여는 중괄호 새 줄)\n- Update()에서 GetComponent 호출 금지 → Awake에서 캐싱\n- public 필드 직접 노출 금지 → [SerializeField] private 사용\n- OnDisable/OnDestroy에서 이벤트 구독 해제 필수\n'; fi3ms*NOW=$(date -u '+%Y-%m-%d') && PROG=.claude/claude-progress.txt && if [ -f "$PROG" ]; then grep -q "^| $NOW" "$PROG" || printf '| %s | (작업 내용 분석 중...) | 🔄 |\n' "$NOW" >> "$PROG"; else printf '# 프로젝트 진행 상황\n\n## 세션 이력\n| 날짜 | 작업 내용 | 완료 여부 |\n|------|----------|----------|\n| %s | (작업 내용 분석 중...) | 🔄 |\n\n## 현재 진행 상황\n\n## 다음 작업\n\n## 주요 설계 결정\n\n## 알려진 이슈\n' "$NOW" > "$PROG"; fi && rm -f .claude/.context_loaded5msWrite|EditFILE=$(echo "$CLAUDE_TOOL_INPUT" | grep -o '"file_path" *: *"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' 2>/dev/null || true); if echo "$FILE" | grep -q '\.cs$' && [ -n "$FILE" ]; then if [ ! -f "${FILE}.meta" ]; then echo "[claude-unity-harness] ⚠️ .meta 파일 없음: ${FILE}.meta → Unity Editor를 열어 자동 생성하거나 pre-commit hook이 처리합니다."; fi; mkdir -p .claude && echo "$FILE" >> .claude/.pending_compile_check; fi5ms*mkdir -p .claude; if [ -f .claude/project-memory.json ]; then echo '=== [claude-unity-harness] 프로젝트 메모리 ===' && cat .claude/project-memory.json; fi; if [ -f .claude/claude-progress.txt ]; then echo '=== [claude-unity-harness] 세션 진행 ===' && cat .claude/claude-progress.txt; fi; if [ -f .claude/feature_list.json ]; then echo '=== [claude-unity-harness] 기능 목록 ===' && cat .claude/feature_list.json; fi; touch .claude/.context_loaded || true10ms*mkdir -p .claude && if [ ! -f .claude/.context_loaded ]; then if [ -f .claude/project-memory.json ]; then echo '=== [claude-unity-harness] 프로젝트 메모리 ===' && cat .claude/project-memory.json; fi; if [ -f .claude/claude-progress.txt ]; then echo '=== [claude-unity-harness] 세션 진행 ===' && cat .claude/claude-progress.txt; fi; if [ -f .claude/feature_list.json ]; then echo '=== [claude-unity-harness] 기능 목록 ===' && cat .claude/feature_list.json; fi; touch .claude/.context_loaded; fi5msnpx claudepluginhub cwp10/claude-unity-harness --plugin claude-unity-harness