By rafet
Enforces git commit policies by blocking commits with messages that fail a Python guard script, adding an automated policy layer to your commit workflow.
Stop wasting time waiting for sleep to finish.
A Claude Code plugin that automatically adjusts sleep durations to account for permission dialog wait time and internal processing overhead.
Install · How It Works · Compatibility · Configuration
When Claude Code proposes sleep 60 && npm run build, you have to approve it first. If you take 15 seconds to hit "Allow", the sleep still runs for the full 60 seconds — meaning 75 seconds pass instead of the intended 60.
Claude Code also adds its own processing overhead (~1s) between deciding to run a command and actually executing it. These hidden delays add up.
Sleepz fixes this. It accounts for both delays and ensures the total wall-clock time matches what was originally intended.
/plugin marketplace add rafet/claude-code-sleepz
/plugin install sleepz@claude-code-sleepz
That's it. No configuration needed — it works out of the box.
A PreToolUse hook intercepts Bash commands containing sleep, records a timestamp, and replaces sleep with a lightweight wrapper. After you approve the command, the wrapper calculates how much time already elapsed and sleeps only the remaining duration.
sleep 60 && npm run build
│
▼
Hook records timestamp ─────────────────┐
│ │
▼ │
Claude Code overhead (~1s) │ These delays are
│ │ subtracted from
▼ │ sleep duration
Permission dialog (you wait 15s) │
│ │
▼ │
Wrapper: 60 - 16 = 44s remaining ──────┘
│
▼
sleep 44 && npm run build
The hook itself adds only ~15ms of overhead — negligible compared to the time it saves. Non-sleep commands are filtered out by a fast bash pre-check without spawning any extra processes.
| Command | Behavior |
|---|---|
sleep 60 | Adjusted |
sleep 60 && cmd | First sleep adjusted, rest of the command runs normally |
sleep 0.5 | Adjusted (fractional values supported) |
sleep $VAR | Skipped — variables can't be parsed statically |
sleep 60s / sleep 1m | Skipped — suffixed durations not supported |
bash -c "sleep 60" | Skipped — nested shells are left untouched |
sleep 10 && sleep 20 | Only the first sleep is adjusted |
| Hook or script error | Original command runs unmodified — never breaks your workflow |
Sleepz silently tracks how much time it saves you in ~/.claude/sleepz-stats. To see your stats:
~/.claude/sleepz --stats
# sleepz stats: 47 commands optimized, 3m 42s saved
The stats file is append-only and parallel-safe — no data is ever lost, even with multiple Claude sessions running simultaneously.
Disable Sleepz temporarily with an environment variable:
export DISABLE_CC_SLEEPZ=1
MIT
Executes bash commands
Hook triggers when Bash tool is used
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub rafet/claude-code-sleepz --plugin sleepzUltra-compressed communication mode. Cuts ~75% of tokens while keeping full technical accuracy by speaking like a caveman.
Memory compression system for Claude Code - persist context across sessions
Multi-model consensus engine integrating OpenAI Codex CLI, Gemini CLI, and Claude CLI for collaborative code review and problem-solving.
Curate auto-memory, promote learnings to CLAUDE.md and rules, extract proven patterns into reusable skills.