ShriD5/claude-mods/tree/main/night-mode
night-mode
설정 가능한 심야 시간 내에 Claude를 특히 조심스럽게 하는 Claude Code 플러그인: 위험한 Bash 명령어(배포, 강제 푸시, rm -rf, DROP/TRUNCATE)는 확인 대기로 유지되고, 시스템 프롬프트는 주의 섹션을 얻으며, 상태 표시줄은 활성 창을 표시합니다.
이 mod 소개
night-mode는 Claude Code 플러그인으로 안전 창을 활성화합니다(기본값 01:00–05:00 로컬 시간). 해당 창 내에서 prompt.compose 훅을 통해 세션 범위 주의 섹션을 추가하고, tool.call 훅을 통해 Bash 명령어를 가로채며, wrangler/vercel/fly 배포, kubectl apply, terraform apply, git push --force, rm -rf, npm publish 및 SQL DROP/TRUNCATE와 같은 위험한 작업을 분류합니다. 위험한 명령어는 $.ui.ask를 통해 명시적 확인이 필요합니다; 아무도 답할 수 없거나(예: claude -p) 사용자가 거부하는 경우 명령어는 유지되며 수동 실행 또는 "네, 배포하세요"에 회신하도록 지시됩니다. "네, 배포하세요"에 회신하면 10분 동안 프롬프트를 바이패스합니다. 상태 표시줄은 "🌙 night mode until 05:00"을 표시하고, /night on|off|(상태)는 세션당 동작을 제어합니다. 옵션은 start, end 및 timezone(IANA 존, $TZ로 폴백한 후 머신 시계)을 포함합니다. claude --plugin-dir /path/to/claude-mods/night-mode를 통해 설치하거나 repo를 마켓플레이스로 추가하고 /plugin을 사용합니다.
설치
먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.
claude plugin marketplace add ShriD5/claude-mods claude plugin install night-mode
원문 / README
night-mode
Between 01:00 and 05:00, Claude Code gets more careful.
- Claude's system prompt gets a short section: it's late, double-check anything destructive, prefer reversible steps, summarise the risks before acting.
- Risky Bash commands stop and ask you first:
It's 2:41am. Run this prod deploy (wrangler deploy)?That covers deploys (wrangler deploy,vercel --prod,fly deploy),kubectl apply,terraform apply,git push --force,rm -rf,npm publishandDROP/TRUNCATEin SQL. If nobody can answer (claude -p) or you pick "Not tonight", the command is held with:it's 2:41am. if you're sure, run it yourself or reply 'yes, ship it'. - Reply
yes, ship itand risky commands run without asking for 10 minutes. - The status line shows
🌙 night mode until 05:00while it's on. /night offturns it off for the rest of the session./night onbrings it back, and/nightsays where things stand.
Install
claude --plugin-dir /path/to/claude-mods/night-mode
Or add the repo as a marketplace and install it with /plugin.
Options
| Option | Default | What it does |
| --- | --- | --- |
| start | 01:00 | local time night mode turns on |
| end | 05:00 | local time it turns off (a window can wrap past midnight, e.g. 23:00 to 06:00) |
| timezone | empty | an IANA zone like Asia/Kolkata; empty uses $TZ, then the machine's clock |
How it works
A prompt.compose hook appends a session-scoped section at night, a tool.call hook on Bash classifies the command and confirms it through $.ui.ask, which works in every permission mode, and a $.clock.every timer keeps the status line current.
