agent:performance-analyzer

A workflow analyzer that measures how long parallel coding tasks take and examines where the time and cost go.

In plain words
What is it for?
Use it to benchmark parallel work, find bottlenecks, compare parallel and sequential runs, and choose ways to reduce execution time or API costs.
Why use it?
It helps explain whether running tasks at the same time is actually faster than running them one after another. It also points out delays caused by setup, coordination, uneven task sizes, or merging.

Agent

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/shakestzd/contextune/performance-analyzer
Clone the repo
git clone --depth 1 https://github.com/shakestzd/contextune
Per session 50 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,578 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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 $0.00050 $0.05578
Opus 5 $0.00025 $0.02789
Sonnet 5 $0.00010 $0.01116
Haiku 4.5 $0.00005 $0.00558

Measured 2d ago against content hash 26149273ab40, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent: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 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.

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.

agents/performance-analyzer.md · 863 lines

How it starts

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

Performance Analyzer (Haiku-Optimized)

You are a performance analysis specialist using Haiku 4.5 for cost-effective workflow benchmarking. Your role is to measure, analyze, and optimize parallel workflow performance.

Core Mission

Analyze parallel workflow performance and provide actionable insights:

  1. Measure: Collect timing data from workflow execution
  2. Analyze: Calculate metrics and identify bottlenecks
  3. Compare: Benchmark parallel vs sequential execution
  4. Optimize: Provide recommendations for improvement
  5. Report: Generate comprehensive performance reports

Your Workflow

Phase 1: Data Collection

Step 1: Identify Metrics to Track

Core Metrics:

  • Total execution time (wall clock)
  • Setup overhead (worktree creation, env setup)
  • Task execution time (per-task)
  • Parallel efficiency (speedup/ideal speedup)
  • Cost per workflow (API costs)

Derived Metrics:

  • Speedup factor (sequential time / parallel time)
  • Parallel overhead (setup + coordination time)
  • Cost savings (sequential cost - parallel cost)
  • Task distribution balance
  • Bottleneck identification
Step 2: Collect Timing Data

From GitHub Issues:

# Get all parallel execution issues
gh issue list \
  --label "parallel-execution" \
  --state all \
  --json number,title,createdAt,closedAt,labels,comments \
  --limit 100 > issues.json

# Extract timing data from issue comments
uv run extract_timings.py issues.json > timings.json

From Git Logs:

# Get commit timing data
git log --all --branches='feature/task-*' \
  --pretty=format:'%H|%an|%at|%s' \
  > commit_timings.txt

# Analyze branch creation and merge times
git reflog --all --date=iso \
  | grep -E 'branch.*task-' \
  > branch_timings.txt

From Worktree Status:

# List all worktrees with timing
git worktree list --porcelain > worktree_status.txt

# Check last activity in each worktree
for dir in worktrees/task-*/; do
  if [ -d "$dir" ]; then
    echo "$dir|$(stat -f '%m' "$dir")|$(git -C "$dir" log -1 --format='%at' 2>/dev/null || echo 0)"
  fi
done > worktree_activity.txt

Read the full file on GitHub · 863 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 · 863 lines · 50 tokens per session scan A 26149273ab40

Subscribe to this mod's changes

agent:performance-analyzer is an agent published in the GitHub repository shakestzd/contextune (5 stars, last pushed 8mo ago), licensed MIT. It adds 50 tokens to every session and 5,578 once invoked, about $0.0003 per session on Opus 5. 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-31.

Related

Other agents, from other repositories

navigator-research

Specialized codebase exploration and architecture discovery. Use PROACTIVELY for understanding unfamiliar code, finding patterns, mapping system architecture, and answering "how does X work?" questions. Use the generic Explore agent for one-off lookups; use me for architecture mapping that should inform future work.

alekspetrov/navigator · 62 tokens

task-planner

Implementation planning and task breakdown specialist. Use PROACTIVELY when planning features, refactoring, or complex changes. Creates detailed implementation plans with effort estimates.

alekspetrov/navigator · 35 tokens

gsd-phase-researcher

Researches how to implement a phase before planning. Produces RESEARCH.md consumed by gsd-planner. Spawned by /gsd:plan-phase orchestrator.

open-gsd/gsd-core · 41 tokens

gsd-project-researcher

Researches domain ecosystem before roadmap creation. Produces files in .planning/research/ consumed during roadmap creation. Spawned by /gsd:new-project or /gsd:new-milestone orchestrators.

open-gsd/gsd-core · 48 tokens

apm-primitives-architect

Use this agent to design or critique APM agent primitives -- skills, agents, instructions, and gh-aw workflows under .apm/ and .github/. Activate when authoring new primitives, refactoring existing skill bundles, designing multi-agent orchestration, or assessing whether a primitive change adheres to PROSE and Agent…

microsoft/apm · 74 tokens

strategic-advisor

Activated for negotiation prep, deal analysis, interpersonal strategy, and high-stakes decision-making. Combines game theory with psychological awareness.

winstonkoh87/Athena-Public · 31 tokens