360 Secure SkillHub
360 安全技能中心

api-connector-builder

用于在宿主仓库中添加新的 API connector 或 provider 的开发 Skill:先学习现有集成的文件布局、配置模型、鉴权、错误处理、分页/重试、注册与测试风格,再按仓库原生分层实现配置/schema、传输、映射、入口、注册和测试,避免另起架构。质量清单要求配置校验、鉴权与错误处理明确、分页/重试符合仓库规范、注册发现完整、测试风格一致。

affaan-m
热度 72.01
最近更新 2026-10-18 16:17:41
分类:开发依赖:读写文件应用场景:代码生成 / API 集成

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add affaan-m/ecc/api-connector-builder
Metadata
name
api-connector-builder
description
Build a new API connector or provider by matching the target repo's existing integration pattern exactly. Use when adding one more integration without inventing a second architecture.
metadata
{"version":"1.0.0","origin":"ECC direct-port adaptation"}

API Connector Builder

Use this when the job is to add a repo-native integration surface, not just a generic HTTP client.

The point is to match the host repository's pattern:

  • connector layout
  • config schema
  • auth model
  • error handling
  • test style
  • registration/discovery wiring

When to Use

  • "Build a Jira connector for this project"
  • "Add a Slack provider following the existing pattern"
  • "Create a new integration for this API"
  • "Build a plugin that matches the repo's connector style"

Guardrails

  • do not invent a new integration architecture when the repo already has one
  • do not start from vendor docs alone; start from existing in-repo connectors first
  • do not stop at transport code if the repo expects registry wiring, tests, and docs
  • do not cargo-cult old connectors if the repo has a newer current pattern

Workflow

1. Learn the house style

Inspect at least 2 existing connectors/providers and map:

  • file layout
  • abstraction boundaries
  • config model
  • retry / pagination conventions
  • registry hooks
  • test fixtures and naming

2. Narrow the target integration

Define only the surface the repo actually needs:

  • auth flow
  • key entities
  • core read/write operations
  • pagination and rate limits
  • webhook or polling model

3. Build in repo-native layers

Typical slices:

  • config/schema
  • client/transport
  • mapping layer
  • connector/provider entrypoint
  • registration
  • tests

4. Validate against the source pattern

The new connector should look obvious in the codebase, not imported from a different ecosystem.

Reference Shapes

Provider-style

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

Connector-style

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

TypeScript plugin-style

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

Quality Checklist

  • matches an existing in-repo integration pattern
  • config validation exists
  • auth and error handling are explicit
  • pagination/retry behavior follows repo norms
  • registry/discovery wiring is complete
  • tests mirror the host repo's style
  • docs/examples are updated if expected by the repo

Related Skills

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