Notre avis
Cette compétence permet d'appeler des API REST depuis Python, de parser les réponses JSON et de ne renvoyer que les champs utiles.
Points forts
- Gère les API publiques et authentifiées via jetons ou clés
- Extrait automatiquement les champs pertinents au lieu de déverser tout le payload
- Fournit des messages d'erreur clairs avec le code de statut HTTP
- S'appuie sur la bibliothèque requests, standard dans l'écosystème Python
Limites
- Nécessite que l'outil execute_code soit disponible dans l'environnement
- Pas de gestion intégrée des retries, du rate limiting ou du streaming
- Limité aux API HTTP/JSON, pas prévu pour d'autres protocoles
Utilisez cette compétence lorsque vous devez récupérer des données depuis une API REST JSON, qu'elle soit publique ou protégée par un jeton.
Ne l'utilisez pas pour des API non-JSON, pour des flux en continu, ou si l'utilisateur demande explicitement le corps brut de la réponse.
Analyse de sécurité
PrudenceThe skill uses execute_code and network access for legitimate REST API calls. It does not instruct destructive or exfiltrating actions, but because it involves executing generated code and handling credentials, it warrants caution.
- •Skill instructs the agent to write and execute Python code (execute_code), which can perform arbitrary actions, including network requests.
- •Uses environment variables for tokens/API keys; if output handling is careless, secrets could be printed to user or logs.
- •No explicit guidance to avoid including secrets in output or to mask sensitive headers/responses.
Exemples
Call https://official-joke-api.appspot.com/random_joke and show me the setup and punchline.Use the GitHub API to get the latest commit on repository octocat/Hello-World. Read the token from the environment variable GITHUB_TOKEN and return the commit message and author.Call a REST API at https://api.example.com/data with header Authorization: Bearer mytoken, parse the JSON, and print the 'status' and 'count' fields.name: rest-api-caller description: Call REST APIs from Python, parse JSON responses, and report the useful fields back to the user. allowed-tools: execute_code
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
Expert Next.js App Router
Developpement
Un skill qui transforme Claude en expert Next.js App Router.
Générateur de README
Developpement
Crée des README.md professionnels et complets pour vos projets.
Rédacteur de Documentation API
Developpement
Génère de la documentation API complète au format OpenAPI/Swagger.