技能 api-integration-specialist
🔌

api-integration-specialist

安全 🌐 网络访问🔑 环境变量⚙️ 外部命令

使用生產就緒模式整合 API

建構 API 整合既複雜又容易出錯。本技能提供有關身份驗證、錯誤處理、速率限制和重試邏輯的專業指導,以建立可靠、安全的 API 用戶端。

支持: Claude Codex Code(CC)
📊 69 充足
1

下载技能 ZIP

2

在 Claude 中上传

前往 设置 → 功能 → 技能 → 上传技能

3

开启并开始使用

测试它

正在使用“api-integration-specialist”。 Help me integrate the Stripe API for payment processing

预期结果:

  • Use environment variables for Stripe secret key: process.env.STRIPE_SECRET_KEY
  • Create API client with proper error handling for 4xx and 5xx responses
  • Implement exponential backoff retry for transient failures
  • Handle rate limits with proper 429 response processing
  • Verify webhook signatures using Stripe-Signature header and HMAC SHA256
  • Log all API interactions for debugging and monitoring

正在使用“api-integration-specialist”。 Set up OAuth for accessing the GitHub API

预期结果:

  • Register OAuth app to get client_id and client_secret
  • Implement authorization URL generation with required scopes
  • Exchange authorization code for access token securely
  • Store tokens encrypted, never in source code
  • Implement token refresh before expiration
  • Use scoped tokens with minimum required permissions

正在使用“api-integration-specialist”。 Handle rate limits from a third-party API

预期结果:

  • Track X-RateLimit-Remaining headers from responses
  • Implement sliding window or fixed window rate limiter
  • Use exponential backoff when receiving 429 responses
  • Queue requests during rate limit windows
  • Monitor rate limit headers proactively, not just on errors

安全审计

安全
v5 • 1/17/2026

This is a documentation-only skill containing guidance and code examples for secure API integration. All static findings are false positives - the patterns flagged (process.env credential access, HMAC signatures, HTTP network calls) are legitimate best practices for API integration, demonstrated in educational code examples, not executable malicious code. The skill promotes security by teaching proper credential storage, webhook verification, and error handling.

2
已扫描文件
556
分析行数
3
发现项
5
审计总数
审计者: claude 查看审计历史 →

质量评分

38
架构
100
可维护性
87
内容
19
社区
100
安全
91
规范符合性

你能构建什么

建構 API 用戶端函式庫

建立可重複使用、具有正確錯誤處理和重試邏輯的安全 API 用戶端函式庫

整合第三方服務

使用生產就緒模式連接 Stripe、Twilio 或 SendGrid 等服務

實作 Webhook 處理程式

設定具有簽章驗證和事件處理的安全 Webhook 端點

试试这些提示

基本 API 用戶端
Help me build an API client for SERVICE_NAME. I need to implement authentication using API keys stored in environment variables, proper error handling, and retry logic with exponential backoff.
OAuth 流程
Guide me through implementing OAuth 2.0 authorization code flow for SERVICE_NAME. Include token exchange, refresh logic, and secure storage of credentials.
Webhook 安全性
Help me create a secure webhook handler for SERVICE_NAME. I need signature verification, event parsing, and proper error responses.
速率限制
Design a rate limiting strategy for my API client. I need to track request counts, implement backoff when throttled, and gracefully handle 429 responses.

最佳实践

  • 將所有 API 憑證儲存在環境變數或密鑰管理系統中
  • 對暫時性故障實作指數退避重試邏輯
  • 在處理傳入事件之前務必驗證 Webhook 簽章

避免

  • 將 API 金鑰直接硬編碼在原始碼中
  • 忽略速率限制響應並繼續對 API 進行轟炸
  • 對網路故障或無效響應跳過錯誤處理

常见问题

支援哪些身份驗證方法?
本技能涵蓋 API 金鑰、OAuth 2.0(授權碼、用戶端憑證流程)、JWT 權杖和 Bearer 權杖身份驗證。
我應該預期什麼樣的速率限制?
速率限制因 API 提供者而異。本技能提供使用退避策略處理 429 響應的模式。
我可以對 GraphQL API 使用這個嗎?
是的。身份驗證、錯誤處理和重試的模式適用於具有適當查詢建構的 GraphQL 端點。
我的 API 金鑰資料安全嗎?
本技能強調僅將憑證儲存在環境變數中。本技能不會傳輸或儲存任何憑證。
為什麼我收到 401 錯誤?
檢查 API 金鑰有效性、權杖到期時間、正確的 Authorization 標頭格式,以及請求端點所需的 OAuth 範圍。
這與使用官方 SDK 相比如何?
本技能提供低層模式,在官方 SDK 不可用或需要超出 SDK 能力的自訂整合邏輯時很有用。