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.
In this repository7 other files it gives its agents.
- docs/AGENTS.mdAGENTS.md
- skillevaluatorSkill
- calculatorSkill
- create-custom-graderSkill
- task-listSkill
- text-analyzerSkill
- simpleSkill
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
- Distinctive: line 14
Call any REST API endpoint (GET, POST, PUT, DELETE)
- Very specific: line 21
Read this SKILL.md to choose the direct-call or OpenAPI workflow.
- Very specific: line 22
Use scripts/parse_openapi.py first when the user gives an OpenAPI or Swagger spec.
- Very specific: line 23
Use scripts/call_api.py for the actual HTTP request.
- Very specific: line 30
Use this first: when given an API spec URL.
- Very specific: line 50
Call a REST API endpoint directly or using an OpenAPI spec.
- Distinctive: line 112
When given an OpenAPI spec URL, follow this workflow:
- Distinctive: line 119
Review operations: - Look at the returned operations, their paths, methods, and parameters
- Distinctive: line 128
When you know the exact endpoint URL
- Distinctive: line 135
When you need to process response data extensively
≈ “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.
Files
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
- Read this SKILL.md to choose the direct-call or OpenAPI workflow.
- Use
scripts/parse_openapi.pyfirst when the user gives an OpenAPI or Swagger spec. - Use
scripts/call_api.pyfor the actual HTTP request. - 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 GETWith 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-generatorskill instead - Limiting results: Try common params like
?_limit=N,?limit=N,?per_page=N. If unsupported, fetch all and filter withcode-generator
Workflow: Using an API Spec
When given an OpenAPI spec URL, follow this workflow:
- Parse the spec first with
python scripts/parse_openapi.py:python scripts/parse_openapi.py "<spec_url>" - Review operations - Look at the returned operations, their paths, methods, and parameters
- Call the API with
python scripts/call_api.pyusing 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
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
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.

