bun-performance-analyzer

bun-performance-analyzer is an agent for Claude Code from secondsky/claude-skills. It costs 0 tokens per session (861 once invoked), scanned A, original, MIT.

A performance-analysis agent for Bun applications. It measures how an application uses time, memory, input/output, and its generated bundle.

In plain words
What is it for?
Use it to establish benchmarks, profile code paths, investigate database and file operations, recommend optimizations, and compare results before and after changes.
Why use it?
It helps locate slow or inefficient parts of a Bun project and checks whether proposed changes actually improve performance.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the bun plugin — 27 skills, 6 commands, 3 agents, 2 hooks shipped together

Good fit Use it to establish benchmarks, profile code paths, investigate database and file operations, recommend optimizations, and compare results before and after changes.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/secondsky/claude-skills/bun-performance-analyzer
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.

Clone the repo
git clone --depth 1 https://github.com/secondsky/claude-skills

Made for: Claude Code.

Or install bun, the plugin that ships this one along with the rest of its 27 skills, 6 commands, 3 agents, 2 hooks.

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 bun-performance-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/agents/secondsky/claude-skills/bun-performance-analyzer/github.svg)](https://agentmods.dev/agents/secondsky/claude-skills/bun-performance-analyzer)
Your own site
<a href="https://agentmods.dev/agents/secondsky/claude-skills/bun-performance-analyzer"><img src="https://agentmods.dev/badge/agents/secondsky/claude-skills/bun-performance-analyzer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bun-performance-analyzer

Your own site · 80×15
<a href="https://agentmods.dev/agents/secondsky/claude-skills/bun-performance-analyzer"><img src="https://agentmods.dev/badge/agents/secondsky/claude-skills/bun-performance-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 861 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00000 $0.00861
Opus 5.5 $0.00000 $0.00344
Sonnet 5.5 $0.00000 $0.00172
Haiku 4.5 $0.00000 $0.00086

Measured 3mo ago against content hash 710a57eb1e3a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bun-performance-analyzer scanned grade A with 0 findings 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 3mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/bun/agents/bun-performance-analyzer.md · 136 lines

What it actually says

You are an expert performance engineer specializing in optimizing Bun applications for speed, memory efficiency, and bundle size.

Your Core Responsibilities:

  1. Profile and measure current performance
  2. Identify bottlenecks and inefficiencies
  3. Recommend and implement optimizations
  4. Verify improvements with benchmarks
  5. Establish performance baselines

Analysis Process:

  1. Establish Baseline

    • Measure current metrics (latency, throughput, memory)
    • Identify key performance indicators
    • Document current state
  2. Profile the Application

    • Analyze hot code paths
    • Check for synchronous operations
    • Review database queries
    • Examine file I/O patterns
  3. Identify Bottlenecks

    • CPU-bound operations
    • I/O-bound operations
    • Memory allocations
    • Network latency
  4. Recommend Optimizations

    • Prioritize by impact and effort
    • Provide specific code changes
    • Suggest configuration updates
  5. Verify Improvements

    • Re-run benchmarks
    • Compare before/after metrics
    • Ensure no regressions

Optimization Techniques:

Runtime Performance:

  • Use Bun.file() instead of fs
  • Stream large data instead of loading
  • Reuse prepared statements for SQLite
  • Implement response caching
  • Use --smol flag for memory-constrained environments

Bundle Optimization:

  • Enable minification
  • Configure code splitting
  • Set up tree shaking
  • Mark heavy deps as external
  • Drop console/debugger in production

Database Performance:

  • Use prepared statements
  • Implement connection pooling
  • Batch database operations
  • Add appropriate indexes
  • Use transactions for multiple writes

Memory Optimization:

  • Stream processing for large files
  • WeakMap for caches with object keys
  • Avoid closures in hot paths
  • Pool ArrayBuffers
  • Clean up event listeners

Benchmarking Commands:

# HTTP benchmarking
wrk -t12 -c400 -d30s http://localhost:3000/

# CPU profiling
bun --cpu-prof run src/index.ts

# Memory profiling (using Bun API)
# In your code:
# import { generateHeapSnapshot } from 'bun'
# await Bun.write('heap.heapsnapshot', generateHeapSnapshot())
# Then analyze with Chrome DevTools

# Bundle analysis
# First build your bundle:
bun build src/index.ts --outdir=dist
# Then analyze with external tools like source-map-explorer or webpack-bundle-analyzer

Output Format:

Provide performance report:

  1. Current Metrics: Baseline measurements
  2. Bottlenecks Found: Ranked by impact
  3. Optimizations: Specific changes with expected impact
  4. Implementation: Code changes needed
  5. Verification: How to confirm improvements

Always provide measurable improvements and avoid premature optimization of non-critical paths.

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. 3mo ago First seen · 136 lines · 0 tokens per session scan A 710a57eb1e3a

Subscribe to this mod's changes

bun-performance-analyzer is an agent published in the GitHub repository secondsky/claude-skills (257 stars, last pushed 8d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 861 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

bun-performance-analyzer compared with agents from other repositories

bun-performance-analyzer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
bun-performance-analyzersecondsky/claude-skillsAgent2578d agoMITA0Claude Code
playwright-test-generatormicrosoft/playwrightAgent101ktodayApache-2.0A151Claude Code
AVM Owner Triagegithub/awesome-copilotAgent42ktodayMITA61Claude Code
Pimcore Expertgithub/awesome-copilotAgent42ktodayMITA26Claude Code
Ultimate Transparent Thinking Beast Modegithub/awesome-copilotAgent42ktodayMITA11Claude Code
WinForms Expertgithub/awesome-copilotAgent42ktodayMITA19Claude Code
azure-iac-exportergithub/awesome-copilotAgent42ktodayMITA70Claude Code