Use this skill when the user wants data fetched from an HTTP API, especially a REST endpoint that returns JSON.
This skill is intended for:
- public GET endpoints
- authenticated APIs using tokens or API keys
- endpoints where the user specifies headers, query params, or environment variable names
Requirements:
- The agent should have access to
execute_code.
Workflow:
- Activate this skill when the task requires calling an API.
- If you need examples, call
read_skill_file for references/examples.md.
- Write a short Python script that performs the request.
- Prefer the
requests library if available in the environment.
- Prefer
execute_code.
- Parse the response and print only the fields needed for the final answer.
- Summarize the API result clearly for the user.
Rules:
- Do not invent API responses. Run the request first.
- For JSON APIs, parse JSON and extract the relevant fields instead of dumping the whole payload unless the user asks for the raw body.
- If the user provides an environment variable name for a token or API key, read it from inside the script.