By hex
Completion guard that prevents Claude from stopping prematurely. Uses a Stop hook and TASKMASTER_DONE signal to enforce full task completion.
Completion guard plugin for Claude Code. Prevents Claude from stopping prematurely by enforcing an explicit done signal before allowing a session to end.
Inspired by eyaltoledano/claude-taskmaster, rebuilt and optimized for Claude Code's plugin system with a 94% reduction in hook output (5,094 chars down to 264 chars per block).
TASKMASTER_DONE::<session_id> signal is found in the conversationClaude tries to stop
|
v
Stop hook fires (stop-check.sh)
|
+-- TASKMASTER_DONE::<session_id> found? --> allow stop
|
+-- Subagent (transcript < 20 lines)? ----> allow stop
|
+-- TASKMASTER_MAX reached? --------------> allow stop
|
+-- Otherwise: block with 4-line message
claude plugin add hex/claude-taskmaster
claude --plugin-dir /path/to/claude-taskmaster
| Environment Variable | Default | Description |
|---|---|---|
TASKMASTER_MAX | 0 | Max stop-blocks before allowing stop. 0 = unlimited (keeps blocking until done signal). |
Set in your shell profile or per-session:
export TASKMASTER_MAX=5 # allow stop after 5 blocks
| Component | Path | Purpose |
|---|---|---|
| Plugin manifest | .claude-plugin/plugin.json | Identity, version, keywords |
| Stop hook config | hooks/hooks.json | Registers the Stop event handler |
| Stop hook script | hooks/stop-check.sh | Signal detection, counter, block/allow logic |
| Completion skill | skills/completion-protocol/SKILL.md | 6-point completion checklist |
Why a skill + hook instead of just a hook? The original taskmaster injects the entire compliance prompt (~5K chars, 32 lines) on every block. This works for stateless agents like Codex but creates screen spam in Claude Code. Skills provide persistent context — the description (~100 words) is always loaded, so the hook only needs a brief nudge to re-anchor Claude's attention.
Why 4 lines instead of 8? Benchmarked both variants across 3 scenarios with 19 assertions. Both achieved 100% pass rate. The 4-line version uses 44% less output with equivalent effectiveness.
Why skip subagents? Transcripts under 20 lines indicate subagent tasks (tool calls, searches). Blocking these would prevent agent parallelism from working.
MIT
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 hex/claude-marketplace --plugin claude-taskmasterConsult multiple AI coding agents (Gemini, OpenAI, Grok, Perplexity, plus codex and antigravity CLIs when installed) to get diverse perspectives on coding problems
Connect to remote hosts via SSH in tmux panes with saved host management
Safety guardian that prevents Claude Code from executing dangerous commands, exposing secrets, and performing destructive operations
Automatically evaluates whether Claude should continue working instead of stopping prematurely using Claude-judged decision making
Easily create hooks to prevent unwanted behaviors by analyzing conversation patterns
Optional companion to the tale-mode plugin: a read-only Sonnet "governor" that breaks anchoring when the autonomous goal loop gets stuck (>= 2 rounds). Adds a small per-turn model call — install only if you want it.
Agentic workflow mechanics: CLAUDE.md instruction quality and structured context handoff
Lazy senior dev mode. Forces the simplest, shortest solution that actually works: YAGNI, stdlib first, no unrequested abstractions.
Complete collection of battle-tested Claude Code configs from an Anthropic hackathon winner - agents, skills, hooks, and rules evolved over 10+ months of intensive daily use