
hooks-performance
Event-driven hooks that monitor context and performance during Claude Code sessions automatically.
- version
- 1.0.0
- GitHub stars
- 3.8K
What it does
- Adds
context-monitorandperformance-monitorhooks that run automatically on Claude Code events - Designed for users who want background performance tracking without manual commands
Add marketplace
/plugin marketplace add davepoon/buildwithclaudeRun it inside Claude Code once, then install the plugin below.
Install
/plugin install hooks-performance@buildwithclaudeRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourcecontext-monitor
Monitor how much context window remains during a Claude Code session. Issues graduated warnings so you never get killed by context exhaustion.
Event Configuration
- Event Type:
PostToolUse - Tool Matcher:
""(every tool invocation) - Category: performance
How It Works
- Reads Claude Code's debug log to extract actual token usage
- Falls back to tool-call-count estimation when debug logs are unavailable
- Saves current % to
/tmp/cc-context-pct(other scripts can read this) - At CRITICAL/EMERGENCY, writes an evacuation template to your mission file
Warning Thresholds
| Level | Remaining | Action |
|---|---|---|
| CAUTION | ≤40% | Be mindful of consumption |
| WARNING | ≤25% | Finish current task, save state |
| CRITICAL | ≤20% | Run /compact immediately |
| EMERGENCY | ≤15% | Stop everything, evacuate |
Environment Variables
| Variable | Default | Description |
|---|---|---|
CC_CONTEXT_MISSION_FILE | $HOME/mission.md | Path to mission/state file for evacuation template |
Requirements
jqfor JSON parsing- Claude Code debug logs at
~/.claude/debug/(optional, falls back to estimation)
Origin
Born from a session that hit 3% context remaining with no warning. The agent died mid-task and all in-flight work was lost.
Source
From claude-code-hooks — battle-tested hooks from 140+ hours of autonomous Claude Code operation.
From the davepoon/buildwithclaude README
Build with Claude
Claude Skills, Agents, Commands, Hooks, Plugins, Marketplaces collections for and extend Claude Code
A plugin marketplace and discovery platform for Claude Code. Browse curated plugins, discover community contributions, and extend your Claude Code workflows.
Quick Start
# Add the Build with Claude marketplace
/plugin marketplace add davepoon/buildwithclaude
# Browse available plugins
/plugin search @buildwithclaude
# Install plugins
/plugin install <plugin-name>@buildwithclaude
What's Included
Build with Claude Plugins
Curated collections maintained in this repository:
| Type | Count | Description |
|---|---|---|
| Agents | 117 | Specialized AI experts (Python, Go, DevOps, Security, etc.) |
| Commands | 175 | Slash commands for automation (/commit, /docs, /tdd) |
| Hooks | 28 | Event-driven automation (notifications, git, formatting) |
| Skills | 26 | Reusable capabilities from plugins |
| Plugins | 51 | Bundled plugin packages by category |
Community Discovery
The platform indexes plugins from the broader Claude Code ecosystem:
- 20k+ Community Plugins from external marketplaces
- 4,500+ MCP Servers for database, API, and tool connections
- 1,100+ Plugin Marketplaces from the community
Web UI
Browse, search, and explore everything at buildwithclaude.com
Build with Claude Homepage
Browse Plugins
Browse Skills
Browse MCP Servers
Browse Plugin Marketplaces
Features
- Browse all plugin types with filtering
- Search across plugins, agents, commands, hooks, skills
- Copy install commands with one click
- View full documentation and usage examples
- Discover MCP servers and community plugins
Installation Options
Option 1: Plugin Marketplace (Recommended)
# Add marketplace
/plugin marketplace add davepoon/buildwithclaude
# Install specific plugins
/plugin install agents-python-expert@buildwithclaude
/plugin install commands-version-control-git@buildwithclaude
/plugin install hooks-notifications@buildwithclaude
# Or install everything
/plugin install all-agents@buildwithclaude
/plugin install all-commands@buildwithclaude
/plugin install all-hooks@buildwithclaude
Option 2: Manual Installation
# Clone repository
git clone https://github.com/davepoon/buildwithclaude.git
cd buildwithclaude
# Install agents
find plugins/agents-*/agents -name "*.md" -exec cp {} ~/.claude/agents/ \;
# Install commands
find plugins/commands-*/commands -name "*.md" -exec cp {} ~/.claude/commands/ \;
# Restart Claude Code
Available Plugin Categories
Agents (11 categories)
- Development & Architecture - Backend, frontend, mobile, GraphQL experts
- Language Specialists - Python, Go, Rust, TypeScript, C/C++ experts
- Quality & Security - Code review, security audit, debugging
- Infrastructure & Operations - DevOps, cloud, database optimization
- Data & AI - ML engineering, data pipelines, AI development
- Crypto & Blockchain - Trading systems, DeFi, Web3 development
Browse Subagents
Commands (22 categories)
- Version Control - Commit, PR creation, branch management
- Code Analysis - Testing, review, optimization
- Documentation - Docs generation, changelogs, API specs
- Project Management - Todos, PRDs, task tracking
Browse Commands
Hooks (8 categories)
- Notifications - Slack, Discord, Telegram alerts
- Git - Auto-staging, smart commits
- Development - Lint on save, auto-format
- Security - File protection, vulnerability scanning
Browse Hooks
Usage Examples
Using Agents
Agents are automatically invoked based on context, or explicitly called:
"Use the python-pro to optimize this function"
"@agent-security-auditor review this authentication code"
"Have the devops-troubleshooter help debug this deployment"
Using Commands
Commands use the / prefix:
/commit # Create conventional commit
/create-pr # Create pull request
/docs # Generate documentation
/tdd # Start test-driven development
/code_analysis # Analyze code quality
Using Hooks
Hooks run automatically on events like tool calls or session start.
Contributing
We welcome contributions!
Adding Plugins
- Create a new directory in
plugins/following the naming convention - Add your plugin files (agents, commands, hooks)
- Run
npm testto validate - Submit a pull request
Plugin Format
Agent (plugins/agents-*/agents/*.md):
---
name: agent-name
description: When to invoke this agent
category: category-name
tools: Read, Write, Bash
---
You are a [role description]...
Command (plugins/commands-*/commands/*.md):
---
description: What this command does
category: category-name
argument-hint: <args>
---
Command implementation...
Hook (plugins/hooks-*/hooks/*.md):
---
hooks: PreToolUse, PostToolUse
description: What this hook does
---
Hook implementation...
See CONTRIBUTING.md for detailed guidelines.
Contributors
This project exists thanks to all the people who contribute.
Links
- Web UI: buildwithclaude.com
- Documentation: Claude Code Docs
- Plugin Marketplaces: Plugin Docs
- Issues: GitHub Issues
License
MIT License - see LICENSE for details.
Made with ❤️ by Dave Poon
Details
- Marketplace
- davepoon/buildwithclaude
- Source
- plugins/hooks-performance
- Author
- BuildWithClaude Community
- Category
- Hooks
- License
- MIT
- Keywords
- hooks, automation, performance, performance-monitor
- Listed since
- Apr 6, 2026
More from davepoon/buildwithclaude
All 240- hooks-securityv1.0.0
- hooks-testingv1.0.0
- interviewv1.0.0
- isitdonev0.5.2
- keep-mac-awakev1.0.4
- kegg-mcp-serverv0.5.0
- kernel-development-skillsv0.4.3
- kordocv4.21.14
- korean-lawv4.15.6
- kumiv1.5.1
- kuudo-skillsv0.5.0
- lagos-diseno-esv1.0.0
- lead-finderv1.0.1
- legwisev1.1.1
- levea-video-editorv1.1.1
- lexio-apiv0.1.0
- lidnightv0.1.1
- lnplv0.8.0
- lnpl-mcpv0.8.0
- logbrewv0.3.2
- loootv0.2.1
- magic-cc-codex-workerv0.3.3
- mcp-servers-dockerv1.0.0
- memory-loopv2.3.1
Similar to hooks-performance
More Developer Tools
hooks-testingdavepoon/buildwithclaude3.8K starsTesting Hooks - Event-driven automation hooks
hooks-automationdavepoon/buildwithclaude3.8K starsAutomation Hooks - Event-driven automation hooks
hook-complexity-monitorDev-GOM/claude-code-marketplace97 starsMonitor code complexity and maintain code quality
hooks-pluginlaurigates/claude-plugins60 starsClaude Code hooks for enforcing best practices and workflow automation
performance-monitorrohitg00/awesome-claude-code-toolkit2.8K starsProfile API endpoints and run benchmarks to identify performance bottlenecks
application-performancewshobson/agents42.8K starsApplication profiling, performance optimization, and observability for frontend and backend systems