跳到正文
Skillpedia
API 与服务器(后端)280k · #137

api-connector-builder

它能做什么

这个工具可以为软件项目创建新的集成,并且与项目中已有的集成风格完全一致。它能确保新增部分与现有结构完美契合,不会引入新的做事方式。

适用场景

  • ✓为现有项目接入某个新服务(例如 Jira)时。
  • ✓开发一个需要与其他 API 通信的新功能,并且要沿用既有模式时。
  • ✓在不改变架构的前提下,为系统增加一种新的集成类型时。

技能链接

https://github.com/affaan-m/ECC/blob/main/pi/core/skills/api-connector-builder/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/affaan-m/ECC/blob/main/pi/core/skills/api-connector-builder/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“按照本项目中已有连接器的模式,为邮件服务创建一个连接器。”

每周 5 个新技能,1 分钟读完。

工作原理

工具会先分析现有集成是如何构建的,包括结构、配置和身份验证方式。然后,它会照着这种风格构建新的集成,确保新部分能与项目完美融合并正常工作。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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
常见问题

什么是“连接器”(connector)或“提供者”(provider)?

它是一段让一个软件与其他服务或 API 通信并调用其功能的代码,相当于一座桥梁。

为什么要遵循已有的模式?

这样可以让代码保持有序、易于理解和维护,也避免项目里对类似功能使用不同的写法。

我能用这个工具创建一个全新的集成吗?

不能,它的主要目标是复用项目中已有的模式。如果项目中还没有相关模式,这个工具可能就不太适用。

详情

作者的原始描述

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.

repo: affaan-m/ECC

热度

GitHub 星标
280k
排名
#137
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能