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。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 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-patternsmcp-server-patternsgithub-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
评论
- …
同一仓库的更多技能
accessibility
280k帮你的智能体创建人人都能使用的界面。确保网站和应用对残障人士友好,比如失明或行动不便的用户也能顺畅使用。
agent-architecture-audit
280k让你的智能体检查一切是否正常运行。它能找出并修复 AI 系统中的问题,确保系统按预期工作。
agent-eval
280k帮你的智能体比较不同的 AI 编程工具。它能衡量哪个工具在特定任务上更快、更便宜、更可靠。
agent-harness-construction
280k让你的智能体更好地理解如何完成任务。它会优化智能体使用的工具和指令,提高成功的几率。