agentleFS
NVIDIAKnown publisherNVIDIA/SkillEvaluator/src/skillevaluator/tier3/reference_skills/api-caller/SKILL.md

api-caller

Skill656 starsChanged 6 days agoApache-2.0View on GitHub

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

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Call any REST API endpoint (GET, POST, PUT, DELETE)

    line 14
  2. Very specific:

    Read this SKILL.md to choose the direct-call or OpenAPI workflow.

    line 21
  3. Very specific:

    Use scripts/parse_openapi.py first when the user gives an OpenAPI or Swagger spec.

    line 22
  4. Very specific:

    Use scripts/call_api.py for the actual HTTP request.

    line 23
  5. Very specific:

    Use this first: when given an API spec URL.

    line 30
  6. Very specific:

    Call a REST API endpoint directly or using an OpenAPI spec.

    line 50
  7. Distinctive:

    When given an OpenAPI spec URL, follow this workflow:

    line 112
  8. Distinctive:

    Review operations: - Look at the returned operations, their paths, methods, and parameters

    line 119
  9. Distinctive:

    When you know the exact endpoint URL

    line 128
  10. Distinctive:

    When you need to process response data extensively

    line 135

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.