home / skills / bacoco / bmad-skills / bmad-performance-optimization

bmad-performance-optimization skill

/.claude/skills/bmad-performance-optimization

This skill diagnoses performance bottlenecks and designs actionable optimization plans to keep systems within budgets and SLAs.

npx playbooks add skill bacoco/bmad-skills --skill bmad-performance-optimization

Review the files below or copy the command above to add this skill to your agents.

Files (8)
SKILL.md
3.5 KB
---
name: bmad-performance-optimization
description: Diagnoses bottlenecks and designs performance optimization plans.
allowed-tools: ["Read", "Write", "Grep", "Bash"]
metadata:
  auto-invoke: true
  triggers:
    patterns:
      - "performance budget"
      - "optimize speed"
      - "slow response"
      - "profiling results"
      - "latency regression"
      - "load testing"
      - "capacity planning"
    keywords:
      - performance
      - latency
      - throughput
      - optimize
      - scaling
      - profiling
      - benchmarking
  capabilities:
    - performance-audits
    - load-testing-plans
    - profiling-analysis
    - optimization-roadmaps
    - capacity-planning
  prerequisites:
    - bmad-architecture-design
    - bmad-test-strategy
  outputs:
    - performance-brief
    - benchmark-plan
    - optimization-backlog
---

# BMAD Performance Optimization Skill

## When to Invoke

Trigger this skill when the user:
- Reports latency, throughput, or resource regressions.
- Requests load/performance testing guidance or results interpretation.
- Needs to set or validate performance budgets and SLAs.
- Wants to plan scaling strategies ahead of a launch or marketing event.
- Asks how to tune code, queries, caching, or infrastructure for speed.

If the user only needs to implement a specific optimization already defined, delegate to `bmad-development-execution`.

## Mission

Deliver actionable insights, testing strategies, and prioritized optimizations that keep the product within agreed performance budgets while balancing cost and complexity.

## Inputs Required

- Current architecture diagrams and deployment topology.
- Observability data: metrics dashboards, traces, profiling dumps, load test reports.
- Performance requirements (SLAs/SLOs, budgets, target response times).
- Workload assumptions and peak usage scenarios.

Gather missing telemetry by coordinating with `bmad-observability-readiness` if instrumentation is lacking.

## Outputs

- **Performance brief** summarizing current state, key bottlenecks, and risks.
- **Benchmark and load test plan** aligning tools, scenarios, and success criteria.
- **Optimization backlog** ranked by impact vs. effort with owner and verification plan.
- Updated performance budget recommendations or SLO adjustments when necessary.

## Process

1. Validate inputs and ensure instrumentation coverage. Escalate gaps to observability skill.
2. Analyze telemetry to pinpoint hotspots (CPU, memory, I/O, DB, network, frontend paint times).
3. Assess architecture decisions for scalability (caching, asynchronous workflows, data partitioning).
4. Define performance goals and acceptance thresholds with stakeholders.
5. Create load/benchmark plans covering baseline, stress, soak, and spike scenarios.
6. Recommend optimizations across code, database, infrastructure, and CDN layers.
7. Produce backlog with measurable acceptance criteria and regression safeguards.

## Quality Gates

- Recommendations trace back to observed data or projected workloads.
- Each backlog item includes measurement approach (before/after metrics).
- Performance budgets and SLAs updated or reaffirmed.
- Risks communicated when goals require major architectural change.

## Error Handling

- If telemetry contradicts assumptions, schedule hypothesis-driven experiments rather than guessing.
- Flag when performance targets are unrealistic within constraints; propose trade-offs.
- When required tooling is unavailable, document blockers and coordinate with observability & dev skills.

Overview

This skill diagnoses runtime bottlenecks and produces prioritized performance optimization plans. I deliver measurable recommendations, load and benchmark plans, and an actionable backlog that balances speed, cost, and complexity. The goal is to keep the product within agreed performance budgets and SLAs while minimizing risk of regressions.

How this skill works

I ingest architecture diagrams, observability data, profiling dumps, and load test reports to locate hotspots across code, database, network, and frontend layers. I validate instrumentation, define acceptance thresholds with stakeholders, and create repeatable benchmark scenarios. Outputs include a performance brief, a ranked optimization backlog, and verification approaches for before/after measurement.

When to use it

  • You observe latency, throughput, or resource regressions in production or staging.
  • You need a load or performance testing strategy or help interpreting test results.
  • You must set or validate performance budgets, SLAs, or SLOs.
  • You plan scaling for launches, promotions, or traffic spikes.
  • You want guidance on tuning code, queries, caching, or infrastructure for speed.

Best practices

  • Always start from reliable telemetry; prioritize fixing instrumentation gaps before major changes.
  • Define clear success criteria (metrics and thresholds) for every recommendation.
  • Rank fixes by impact versus implementation effort and include an owner and rollout plan.
  • Use hypothesis-driven experiments when telemetry conflicts with assumptions.
  • Include regression safeguards and automated checks in CI to detect performance drift.

Example use cases

  • Analyze a sudden increase in API latency and recommend targeted code or DB fixes with verification metrics.
  • Design a load test plan for a product launch covering baseline, stress, soak, and spike scenarios.
  • Convert ad-hoc optimization ideas into a prioritized backlog with impact estimates and rollout steps.
  • Assess caching and partitioning strategies to meet reduced p99 latency targets while controlling cost.
  • Validate proposed architecture changes against projected workload and update SLAs and budgets accordingly.

FAQ

What inputs do I need to provide?

Provide architecture diagrams, deployment topology, observability dashboards, traces/profiles, load test data, and performance goals or SLOs.

What if telemetry is incomplete?

I’ll document gaps, recommend minimal instrumentation to collect, and coordinate experiments rather than guessing until telemetry improves.

How are optimization items validated?

Every item includes measurable acceptance criteria and a before/after measurement plan using the agreed benchmark scenarios.