Agent skill
rest-api-caller
Call REST APIs from Python, parse JSON responses, and report the useful fields back to the user.
Install this agent skill to your Project
npx add-skill https://github.com/OpenBMB/ChatDev/tree/main/.agents/skills/rest-api-caller
SKILL.md
REST API Caller
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_fileforreferences/examples.md. - Write a short Python script that performs the request.
- Prefer the
requestslibrary 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
os.environinside the script. - If the endpoint requires auth and no credential source is provided, say what is missing.
- If the request fails, report the HTTP status code or error message clearly.
- Do not claim there is a generic execution-environment issue unless the tool call actually returned one.
Demo endpoint:
GET https://official-joke-api.appspot.com/random_joke
Expected behavior for the demo endpoint:
- Fetch one random joke
- Return the setup and punchline in a readable format
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
python-scratchpad
Use the existing Python execution tools as a scratchpad for calculations, data transformation, and quick script-based validation.
greeting-demo
Greet the user in a distinctive, easy-to-verify format for skill activation demos.
handoff
Compact the current conversation into a handoff document for another agent to pick up.
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
obsidian-vault
Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.
scaffold-exercises
Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
Didn't find tool you were looking for?