By cloudripper
Restrict the top-level (orchestrator) thread to a small allowlist of orchestration tools, forcing real work into subagents so the main context stays clean. Subagents are never restricted.
This plugin requires configuration values that are prompted when the plugin is enabled. Sensitive values are stored in your system keychain.
modeWhat to do when the top-level thread calls a non-allowlisted tool: 'deny' to block it outright, or 'ask' to prompt you for confirmation each time.
${user_config.mode}allowlistComma-separated tool names the top-level thread may still call (no spaces). Everything else is blocked at the top level and must run inside a subagent. Subagents are never restricted. If a tool you need gets blocked, the denial message names it exactly so you can add it here.
${user_config.allowlist}A Claude Code plugin that restricts the top-level (orchestrator) thread to a small allowlist of orchestration tools. Everything else (file edits, shell, web fetches, MCP tools, etc.) is blocked at the top level and must run inside a subagent. Subagents themselves are never restricted.
The point is context hygiene: the main thread stays an orchestrator that plans and delegates, while heavy, context-polluting work happens in subagents whose output is summarized back rather than dumped into the main transcript.
It registers a single PreToolUse hook (scripts/gate.sh) on all tools.
PreToolUse payloads include an agent_id field only when the call fires
inside a subagent. The gate uses that:
agent_id present (subagent) -> allow everything.agent_id absent (top-level thread) -> allow only tools on the allowlist;
block the rest.Reference: Claude Code hooks reference, "Common input fields" (https://code.claude.com/docs/en/hooks).
claude plugin marketplace add cloudripper/ctxctl
claude plugin install ctxctl@ctxctl
| Option | Default | Meaning |
|---|---|---|
allowlist | Agent,Skill,TodoWrite,AskUserQuestion,ExitPlanMode | Comma-separated tool names the top-level thread may still call (no spaces). |
mode | deny | deny blocks outright; ask prompts you to confirm each blocked top-level call. |
If a tool you actually want at the top level gets blocked, the denial message
prints its exact name. Add that name to allowlist and reinstall or edit the
stored config. Tool names can vary slightly between Claude Code versions, so
treat the default list as a starting point and adjust to what your version
reports.
This is the common worry, and the answer is that they keep working:
code-review) by
calling the Agent tool, which is on the allowlist. The spawn is allowed.agent_id, so the gate allows
all of them. The agent does its work normally.Skill tool also work, because Skill
is on the allowlist. (Typing /skillname directly bypasses PreToolUse
entirely, so that path is unaffected regardless.)The only thing blocked is the orchestrator calling work tools directly.
bash and jq on PATH. On Windows, the hook runs under Git Bash (Claude
Code's default shell-form shell); install Git Bash and jq.jq is missing or the payload cannot be parsed, the gate fails open
(allows the call) so it can never lock you out of every tool.--agent sessions: launching with claude --agent <name> makes the whole
session an agent, so agent_id is set throughout and nothing is blocked.mcp__server__tool) are treated as work tools and are blocked
at the top level by default. Add specific ones to allowlist if you want them
available to the orchestrator.WebSearch / WebFetch are blocked at the top level by default on the
same context-hygiene grounds. Add them to allowlist if you prefer quick
top-level lookups.ctxctl/
.claude-plugin/marketplace.json # marketplace catalog
plugins/ctxctl/
.claude-plugin/plugin.json # plugin manifest + userConfig
hooks/hooks.json # registers the PreToolUse gate
scripts/gate.sh # the gate logic
README.md
LICENSE
MIT. See LICENSE.
Matches all tools
Hooks run on every tool call, not just specific ones
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 cloudripper/ctxctl --plugin ctxctlLLM-in-the-loop coverage-guided fuzzing, concolic execution, and crash triage for C/C++. Model agents keep libFuzzer/AFL++ fed and steered over a schema-driven state machine, verify crashes through a multi-step pipeline, and render maintainer-ready reports. Supports multi-harness campaigns, CVE-pattern intelligence, LLM code review, and an opt-in self-looping mode.
Harness-native ECC operator layer - 67 agents, 271 skills, 92 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses
Comprehensive feature development workflow with specialized agents for codebase exploration, architecture design, and quality review
A growing collection of Claude-compatible academic workflow bundles. Covers scientific figures, manuscript writing and polishing, reviewer assessment, citation retrieval, data availability, paper reading, literature search, response letters, paper-to-PPTX conversion, and evidence-grounded Chinese invention patent drafting. Rules are organized as reusable skill folders with explicit workflows and quality checks.
Core skills library for Claude Code: TDD, debugging, collaboration patterns, and proven techniques
Real-time statusline HUD for Claude Code - context health, tool activity, agent tracking, and todo progress
Comprehensive C4 architecture documentation workflow with bottom-up code analysis, component synthesis, container mapping, and context diagram generation