跳到正文
FunCoding

搜索

搜索文档、Skill 和 MCP

api-caller

Call any REST API dynamically. Make GET, POST, PUT, DELETE requests to any endpoint with custom headers and JSON body.

安全549src/skillevaluator/tier3/reference_skills/api-caller/SKILL.md

安装

把这段话发给 Claude Code、Codex 或 Cursor。智能体会先检查安全性,你确认后才安装。

读取 https://funcoding.ai/skills/nvidia/skillevaluator/api-caller/install.md ,按里面的步骤帮我安装这个 Skill。

SKILL.md

API Caller Skill

Generic skill to call any REST API dynamically. Can work with OpenAPI specs or direct endpoint calls.

Capabilities

  • Call any REST API endpoint (GET, POST, PUT, DELETE)
  • Parse OpenAPI/Swagger specs to discover endpoints
  • Handle common authentication (API keys, Bearer tokens)
  • JSON request/response handling

Instructions

  1. Read this SKILL.md to choose the direct-call or OpenAPI workflow.
  2. Use scripts/parse_openapi.py first when the user gives an OpenAPI or Swagger spec.
  3. Use scripts/call_api.py for the actual HTTP request.
  4. Return the request result and any recoverable error details to the user.

Scripts

scripts/parse_openapi.py

Use this first when given an API spec URL. Parses an OpenAPI/Swagger spec and returns available operations with parameters. Run commands from the skill base directory; script paths are relative to this SKILL.md file.

Usage:

python scripts/parse_openapi.py <spec_url> [filter_path]

Arguments:

  • <spec_url> - URL to the OpenAPI spec (required)
  • [filter_path] - Optional: filter operations by path substring

Example:

python scripts/parse_openapi.py "https://api.example.com/openapi.json"

Returns: API name, base URL, and list of operations with their parameters, request body schema, etc.

scripts/call_api.py

Call a REST API endpoint directly or using an OpenAPI spec. Run commands from the skill base directory; script paths are relative to this SKILL.md file.

Usage:

python scripts/call_api.py --url <endpoint_url> [options]

Arguments:

  • --url <endpoint_url> - Direct API endpoint URL (required if no --spec)
  • --method <GET|POST|PUT|DELETE> - HTTP method (default: GET)
  • --data <json_string> - Request body as JSON string
  • --headers <json_string> - Custom headers as JSON string
  • --spec <openapi_url> - OpenAPI spec URL (optional, for discovery)
  • --operation <operation_id> - Operation ID from OpenAPI spec
  • --params <json_string> - Path/query parameters as JSON

Examples

Direct API Call (Simple)

python scripts/call_api.py --url "https://api.example.com/data" --method GET

With Query Parameters

# Call API with query parameters appended to URL
python scripts/call_api.py --url "https://en.wikipedia.org/w/api.php" --params '{"action": "query", "titles": "NVIDIA", "format": "json"}'

With Headers (API Key)

# Call API with authentication
python scripts/call_api.py --url "https://api.example.com/data" --headers '{"Authorization": "Bearer TOKEN"}'

POST with JSON Body

# Create a resource
python scripts/call_api.py --url "https://api.example.com/items" --method POST --data '{"name": "test", "value": 123}'

Using OpenAPI Spec (Advanced)

# Discover and call an endpoint from OpenAPI spec
python scripts/call_api.py --spec "https://api.example.com/openapi.json" --operation "getItems" --params '{"param": "value"}'

Notes

  • For APIs requiring authentication, pass API keys via --headers
  • The skill automatically parses JSON responses
  • Timeout is 30 seconds by default
  • For complex API workflows, consider using code-generator skill instead
  • Limiting results: Try common params like ?_limit=N, ?limit=N, ?per_page=N. If unsupported, fetch all and filter with code-generator

Workflow: Using an API Spec

When given an OpenAPI spec URL, follow this workflow:

  1. Parse the spec first with python scripts/parse_openapi.py:

    python scripts/parse_openapi.py "<spec_url>"
    
  2. Review operations - Look at the returned operations, their paths, methods, and parameters

  3. Call the API with python scripts/call_api.py using the discovered endpoint and parameters

When to Use

  • Quick API calls without writing code
  • Exploring new APIs
  • Simple GET requests for data retrieval
  • When you know the exact endpoint URL
  • When given an API spec to explore

When NOT to Use

  • Complex multi-step API workflows (use code-generator)
  • APIs requiring OAuth flows
  • When you need to process response data extensively

相似的 Skill

security-and-hardening
addyosmani/agent-skills103k

security-and-hardening

Hardens code against vulnerabilities. Use when auditing an input handler for vulnerabilities, when handling user input, authentication, data storage, or external integrations, or when checking a login flow is safe against the OWASP Top Ten. Use when building any feature that accepts untrusted data, manages user sessions, or interacts with third-party services. Use when auditing dependencies for known vulnerabilities, triaging package-manager audit findings, or assessing supply-chain risk in a new package. Use when personal data or privacy compliance (GDPR, CCPA) is involved.

安全

archify
tt-a1i/archify80k

archify

Create polished, validated architecture, workflow, sequence, data-flow, and lifecycle/state diagrams as explorable standalone HTML with inline SVG, dark/light themes, optional trace motion, and PNG/JPEG/WebP/SVG/WebM export. Accept plain-language requirements or pasted Mermaid flowchart, sequenceDiagram, and stateDiagram input; inspect repository evidence when the diagram must reflect real code. Use when the user asks to visualize system architecture, infrastructure, cloud/security/network topology, technical workflows, API call sequences, request lifecycles, data pipelines, ETL/ELT, data lineage, state machines, or to convert/beautify Mermaid. Also use for everyday subjects with steps, parts, relationships, or states: a leave or travel plan, an application or approval process, a back-and-forth such as renting, where money or documents go, or where an application or order stands. Not for numeric charts or dashboards.

安全

security-research
code-yeongyu/oh-my-openagent70k

security-research

Team Mode security research skill. Orchestrates 3 vulnerability hunters and 2 PoC engineers to audit a codebase in parallel, prove exploitability, classify root causes, and calibrate severity by actual exploitability. Use for security review, vulnerability research, exploitability audit, pre-release security check, threat model validation, and `/security-research`. Triggers: 'security-research', 'security research', 'security review', 'vulnerability audit', 'exploitability audit', '보안 리뷰', '취약점 감사'.

安全

007
sickn33/agentic-awesome-skills47k

007

Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

安全

open-code-review
alibaba/open-code-review45k

open-code-review

Performs AI-powered code review on Git changes using the `ocr` CLI from alibaba/open-code-review. Use when the user asks to review code, review a pull request, review staged/unstaged changes, review a commit, or compare branches for code quality issues. Produces line-level review comments and can automatically apply fixes when requested. With appropriate review rules, can detect various types of issues including bugs, security vulnerabilities, performance problems, and code quality concerns.

安全

open-code-review
alibaba/open-code-review45k

open-code-review

Performs AI-powered code review on Git changes using the `ocr` CLI from alibaba/open-code-review. Use when the user asks to review code, review a pull request, review staged/unstaged changes, review a commit, or compare branches for code quality issues. Produces line-level review comments and can automatically apply fixes when requested. With appropriate review rules, can detect various types of issues including bugs, security vulnerabilities, performance problems, and code quality concerns.

安全