Communitygithub.com

API連接器構建器

通過匹配目標倉庫的模式來構建新的API連接器或提供者。

API連接器構建器 是什麼?

此技能旨在指導AI代理在已有集成模式的代碼庫中構建新的API連接器或提供者。與其從頭構建一個通用的HTTP客戶端,不如專注於匹配宿主倉庫的現有架構,包括連接器佈局、配置模式、認證模型、錯誤處理、測試風格以及註冊/發現機制。該技能強調學習現有的「內部風格」,查看至少兩個已有的連接器/提供者,然後在這些模式的基礎上進行構建。它支持多種框架,包括Python的provider-style、connector-style和TypeScript的plugin-style。該技能還包含嚴格的防護措施,以防止創建新的架構、從供應商文檔而非內部示例開始,或忽略測試、文檔和註冊等必要步驟。最終的檢查清單確保新的連接器能無縫融入代碼庫,而非來自外部生態系統。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/tree/main/skills/api-connector-builder

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

API 連接器構建器

當任務是添加一個倉庫原生的整合介面,而不僅僅是通用的 HTTP 客戶端時,請使用此方法。

重點在於匹配宿主倉庫的模式:

  • 連接器佈局
  • 配置模式
  • 認證模型
  • 錯誤處理
  • 測試風格
  • 註冊/發現接線

使用時機

  • "為此專案構建一個 Jira 連接器"
  • "按照現有模式添加一個 Slack 提供者"
  • "為此 API 創建一個新的整合"
  • "構建一個符合倉庫連接器風格的插件"

防護措施

  • 如果倉庫已有整合架構,請勿發明新的架構
  • 不要僅從供應商文檔開始;應先從現有的倉庫內連接器開始著手
  • 如果倉庫預期需要註冊接線、測試和文檔,不要只停留在傳輸代碼層面
  • 如果倉庫有更新的當前模式,不要盲目複製舊的連接器

工作流程

1. 學習內部風格

檢查至少兩個現有的連接器/提供者,並對應其:

  • 文件佈局
  • 抽象邊界
  • 配置模型
  • 重試/分頁慣例
  • 註冊鉤子
  • 測試固定裝置及命名

2. 縮小目標整合範圍

僅定義倉庫實際需要的表面:

  • 認證流程
  • 關鍵實體
  • 核心讀/寫操作
  • 分頁和速率限制
  • Webhook 或輪詢模型

3. 建立在倉庫原生層

典型分層:

  • 配置/模式
  • 客戶端/傳輸層
  • 映射層
  • 連接器/提供者入口點
  • 註冊
  • 測試

4. 針對來源模式進行驗證

新的連接器在代碼庫中應顯得自然而然,而不是從不同的生態系統引入的。

參考形狀

提供者風格

providers/
  existing_provider/
    __init__.py
    provider.py
    config.py

連接器風格

integrations/
  existing/
    client.py
    models.py
    connector.py

TypeScript 插件風格

src/integrations/
  existing/
    index.ts
    client.ts
    types.ts
    test.ts

品質檢查清單

  • 符合現有的倉庫內整合模式
  • 存在配置驗證
  • 認證和錯誤處理明確
  • 分頁/重試行為遵循倉庫規範
  • 註冊/發現接線完整
  • 測試鏡像宿主倉庫的風格
  • 如果倉庫預期需要,更新文檔/範例

相關技能

  • backend-patterns
  • mcp-server-patterns
  • github-ops

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

相關技能