agentleFS
techieharrytechieharry/ToolMaster/skills/api-integration/SKILL.md

api-integration

Skill0 starsChanged 7 months agoMITView on GitHub

Build API integrations — REST, WebSocket, webhook handlers. Use when connecting to external services, building scrapers, or wiring up data pipelines.

10 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 7 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use requests/httpx (Python) or fetch (JS) — don't build custom HTTP

    line 18
  2. Distinctive:

    Check response headers: X-RateLimit-Remaining, Retry-After

    line 24
  3. Distinctive:

    Never hammer an API — respect limits, your key depends on it

    line 26
  4. Distinctive:

    Never swallow errors silently

    line 31
  5. Distinctive:

    Never hardcode API keys — use environment variables

    line 34
  6. Distinctive:

    Always set User-Agent header

    line 35
  7. Distinctive:

    Document the API's quirks (undocumented behaviors, known bugs)

    line 37

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

API Integration

Process

  1. Read the docs — find auth method, rate limits, pagination, error codes
  2. Auth first — get a working authenticated request before anything else
  3. Build incrementally — one endpoint at a time, verify response shape
  4. Handle failures — retries with backoff, timeout handling, error parsing
  5. Extract — parse response into clean data structures

Patterns

REST client

  • Use requests/httpx (Python) or fetch (JS) — don't build custom HTTP
  • Set timeouts on every request (10s default, 30s for large payloads)
  • Retry 3x with exponential backoff (1s, 2s, 4s) on 429/500/502/503
  • Log request/response on failure, not success

Rate limiting

  • Check response headers: X-RateLimit-Remaining, Retry-After
  • Implement token bucket or sliding window
  • Never hammer an API — respect limits, your key depends on it

Error handling

  • Parse error response bodies — they usually tell you what's wrong
  • Map API errors to your domain errors
  • Never swallow errors silently

Rules

  • Never hardcode API keys — use environment variables
  • Always set User-Agent header
  • Cache responses when the data doesn't change frequently
  • Document the API's quirks (undocumented behaviors, known bugs)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.