← 返回
未分类 中文

LinkSKILL

Universal API integration skill for enterprise platforms. Connect to any platform using Swagger/OpenAPI discovery.
通用 API 集成技能,面向企业平台。使用 Swagger/OpenAPI 发现机制连接任意平台。
hgvgfgvh
未分类 clawhub v1.0.1 2 版本 95289 Key: 无需
★ 0
Stars
📥 13,026
下载
💾 0
安装
2
版本
#latest

概述

LinkSKILL — Universal Platform API Integration

LinkSKILL is a config-driven API integration skill for enterprise platforms.

Given a Swagger/OpenAPI endpoint and auth settings, it can discover APIs, authenticate, and execute requests with minimal manual setup.

When to Use This Skill

Use LinkSKILL when you need to:

  • Integrate with a new internal/external platform quickly.
  • Explore unknown APIs from Swagger/OpenAPI docs.
  • Standardize auth + request execution across multiple platforms.
  • Run repeatable API calls from CLI without custom one-off scripts.

Core Workflow (4-Step Closed Loop)

  1. Identify platform

Read scripts/platform_config.json and select active_platform (or pass --platform explicitly).

  1. Discover APIs

python scripts/swagger_loader.py --config scripts/platform_config.json --mode list

  1. Authenticate

python scripts/auth_manager.py --config scripts/platform_config.json

  1. Execute request

python scripts/http_request_tool.py --config scripts/platform_config.json --method POST --endpoint "/api/xxx" --json-body '...'

Tip: Use search and detail before execution to reduce trial-and-error:

  • --mode search --keyword "keyword"
  • --mode detail --path "/api/xxx" --method POST

Tool Responsibilities

ToolResponsibility
------
swagger_loader.pyFetch and parse Swagger 2.0 / OpenAPI 3.x; supports list, search, detail, tags, cache
auth_manager.pyHandle auth login/token retrieval and local token cache management
http_request_tool.pySend HTTP requests, inject auth headers, and auto re-auth + retry on 401

Configuration Model

All behavior is driven by scripts/platform_config.json.

Required top-level fields

  • active_platform: default platform ID.
  • platforms: map of platform definitions.

Typical platform definition

  • name: human-readable platform name.
  • gateway: base URL used by request executor.
  • swagger.url: OpenAPI/Swagger endpoint URL.
  • swagger.auth_required: whether Swagger endpoint needs auth header.
  • auth.type: one of bearer_token, api_key, basic, none.
  • default_headers: default request headers.

Auth field reference (for token login)

  • auth.login_endpoint: login path (joined with gateway).
  • auth.login_body: login payload.
  • auth.token_field: token extraction path (for example data.token).
  • auth.token_header: header name (default Authorization).
  • auth.token_prefix: header prefix (default Bearer ).

Authentication Strategies

LinkSKILL supports:

  • none: no auth required.
  • api_key: static key from config.
  • basic: build Basic credential from username/password.
  • bearer_token: login API + token extraction + local cache.

Token cache file: scripts/.token_cache.json

Discovery Modes (swagger_loader.py)

  • list: print all available endpoints.
  • search: fuzzy-match endpoints by path/summary/description/tags.
  • detail: show parameters, request body schema/example, and response schema.
  • tags: show API groups.
  • cache: print local swagger cache location.

Swagger cache directory: scripts/.swagger_cache/

Request Execution (http_request_tool.py)

Supports:

  • Methods: GET, POST, PUT, DELETE, PATCH
  • URL styles: full --url or --endpoint + gateway
  • Payload: --json-body or --json-file
  • Query params: --params
  • Extra headers: --headers

On 401, the tool can trigger auth_manager.py --force-login and retry once automatically.

Recommended Operating Pattern

For stable integrations, run in this order:

  1. list or search to locate target endpoint.
  2. detail to inspect params/schema.
  3. Authenticate and verify token cache.
  4. Execute with minimal body first, then iterate.
  5. Use cached swagger/token for faster repeated calls.

Troubleshooting

  • Platform not found: check active_platform and platforms keys.
  • Swagger fetch failed: verify swagger.url, network, and TLS/headers.
  • Token extraction failed: correct auth.token_field based on real login response.
  • 401 on request: verify token TTL/login payload and header prefix.
  • Non-JSON response: inspect raw response text and endpoint behavior.

Onboarding a New Platform

  1. Add a new platform under platforms in scripts/platform_config.json.
  2. Fill gateway, swagger, auth, and optional default_headers.
  3. Set active_platform (or use --platform).
  4. Run the 4-step workflow end-to-end and validate one successful API call.

Notes and Constraints

  • Designed for CLI-driven API integration workflows.
  • Assumes APIs are discoverable via Swagger/OpenAPI endpoint.
  • Uses local JSON files for cache; suitable for local/dev automation.

版本历史

共 2 个版本

  • v1.0.1 当前
    2026-05-21 11:59 安全 安全
  • v1.0.0
    2026-04-30 09:56 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

server-log-analysis-en

hgvgfgvh
通过SSH连接远程服务器,读取同级 config.yaml 了解服务元数据和日志位置,仅下载所需的日志片段到本地
★ 0 📥 645

ai-architecture-harness-zh

hgvgfgvh
建立 AI 编程架构护栏,防止架构坍缩、功能回退和迭代漂移。适用于提及 AI 编程、Agent 编程、架构坍缩、Harness Engineering、设计意图、验收规则、黄金法则、架构测试,或希望代码库更适合 AI Agent 安全修改的
★ 0 📥 835

server-log-analysis

hgvgfgvh
通过 SSH 连接远程服务器,读取同级 config.yaml 理解服务信息与日志位置,按需下载相关日志片段到本地 temp 目录,并分析日志定位问题。适用于用户要求排查远程服务日志、分析服务端异常或基于 SSH 访问进行日志诊断的场景。
★ 0 📥 816