Index of every page on this site: llms.txt
All skills
jeremylongshore avatar

/clade-performance-tuning

@0d57af8
Run it yourself

Optimize Anthropic API latency — streaming, prompt caching, model selection, Use when working with performance-tuning patterns. connection reuse, and parallel requests. Trigger with "anthropic slow", "claude latency", "speed up anthropic", "anthropic performance", "claude response time".

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/clade-performance-tuning

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesone-pager.md

≈474 tokens on demand. Your agent reads this file only when SKILL.md points to it.

clade-performance-tuning — One-Pager

Optimize Claude API latency with streaming, prompt caching, model routing, and parallel requests.

The Problem

Claude API latency has two components -- time to first token (TTFT) and tokens per second (TPS) -- and each requires different optimization strategies. Without tuning, applications suffer from slow perceived response times (waiting for full generation before displaying), wasted TTFT on large uncached system prompts, and serial execution of independent API calls that could run in parallel.

The Solution

This skill provides six concrete optimization strategies with latency benchmarks: always-on streaming for instant perceived responsiveness, prompt caching to slash TTFT for large system prompts, Haiku routing for speed-critical classification tasks (200ms TTFT), client instance reuse to avoid connection overhead, parallel requests via Promise.all, and output token minimization through concise system prompts and tight max_tokens.

Who / What / When

Aspect Details
Who Developers building user-facing applications where Claude response latency matters
What Applies six latency optimization strategies targeting TTFT and TPS across the request lifecycle
When When users complain about slow responses, or before launching a latency-sensitive feature

Key Features

  1. Prompt Caching — Cache large system prompts with ephemeral cache_control to drop TTFT from ~2s to ~500ms on cache hits
  2. Model Routing to Haiku — Route classification, extraction, and routing decisions to Haiku (200ms TTFT, 150 TPS) while reserving Sonnet/Opus for complex tasks
  3. Parallel Request Execution — Fire independent Claude calls concurrently via Promise.all instead of awaiting them sequentially

Quick Start

See SKILL.md for full instructions.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill provides educational guidance and TypeScript code snippets for optimizing Anthropic API performance through streaming, prompt caching, and model routing. No security vulnerabilities or malicious patterns were detected.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 0d57af8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 months ago
What it can do
Reads files Edits files
version
1.1.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
[
  "saas",
  "anthropic",
  "claude",
  "performance",
  "latency"
]
All 3 allowed tools
ReadWriteEdit
Other metadata
compatibility
Designed for Claude Code

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/clade-performance-tuning