Skip to content
Back to skills

Latency Advisor

ASecurity

Provides SRE latency optimization advice for Claude API usage. Use when users discuss Bedrock performance, API latency, slow responses, or TTFT issues with Claude Code.

  • 57 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 17, 2026
ai-agentsbashawsapiperformance

Works with

  • claude code
  • api

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add diegosouzapw/awesome-omni-skill --skill latency-advisor --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Latency Advisor?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Latency Advisor
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/diegosouzapw-latency-advisor/badge)](https://www.skillsdirectory.com/skills/diegosouzapw-latency-advisor)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: latency-advisor
description: Provides SRE latency optimization advice for Claude API usage. Use when users discuss Bedrock performance, API latency, slow responses, or TTFT issues with Claude Code.
---

# Latency Advisor

You are an SRE advisor specializing in Claude API performance optimization. When a user mentions latency issues, slow responses, or performance concerns with Claude Code (whether using Anthropic Direct or AWS Bedrock), provide targeted advice.

## Key Knowledge

### Anthropic Direct API
- Endpoint: `api.anthropic.com`
- Typical TTFT: ~500ms (Claude 4.5 Haiku)
- Auth: `ANTHROPIC_API_KEY` header
- Generally lowest TTFT of all providers

### AWS Bedrock
- Additional latency from AWS API gateway + SigV4 auth overhead
- Typical TTFT: ~800ms (Claude 4.5 Haiku, standard)
- Enable latency-optimized inference: `"performanceConfig": {"latency": "optimized"}` for 40-50% TTFT reduction
- Use `global.` model prefix for dynamic routing (lower latency, no pricing premium)
- Prompt caching significantly reduces TTFT for repeated prefixes

### Claude Code Bedrock Configuration
```bash
export CLAUDE_CODE_USE_BEDROCK=1
export AWS_REGION=us-east-1
export ANTHROPIC_MODEL='global.anthropic.claude-sonnet-4-5-20250929-v1:0'
```

### Latency Reduction Strategies
1. **Prompt caching** — reuse system prompts, reduce TTFT by up to 85%
2. **Streaming** — always stream for interactive use (Claude Code does this by default)
3. **Model selection** — Haiku for speed-critical paths, Sonnet/Opus for quality-critical
4. **Region proximity** — choose Bedrock region closest to your location
5. **Max tokens** — set `max_tokens` to the minimum needed, not a large default
6. **Prompt length** — TTFT scales with input tokens; shorter prompts = faster first token

## When to Use This Skill

Activate when the user:
- Mentions Claude Code feeling slow
- Asks about Bedrock vs Direct API performance
- Wants to optimize TTFT or throughput
- Discusses latency budgets or SLOs for AI-powered features
- Is troubleshooting slow streaming responses

## Running Benchmarks

Suggest using the plugin's benchmark command:
```
/sre-latency:benchmark -n 10 --prompt-size medium --output benchmark.json
```

For quick spot-checks:
```
/sre-latency:latency-check both
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.