Claude Code 자율 운영 완전 정복 총정리

20개 체크·10개 hook 30분 셋업으로 점수 0점에서 100점까지

by AI개발자
claudecode1.png

지금까지 잘 따라왔다.

7장, 20개 체크, 10개의 Hook스크립트, 5개 템플릿으로 완성단계까지 왔다.

마지막으로 그 모든 것들을 하나의 운영체계로서 연결하는 마지막 단계이다.

물론 처음부터 이번 장부터 읽고 설정해도 된다. 각 항목별 원리가 궁금하면 해당 장으로 가면 된다.


전체 체크 항목 리스트

cc013.png


퀵스타트 절차 (30분)

처음 설정하는 경우 이 순서대로 진행하면 30분 안에 전체 환경을 구축할 수 있다.


1단계: hook 스크립트 설치 (10분)


# claude-code-hooks 레포지토리를 클론

git clone https://github.com/gaebalai/claude-code-hooks.git ~/products/claude-code-hooks


# ~/.claude/hooks 디렉터리를 만들고 심볼릭 링크로 연결

mkdir -p ~/.claude/hooks

cd ~/.claude/hooks

ln -s ~/products/claude-code-hooks/hooks/*.sh .


# watchdog 스크립트를 PATH에 추가

mkdir -p ~/bin

ln -s ~/products/claude-code-hooks/scripts/cc-solo-watchdog ~/bin/

echo 'export PATH="$HOME/bin:$PATH"' >> ~/.zshrc # 또는 ~/.bashrc

source ~/.zshrc



2단계: settings.json에 전체 hook 등록 (5분)

~/.claude/settings.json을 열고 아래 내용으로 교체(또는 병합)한다.


{

"hooks": {

"PreToolUse": [

{

"matcher": "Bash",

"hooks": [

{"type": "command", "command": "bash ~/.claude/hooks/branch-guard.sh"},

{"type": "command", "command": "bash ~/.claude/hooks/error-gate.sh"},

{"type": "command", "command": "bash ~/.claude/hooks/no-ask-human.sh"}

]

}

],

"PostToolUse": [

{

"matcher": "Edit|Write",

"hooks": [

{"type": "command", "command": "bash ~/.claude/hooks/syntax-check.sh"},

{"type": "command", "command": "bash ~/.claude/hooks/activity-logger.sh"}

]

},

{

"matcher": "Bash",

"hooks": [

{"type": "command", "command": "bash ~/.claude/hooks/activity-logger.sh"},

{"type": "command", "command": "bash ~/.claude/hooks/context-monitor.sh"},

{"type": "command", "command": "bash ~/.claude/hooks/decision-warn.sh"}

]

}

],

"Stop": [

{

"hooks": [

{"type": "command", "command": "bash ~/.claude/hooks/proof-log-session.sh"}

]

}

],

"PreCompact": [

{

"hooks": [

{"type": "command", "command": "bash ~/.claude/hooks/proof-log-session.sh"}

]

}

]

}

}


지금 바로 작가의 멤버십 구독자가 되어
멤버십 특별 연재 콘텐츠를 모두 만나 보세요.

brunch membership
AI개발자작가님의 멤버십을 시작해 보세요!

AI Workflow Architect, LLM Engineer, Vibe Engineering, Claude Code, AI 업무 자동화 컨설팅/AI강의

105 구독자

오직 멤버십 구독자만 볼 수 있는,
이 작가의 특별 연재 콘텐츠

  • 최근 30일간 27개의 멤버십 콘텐츠 발행
  • 총 106개의 혜택 콘텐츠
최신 발행글 더보기
이전 06화Claude Code 멀티 에이전트 협업 설계