Cc Safe Setup
Plugin Verified ActiveToken consumption guards for Claude Code. Warns on large file reads (100KB+), limits unique file reads per session, estimates token budget, and caps subagent spawns. From 800+ hours of autonomous operation data.
To significantly enhance the safety and efficiency of Claude Code during autonomous operation by preventing issues related to token consumption and potentially risky actions.
Features
- Warns on large file reads (>100KB)
- Limits unique file reads per session
- Estimates token budget and warns/blocks exceeding it
- Caps subagent spawns per session
- Provides hooks for various safety checks
Use Cases
- Protecting against accidental large file reads that consume excessive tokens
- Preventing uncontrolled spawning of subagents
- Monitoring and managing token usage to avoid unexpected costs
- Enhancing overall operational safety and stability of Claude Code
Non-Goals
- Replacing Claude Code's core functionality
- Directly managing user credentials or secrets
- Providing AI generation capabilities
Workflow
- Install hooks via npm or plugin marketplace
- Restart Claude Code to activate hooks
- Hooks automatically monitor file reads, agent spawns, and token usage
- Warnings or blocks are issued based on configurable thresholds
- User adjusts behavior or CLAUDE.md based on hook feedback
Practices
- Operational safety
- Token management
- LLM agent security
Prerequisites
- jq installed on the system
Documentation
- info:Configuration & parameter referenceThe README and plugin.json mention configuration variables like CC_READ_BUDGET, CC_MAX_AGENTS, etc., but their default values and precedence order are not explicitly documented.
Invocation
- info:Hooks-off mechanismThere is no explicit 'hooks-off' mechanism documented for this plugin; disabling hooks would likely require manual removal of configurations.
Installation
First, add the marketplace
/plugin marketplace add yurukusa/cc-safe-setup/plugin install token-guard@cc-safe-setupQuality Score
VerifiedTrust Signals
Similar Extensions
Cc Safe Setup
99734 safety hooks for Claude Code — prevent file deletion, credential leaks, git disasters, and token waste during autonomous AI coding sessions
Claude Code Hooks
99Production safety hooks for autonomous Claude Code operation. Context monitoring, syntax checking, branch protection, activity logging, and more.
Hooks Safety
99Essential safety hooks to prevent destructive operations in Claude Code. From cc-safe-setup (655+ hooks).
Claude AI Music Skills
100AI music generation workflow for Suno - album concepts, lyrics, prompts, mastering, release
Hindsight Memory
99Automatic long-term memory for Claude Code via Hindsight. Recalls relevant memories before each prompt, retains conversation transcripts, and provides knowledge page tools.
Tdd
99TDD workflow enforcement with auto-test hook