Community编程与开发github.com

DanhDue/api_integration

来自 DanhDue/ai-agent-tools 的智能体技能 'api_integration',用于集成和调用外部 API。

api_integration 是什么?

该技能(名为 'api_integration')是 DanhDue/ai-agent-tools 工具集的一部分,专为 AI 智能体(如 Claude Code、Cursor、Codex 等)设计,以简化外部 API 的集成与调用。它提供了一套标准化的接口和指令,使智能体能够高效地发送 HTTP 请求、处理响应、管理认证令牌以及解析 JSON 或其他格式的数据。通过使用此技能,开发者可以避免重复编写 API 调用逻辑,从而专注于更高级的任务。该技能支持多种开发平台,并遵循清晰的 SKILL.md 文档中所定义的约定,确保在不同环境下的可移植性和一致性。它适用于需要与 RESTful 或 GraphQL API 交互的各种场景,从数据获取到服务编排。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/DanhDue/ai-agent-tools/tree/main/skills/api_integration

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

api_integration 是做什么的?

来自 DanhDue/ai-agent-tools 的智能体技能 'api_integration'。

该技能提供标准化的方式,让 AI 智能体能够集成并调用外部 API,包括处理 HTTP 请求、响应解析及认证机制。

使用指南

  1. 安装:确保您的开发环境中已安装 DanhDue/ai-agent-tools 工具集。
  2. 配置:根据具体 API 要求,设置必要的环境变量(如 API_KEY、API_ENDPOINT)。
  3. 调用技能:在智能体指令中引用此技能,并按照文档格式传入 API 参数。

示例

# 示例:使用该技能调用外部 RESTful API
response = await call_api(
    endpoint="https://api.example.com/v1/data",
    method="GET",
    headers={"Authorization": "Bearer YOUR_TOKEN"}
)
print(response.json())

注意事项

  • 确保 API 密钥等敏感信息通过安全方式存储,而非硬编码。
  • 该技能支持常见的认证方式:Bearer Token、API Key 及 Basic Auth。
  • 对于复杂请求(如 GraphQL),可扩展此技能以适配具体需求。

Individual skills in this repo

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

DanhDue/android-api-integration

Agent skill 'android-api-integration' from DanhDue/ai-agent-tools.

DanhDue/android-ui-audit

Agent skill 'android-ui-audit' from DanhDue/ai-agent-tools.

DanhDue/architecture-audit

Agent skill 'architecture-audit' from DanhDue/ai-agent-tools.

DanhDue/brainstorming

Agent skill 'brainstorming' from DanhDue/ai-agent-tools.

DanhDue/build_fix

Agent skill 'build_fix' from DanhDue/ai-agent-tools.

DanhDue/check_secure_files

Agent skill 'check_secure_files' from DanhDue/ai-agent-tools.

DanhDue/code-health-audit

Agent skill 'code-health-audit' from DanhDue/ai-agent-tools.

DanhDue/copy_secure_configurations

Agent skill 'copy_secure_configurations' from DanhDue/ai-agent-tools.

DanhDue/create_new_feature

Agent skill 'create_new_feature' from DanhDue/ai-agent-tools.

DanhDue/decision-records

Agent skill 'decision-records' from DanhDue/ai-agent-tools.

DanhDue/dev-brainstorming

Agent skill 'dev-brainstorming' from DanhDue/ai-agent-tools.

DanhDue/dev-designer

Agent skill 'dev-designer' from DanhDue/ai-agent-tools.

DanhDue/dev-implementation

Agent skill 'dev-implementation' from DanhDue/ai-agent-tools.

DanhDue/dev-lifecycle

Agent skill 'dev-lifecycle' from DanhDue/ai-agent-tools.

DanhDue/dispatching-parallel-agents

Agent skill 'dispatching-parallel-agents' from DanhDue/ai-agent-tools.

DanhDue/doc-brainstorming

Agent skill 'doc-brainstorming' from DanhDue/ai-agent-tools.

DanhDue/doc-designer

Agent skill 'doc-designer' from DanhDue/ai-agent-tools.

DanhDue/doc-implementation

Agent skill 'doc-implementation' from DanhDue/ai-agent-tools.

DanhDue/doc-lifecycle

Agent skill 'doc-lifecycle' from DanhDue/ai-agent-tools.

DanhDue/doc_quality_check

Agent skill 'doc_quality_check' from DanhDue/ai-agent-tools.

相关技能