api-client
Skill0 starsChanged 3 months agoMITView on GitHub
Integrate with third-party APIs and webhooks. Covers authentication flows (OAuth, API keys, JWT), retry strategies, circuit breakers, rate limiting, webhook verification, and integration testing patterns.
- Reads credentials
4 other projects use a version of this.
Adopted by
Most recently taken up by
- nek1987/auto-agent-harnesstheir own version, first seen Oct 11, 2026
- leonardoaraujosantos/my_ai_skillstheir own version, first seen Jul 6, 2026
- SecuringTheRealm/str-agentic-adventurestheir own version, first seen May 2, 2026
- microsoft/TypeScripttheir own version, first seen Jul 26, 2024
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- microsoft/TypeScript★ 112ksame name
- nek1987/auto-agent-harness★ 4same name
- SecuringTheRealm/str-agentic-adventures★ 4same name
- leonardoaraujosantos/my_ai_skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository44 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- a11y-auditSkill
- ai-engineerSkill
- changelog-enforcerSkill
- code-cleanup-guardianSkill
- code-reviewerSkill
- contract-testSkill
- db-migrateSkill
- dep-auditSkill
- devops-automatorSkill
- env-configSkill
- error-observabilitySkill
- frontend-designSkill
- git-commit-helperSkill
- github-issues-managerSkill
- git-issue-syncSkill
- git-protocolSkill
- handoffSkill
- incident-responseSkill
- init-projectSkill
- karpathy-guidelinesSkill
- market-researcherSkill
- parallel-agent-git-isolationSkill
- product-strategistSkill
- pr-workflowSkill
- rapid-builderSkill
- release-managerSkill
- resumeSkill
- scrutinizeSkill
- shadcn-uiSkill
- skill-builderSkill
- sprint-plannerSkill
- state-machine-diagramsSkill
- state-managementSkill
- surveySkill
- system-architectSkill
- tech-docsSkill
- unstuckSkill
- ux-design-systemSkill
- ux-researchSkill
- webapp-testingSkill
- web-dev-fundamentalsSkill
- workflow-optimizerSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Every third-party integration should follow this layered pattern:
- Very specific: line 50
Use crypto.timingSafeEqual to compare HMAC-SHA256 digests.
- Very specific: line 58
Read x-ratelimit-remaining and x-ratelimit-reset headers.
- Distinctive: line 79
Test error paths: timeout, 5xx, rate limit, malformed response
- Distinctive: line 80
Test auth token refresh flow
- Distinctive: line 81
Verify idempotency key handling
“Common” is measured: kept by at least 6 in 10 of the 3 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.
Files
API Integration Client
Integration Architecture
Client Structure
Every third-party integration should follow this layered pattern:
Transport Layer → HTTP client with retry, timeout, circuit breaker
Auth Layer → Token management, refresh, key rotation
API Layer → Typed methods per endpoint
Error Mapping → External errors → internal domain errorsHTTP Client Configuration
const client = {
baseURL: config.API_BASE_URL,
timeout: 10_000, // 10s default, override per endpoint
retries: 3, // Only on 5xx and network errors
retryDelay: (attempt) => // Exponential backoff with jitter
Math.min(1000 * 2 ** attempt + Math.random() * 1000, 30_000),
headers: {
'User-Agent': 'MyApp/1.0',
'Accept': 'application/json',
},
};Authentication Patterns
API Key
// Header-based (preferred)
headers: { 'Authorization': `Bearer ${config.API_KEY}` }
// or
headers: { 'X-API-Key': config.API_KEY }OAuth 2.0 Client Credentials
Fetch token with client_id/client_secret, cache with buffer before expiry. See reference/integration-patterns.md for full implementation.
HMAC Webhook Signature Verification
Use crypto.timingSafeEqual to compare HMAC-SHA256 digests. See reference/integration-patterns.md.
Resilience Patterns
Circuit Breaker
Three states: CLOSED (normal) → OPEN (reject all) → HALF-OPEN (probe). Open after 5 failures in 60s, cooldown 30s. See reference/integration-patterns.md.
Rate Limit Handling
Read x-ratelimit-remaining and x-ratelimit-reset headers. On 429, respect Retry-After. See reference/integration-patterns.md.
Idempotency Keys
For non-idempotent operations, send an Idempotency-Key header generated once per logical operation (e.g. a UUID stored with the pending operation) and reused unchanged on every retry. A key that includes a timestamp changes between retries and defeats deduplication.
Error Mapping
function mapExternalError(status: number, body: unknown): AppError {
switch (status) {
case 400: return new ValidationError('Invalid request to upstream', { upstream: body });
case 401: return new AuthError('Upstream authentication failed');
case 404: return new NotFoundError('Upstream resource not found');
case 429: return new RateLimitError('Upstream rate limit exceeded');
default: return new UpstreamError(`Upstream returned ${status}`, { status, body });
}
}Integration Testing
- Record real API responses as fixtures (sanitize secrets)
- Replay fixtures in tests — never hit live APIs in CI
- Test error paths: timeout, 5xx, rate limit, malformed response
- Test auth token refresh flow
- Verify idempotency key handling
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
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.

