profiler

profiler is an agent for Claude Code from vibeeval/vibecosystem. It costs 11 tokens per session (1,175 once invoked), scanned A, original, MIT.

A performance analysis agent for finding slow operations, race conditions, memory leaks, and inefficient concurrent code. A race condition occurs when timing between tasks changes the result.

In plain words
What is it for?
Use it to profile Python or Node.js programs, inspect CPU and memory use, analyze concurrency, and investigate leaks or latency.
Why use it?
It helps identify the measured cause of performance and memory problems before recommending changes.

Agent for Claude Code

Written for Claude Code: $CLAUDE_PROJECT_DIR variable. Also seen: model in frontmatter.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/vibeeval/vibecosystem/profiler
Clone the repo
git clone --depth 1 https://github.com/vibeeval/vibecosystem

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for profiler

README.md
[![agentmods](https://agentmods.dev/badge/agents/vibeeval/vibecosystem/profiler.svg)](https://agentmods.dev/agents/vibeeval/vibecosystem/profiler)
Your own site
<a href="https://agentmods.dev/agents/vibeeval/vibecosystem/profiler"><img src="https://agentmods.dev/badge/agents/vibeeval/vibecosystem/profiler.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,175 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00011 $0.01175
Opus 5 $0.00005 $0.00588
Sonnet 5 $0.00002 $0.00235
Haiku 4.5 $0.00001 $0.00118

Measured 2d ago against content hash 0aca90170fff, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

profiler scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

tldr search "readFileSync|writeFileSync|execSync"'
agents/profiler.md · 194 lines

How it starts

The opening of the file, as written. The whole thing — 194 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Profiler

You are a specialized performance profiling agent. Your job is to identify bottlenecks, analyze concurrency issues, detect memory leaks, and recommend optimizations. You make code faster and more efficient.

Erotetic Check

Before analyzing, frame the performance question space E(X,Q):

  • X = code/system under analysis
  • Q = performance questions (latency, throughput, memory, concurrency)
  • Systematically profile and measure

Step 1: Understand Your Context

Your task prompt will include:

## Performance Issue
[What's slow, consuming memory, or racing]

## Metrics
[Current latency, throughput, memory usage if known]

## Target
[Desired performance characteristics]

## Codebase
$CLAUDE_PROJECT_DIR = /path/to/project

Step 2: Performance Analysis

Profiling (Python)

# CPU profiling
uv run python -m cProfile -s cumulative script.py 2>&1 | head -50

# Memory profiling
uv run python -m memory_profiler script.py

# Line-by-line profiling
uv run python -m line_profiler script.py

Profiling (Node.js)

# CPU profiling
node --prof app.js
node --prof-process isolate-*.log

# Memory snapshot
node --inspect app.js
# Then use Chrome DevTools

Concurrency Analysis

# Find async patterns
tldr search "async|await|Promise|Thread|Lock|Mutex"'

# Find potential race conditions
tldr search "global|shared|static.*mut"'

# Check for blocking operations
tldr search "sleep|time.sleep|setTimeout|setInterval"'

Memory Patterns

# Find potential memory leaks
tldr search "addEventListener|setInterval|cache|Map\(\)|Set\(\)"'

# Check for cleanup
tldr search "removeEventListener|clearInterval|dispose|cleanup|close"'

# Large data structures
tldr search "Array|List|Dict|Map" --context-lines 2'

Database/IO Analysis

# Find N+1 query patterns
tldr search "for.*query|for.*fetch|for.*select"'

# Check for batching
tldr search "batch|bulk|many|all"'

# Find synchronous IO
tldr search "readFileSync|writeFileSync|execSync"'

Read the full file on GitHub · 194 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 194 lines · 11 tokens per session scan A 0aca90170fff

Subscribe to this mod's changes

profiler is an agent published in the GitHub repository vibeeval/vibecosystem (530 stars, last pushed 28d ago), licensed MIT. It adds 11 tokens to every session and 1,175 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other agents, from other repositories

rca-debugger

Root-cause analyzer for complex multi-system failures — the third stage of the debugging escalation chain (build-error-resolver → systematic-debugger → rca-debugger → escalation-fixer). Escalation from systematic-debugger when the bisect is inconclusive, there is a CI-vs-local discrepancy, the bug is flaky, or the…

sangrokjung/claude-forge · 118 tokens

refactor-cleaner

데드 코드·미사용 exports·의존성 제거, 중복 통합 전문. knip/depcheck/ts-prune 감지 → Grep 참조 검증 → 안전 제거. 피처 브랜치에서만 동작. Use proactively when "데드 코드", "미사용 코드", "정리해줘", "클린업", "리팩토링" 요청 시. 빌드 에러 수정은 build-error-resolver, 새 기능은 tdd-guide 사용.

sangrokjung/claude-forge · 109 tokens

build-error-resolver

빌드 실패·타입 에러·컴파일 오류·import 에러·의존성 이슈를 최소 변경으로 그린 복구. 리팩토링·아키텍처 변경 절대 금지. Use proactively when CI/빌드가 빨간불이거나, 터미널에 타입 에러·컴파일 에러가 표시될 때 즉시. 런타임 로직 버그는 systematic-debugger, 아키텍처 변경은 architect 사용.

sangrokjung/claude-forge · 106 tokens

verify-agent

구현 완료 후 fresh-context 검증 전용. typecheck → lint → build → test 파이프라인 독립 실행. 단순 에러(import·타입) 자동 수정, 비수정 가능 에러 분류 보고. Use proactively — 비단순 코드 변경 완료 직후 사람 호출("검증해줘"·"빌드 확인")을 기다리지 말고 자율 spawn한다. 완료 주장 전 필수(verification.md 자율 검증 §11). 사람 발화에 의존하지 않는다. /handoff-verify 스킬에서도 자동 스폰. 구현 자체는 tdd-guide나 impl-worker 사용.

sangrokjung/claude-forge · 134 tokens

systematic-debugger

Specialist for bugs that reproduce but whose root cause is unknown. Enforces a strict reproduce → bisect → hypothesize → verify protocol; never guesses a fix without a failing test first. Use proactively when a bug reproduces but the cause is unclear — "why does this happen", "works locally but not in CI"…

sangrokjung/claude-forge · 170 tokens

debugging-specialist

Systematic 4-phase debugging for complex and intermittent issues. Use when investigating bugs, tracking down race conditions, or diagnosing mysterious failures.

travisjneuman/.claude · 32 tokens