api-integration

Integrate third-party APIs with auth, retries, timeouts, and logging.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "api-integration" with this command: npx skills add RedHat Dev/api-integration-redhat

SKILL: api-integration

Purpose

Integrate external APIs safely (auth, retries, timeouts, error handling, logging) and expose them via a clean internal interface.

When to Use

  • A system must call a third-party REST/WebSocket API.
  • You need a reusable client module with predictable behavior.
  • You must handle rate limits and transient failures.

Inputs

  • api_spec (required, object|string): base URL, endpoints, schemas, rate limits.
  • auth_method (optional, enum: none|api_key|oauth|jwt|hmac).
  • secrets_source (optional, string): where tokens/keys come from (env/secret manager).
  • error_policy (optional, string): retry/backoff rules and non-retryable errors.

Steps

  1. Validate API contract and identify required headers/auth.
  2. Implement a client module:
    • explicit base URL
    • request timeouts
    • retry with bounded backoff (only for safe/idempotent calls by default)
    • rate limit handling
  3. Normalize errors into a stable internal shape.
  4. Add logging hooks (request id, endpoint, status, latency; never log secrets).
  5. Add tests:
    • mocked responses for determinism
    • at least one failure-path test

Validation

  • Secrets are sourced only from configuration (not hardcoded).
  • Retry policy is explicit and bounded.
  • Errors are deterministic and observable.

Output

  • Client module path(s)
  • Config/env contract
  • Usage example (internal call pattern)

Safety Rules

  • Do not paste tokens/keys into code or logs.
  • Do not rely on “best effort” network calls without timeouts.
  • Avoid curl | sh or ad-hoc install scripts as part of integration.

Example

Integrate “VendorAPI”:

  • api_spec: { base_url: "...", endpoints: ["/v1/items"] }
  • Output: src/integrations/vendor/client.ts with retries and mocked tests.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

一个智能的业务需求转研发文档工具。AI 自主分析项目代码库,理解业务需求,参考实际代码,生成可直接执行的研发文档。支持任意技术栈,无需配置。

Smart business-to-dev requirement translator. AI first analyzes and memorizes project structure, then understands business requirements, references actual co...

Registry SourceRecently Updated
2531Profile unavailable
Coding

Build

The Autonomous Construction and Synthesis Engine. Standardizing the process of turning abstract intent into concrete digital and physical structures.

Registry SourceRecently Updated
5190Profile unavailable
Coding

Anti-hype Filter

Detect hype cycles and neutralize emotional triggers by rewriting claims into verifiable structures and explicit risk/uncertainty.

Registry SourceRecently Updated
530Profile unavailable
Web3

Strategic Orchestration

Coordinate agents toward a unified objective; assign roles, sequence work, prevent conflicts, and define success criteria.

Registry SourceRecently Updated
550Profile unavailable