ClaudeMods
☰
JA
● 0 人がオンライン ・閲覧 0 回
スポンサー作品を投稿
GitHub リポジトリ · 投稿者 ShriD5

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 publish and DROP/TRUNCATE in 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 it and risky commands run without asking for 10 minutes.
  • The status line shows 🌙 night mode until 05:00 while it's on.
  • /night off turns it off for the rest of the session. /night on brings it back, and /night says 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.

関連作品