Claude Code HookPerformance92 installs

Performance Monitor

Monitor system performance during Claude Code operations. Tracks CPU, memory usage, and execution time for performance optimization.

Install with the Claude Code Templates CLI
$ npx claude-code-templates@latest --hook="performance/performance-monitor" --yes

Requires Claude Code. The command adds this hook to your project's .claudedirectory — nothing runs on ToolZip's servers.

What's inside this hook

Component source

{

"description": "Monitor system performance during Claude Code operations. Tracks CPU, memory usage, and execution time for performance optimization.",

"hooks": {

"PreToolUse": [

{

"matcher": "*",

"hooks": [

{

"type": "command",

"command": "echo \"$(date +%s.%N),$(ps -o %cpu= -p $$),$(ps -o rss= -p $$),$CLAUDE_TOOL_NAME,start\" >> ~/.claude/performance.csv"

}

]

}

],

"PostToolUse": [

{

"matcher": "*",

"hooks": [

{

"type": "command",

"command": "echo \"$(date +%s.%N),$(ps -o %cpu= -p $$),$(ps -o rss= -p $$),$CLAUDE_TOOL_NAME,end\" >> ~/.claude/performance.csv; if [[ $(wc -l < ~/.claude/performance.csv) -gt 1000 ]]; then tail -n 500 ~/.claude/performance.csv > ~/.claude/performance.csv.tmp && mv ~/.claude/performance.csv.tmp ~/.claude/performance.csv; fi"

}

]

}

]

}

}

Type
Hook
Category
Performance
Installs
92
Source
GitHub ↗

Related Claude Code Hooks

Catalog data and component content are sourced from the open-source davila7/claude-code-templates project (MIT license). ToolZip curates the listing and writes original descriptions; every component links back to its original source. Claude Code is a product of Anthropic. ToolZip is an independent catalog and is not affiliated with or endorsed by Anthropic.