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

/serpapi-performance-tuning

@0d57af8
Run it yourself

Measure and improve SerpAPI latency, payload size, connection reuse, caching, and concurrency without breaking freshness or allowance controls. Use when search performance misses an SLO. Trigger with "tune SerpAPI performance".

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

Nothing lands on disk. Nothing to clean up.

Fork this Skill

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

SKILL.md

≈64 tokens for metadata: the name and description. ≈852 when used: this file.

Description uses 3.2% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈256 characters, or 3.2%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

SerpAPI Evidence-Driven Performance Tuning

Overview

Optimize the measured bottleneck while preserving result freshness, schema correctness, privacy, and account capacity.

Prerequisites

  • Engine-level latency histograms, payload sizes, error rates, cache hits, and search consumption
  • User-facing latency and freshness objectives plus an account throughput budget
  • Representative sanitized fixtures and a reversible canary environment

Tool Discipline

Use Read, Glob, and Grep to inspect call paths and instrumentation, WebFetch to verify current cache and output features, and Write or Edit for measurements, cache layers, field selection, tests, and rollback controls.

Current Contract

For an exactly matching parameter set, SerpAPI may serve its one-hour server cache; cached searches are free and do not count toward monthly searches. no_cache=true forces a fresh fetch and must not be combined with async. JSON Restrictor reduces selected JSON fields, and output=md provides token-efficient Markdown for agent use.

Authentication

Keep SERPAPI_KEY outside measurement labels, cache keys, traces, and profiles. Treat query values and result bodies according to their data classification.

Instructions

  1. Break total latency into queue, connection, vendor processing, transfer, parsing, and downstream rendering; record p50, p95, and p99.
  2. Confirm whether the workload needs structured JSON, restricted JSON, Markdown, or approved raw HTML.
  3. Normalize parameters and add an application cache whose key excludes credentials but includes every input that changes semantics.
  4. Align cache TTL with the freshness objective; allow the SerpAPI server cache unless a justified fresh-fetch requirement exists.
  5. Reuse the official Python client's pooled connections or the supported JavaScript client rather than creating ad hoc transports.
  6. Bound concurrency below the live Account API throughput and compare sequential, limited-parallel, and cached paths with fixtures or an approved canary.
  7. Promote only if latency improves without worse correctness, privacy, errors, 429s, or search consumption; retain rollback thresholds.

Output

Return the baseline profile, bottleneck, proposed and measured changes, cache-key/TTL contract, output format, capacity impact, canary results, and rollback thresholds.

Error Handling

Condition Response
Cache serves semantically wrong data Disable the layer and expand the normalized key contract.
no_cache raises usage unexpectedly Remove it unless the freshness requirement explicitly justifies fresh fetches.
Parallelism causes 429s Reduce admissions and coordinate through the shared limiter.
Field restriction breaks parsing Restore required fields and lock the projection with fixtures.

Example

engine=google; baseline_p95=measured; bottleneck=payload; change=json-restrictor; freshness=1h; search_delta=0; schema-tests=pass; rollback=feature-flag

Resources

Next Steps

Observe a full traffic cycle and revisit the tuning decision when freshness, engine mix, or account capacity changes.

Source: SKILL.md on GitHub

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.

1 warning2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill provides instructions for optimizing SerpAPI performance. It follows security best practices by advising that API keys be kept out of logs and caches. It has a low-risk surface for indirect prompt injection as it processes external search data.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: MEDIUM · 1 issue

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 19 hours ago.

Activeupdated 2 months ago
What it can do
Reads files Network Edits files
Modelinherit
argument-hint
[engine] [latency-slo] [freshness-slo]
version
1.6.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
All 6 allowed tools
ReadGlobGrepWebFetchWriteEdit
Other metadata
tags
[
  "saas",
  "serpapi",
  "performance",
  "caching",
  "observability"
]
model
inherit
effort
high
compatibility
Designed for Claude Code; production cache, output, or concurrency changes require owner approval and measured rollback criteria

README badge

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