Agent skill

API Response Optimization

by secondsky in secondsky/claude-skills

Optimizes API performance through payload reduction, caching strategies, and compression techniques.

MITAuto-check passedBackend & APIs

Install API Response Optimization

skills CLI
$ npx skills add secondsky/claude-skills --skill api-response-optimization -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install secondsky/claude-skills api-response-optimization --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/api-response-optimization/skills/api-response-optimization .claude/skills/api-response-optimization && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
api-response-optimization
GitHub stars
227
Used in
1 other repo
Token cost
~512 tokens
SKILL.md length
93 words
Files
1
Skills in repo
169
Repo updated
First seen
Licence
MIT

At a glance

Optimizes API performance through payload reduction, caching strategies, and compression techniques.

  • Improving API response times
  • SKILL.md covers Sparse Fieldsets, HTTP Caching Headers, Response Compression and Performance Targets, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Reducing bandwidth usage

What it does

API Response Optimization is an agent skill from secondsky/claude-skills. Optimizes API performance through payload reduction, caching strategies, and compression techniques. Use when improving API response times, reducing bandwidth usage, or implementing efficient caching.

Its SKILL.md is about 510 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Caching. The repository describes itself as: Production-ready skills for Claude Code CLI - Cloudflare, React, Tailwind v4, and AI integrations. The licence is MIT.

When your agent uses it

  • Improving API response times
  • Reducing bandwidth usage
  • Implementing efficient caching

Example prompts

  • “Use the api-response-optimization skill to optimiz API performance through payload reduction, caching strategies, and compression techniques”
  • “/api-response-optimization”

What it can do on your machine

Read from SKILL.md and the folder at commit 8837836. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

API Response Optimization loads about 512 tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 93 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
When it runs · the whole SKILL.md, loaded when a task matches
~512

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from secondsky/claude-skills at commit 8837836, republished under its MIT licence (© secondsky). 93 words, ~512 tokens.

Download SKILL.mdSave it as .claude/skills/api-response-optimization/SKILL.md (or your agent's skills folder).
name
api-response-optimization
description
Optimizes API performance through payload reduction, caching strategies, and compression techniques. Use when improving API response times, reducing bandwidth usage, or implementing efficient caching.
license
MIT

API Response Optimization

Reduce payload sizes, implement caching, and enable compression for faster APIs.

Sparse Fieldsets

javascript
// Allow clients to select fields: GET /users?fields=id,name,email
app.get('/users', async (req, res) => {
  const fields = req.query.fields?.split(',') || null;
  const users = await User.find({}, fields?.join(' '));
  res.json(users);
});

HTTP Caching Headers

javascript
app.get('/products/:id', async (req, res) => {
  const product = await Product.findById(req.params.id);
  const etag = crypto.createHash('md5').update(JSON.stringify(product)).digest('hex');

  if (req.headers['if-none-match'] === etag) {
    return res.status(304).end();
  }

  res.set({
    'Cache-Control': 'public, max-age=3600',
    'ETag': etag
  });
  res.json(product);
});

Response Compression

javascript
const compression = require('compression');

app.use(compression({
  filter: (req, res) => {
    if (req.headers['x-no-compression']) return false;
    return compression.filter(req, res);
  },
  level: 6  // Balance between speed and compression
}));

Performance Targets

MetricTarget
Response time<100ms (from 500ms)
Payload size<50KB (from 500KB)
Server CPU<30% (from 80%)

Optimization Checklist

  • Remove sensitive/unnecessary fields from responses
  • Implement sparse fieldsets
  • Add ETag/Last-Modified headers
  • Enable gzip/brotli compression
  • Use pagination for collections
  • Eager load to prevent N+1 queries
  • Monitor with APM tools

Best Practices

  • Cache immutable resources aggressively
  • Use short TTL for frequently changing data
  • Invalidate cache on writes
  • Compress responses >1KB
  • Profile before optimizing

© secondsky, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/api-response-optimization/skills/api-response-optimization of secondsky/claude-skills.

Open the folder on GitHubat commit 8837836

Used in 1 other repository

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in secondsky/claude-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

API Response Optimization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

API Response Optimization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
API Response Optimization this skillsecondsky/claude-skills2271 repos~512Automated safety check: PassMIT
Stripe Projectsfossasia/eventyay1.7k5 repos~2kAutomated safety check: NotesApache-2.0
FoundatioFoundatioFx/Foundatio2.1k—~3.9kAutomated safety check: PassApache-2.0
OmniRoute LLM Cachediegosouzapw/OmniRoute74k1 repos~529Automated safety check: PassMIT
Wp Block Themesgambitph/Stackable3503 repos~985Automated safety check: PassGPL-3.0
Wp Performancegambitph/Stackable3503 repos~1.5kAutomated safety check: PassGPL-3.0

Similar skills

  • Stripe Projects

    fossasia/eventyay

    A skill your agent uses when the user wants to provision infrastructure or third-party services using Stripe Projects.

    1.7k GitHub starsUsed in 5 repos~2k tokens
    Backend & APIsAuto-check: notes
  • Foundatio

    FoundatioFx/Foundatio

    A skill your agent uses when working with Foundatio infrastructure abstractions for .NET -- caching, queuing, messaging, file storage, distributed locking, or background jobs.

    2.1k GitHub stars~3.9k tokensUpdated today
    Backend & APIsAuto-check passed
  • OmniRoute LLM Cache

    diegosouzapw/OmniRoute

    Documents OmniRoute's cache endpoints for reading cache statistics and clearing entries, statistics or the reasoning cache, with notes on TTL and similarity settings.

    74k GitHub starsUsed in 1 repo~529 tokens
    Backend & APIsAuto-check passed
  • Wp Block Themes

    gambitph/Stackable

    A skill your agent uses when developing WordPress block themes: theme.json (global settings/styles), templates and template parts, patterns, style variations, and Site Editor troubleshooting (style…

    350 GitHub starsUsed in 3 repos~985 tokens
    Backend & APIsAuto-check passed
  • Wp Performance

    gambitph/Stackable

    A skill your agent uses when investigating or improving WordPress performance (backend-only agent): profiling and measurement (WP-CLI profile/doctor, Server-Timing, Query Monitor via REST headers)…

    350 GitHub starsUsed in 3 repos~1.5k tokens
    Backend & APIsAuto-check passed
  • Effect Portable Patterns

    millionco/expect

    Portable Effect patterns for robust promise execution. An agent skill from millionco/expect.

    3.6k GitHub stars~3.7k tokensUpdated 5 mo ago
    Backend & APIsAuto-check passed

More from secondsky/claude-skills

All 169 skills in this repo
  • Tanstack AI

    secondsky/claude-skills

    TanStack AI (alpha) provider-agnostic type-safe chat with streaming for OpenAI, Anthropic, Gemini, Ollama.

    227 GitHub starsUsed in 1 repo~3.6k tokens
    Auto-check: notes
  • Auto Animate

    secondsky/claude-skills

    AutoAnimate (@formkit/auto-animate) zero-config animations for React.

    227 GitHub stars~2.9k tokensUpdated 9 days ago
    Auto-check passed
  • Base UI React

    secondsky/claude-skills

    MUI Base UI unstyled React components with Floating UI. An agent skill from secondsky/claude-skills.

    227 GitHub stars~1.9k tokensUpdated 9 days ago
    Auto-check passed
  • Cloudflare Images

    secondsky/claude-skills

    This skill should be used when the user asks to "upload images to Cloudflare", "implement direct creator upload", "configure image transformations", "optimize WebP/AVIF", "create image variants"…

    227 GitHub stars~3.6k tokensUpdated 9 days ago
    Auto-check: notes
  • Cloudflare Nextjs

    secondsky/claude-skills

    Deploy Next.js to Cloudflare Workers via the OpenNext adapter (@opennextjs/cloudflare).

    227 GitHub stars~5.3k tokensUpdated 9 days ago
    Auto-check: notes
  • Cloudflare Sandbox

    secondsky/claude-skills

    Cloudflare Sandboxes SDK for secure code execution in Linux containers at edge.

    227 GitHub stars~4.5k tokensUpdated 9 days ago
    Auto-check passed

Categories

Questions about API Response Optimization

What does API Response Optimization do?

Optimizes API performance through payload reduction, caching strategies, and compression techniques. API Response Optimization is an agent skill from secondsky/claude-skills. Optimizes API performance through payload reduction, caching strategies, and compression techniques.

When should I use API Response Optimization?

API Response Optimization fits situations like: improving API response times; reducing bandwidth usage; implementing efficient caching.

How do I install API Response Optimization in Claude Code?

Run `npx skills add secondsky/claude-skills --skill api-response-optimization -a claude-code`. Or copy the skill folder (plugins/api-response-optimization/skills/api-response-optimization in secondsky/claude-skills) into .claude/skills/api-response-optimization in your project. Claude Code loads it when a task matches its description.

How do I install API Response Optimization in Codex?

Run `npx skills add secondsky/claude-skills --skill api-response-optimization -a codex`. Or copy the skill folder (plugins/api-response-optimization/skills/api-response-optimization in secondsky/claude-skills) into .agents/skills/api-response-optimization in your project. Codex loads it when a task matches its description.

Can I use API Response Optimization in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add secondsky/claude-skills --skill api-response-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-response-optimization, .gemini/skills/api-response-optimization, .github/skills/api-response-optimization and .opencode/skills/api-response-optimization in your project.

What does API Response Optimization need to run?

SKILL.md names no scripts, command-line tools or credentials: API Response Optimization is instructions for the agent only.

Does API Response Optimization access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is API Response Optimization safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does API Response Optimization use?

API Response Optimization is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does API Response Optimization use?

About 512 tokens (SKILL.md is roughly 2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to API Response Optimization?

Skills that share tags, products or a category with API Response Optimization: Stripe Projects (fossasia/eventyay, 1.7k stars), Foundatio (FoundatioFx/Foundatio, 2.1k stars), OmniRoute LLM Cache (diegosouzapw/OmniRoute, 74k stars) and Wp Block Themes (gambitph/Stackable, 350 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains API Response Optimization?

secondsky (a GitHub user) maintains it in secondsky/claude-skills, which has 227 GitHub stars. The repository holds 169 skills in this directory. The repository was last updated on September 28, 2026.

Source: secondsky/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.