Skip to main content

rest-api-caller

Call REST APIs from Python, parse JSON responses, and report the useful fields back to the user.

소스 정보

저장소
OpenBMB/ChatDev
최근 소스 활동
2026년 3월 10일 18:38
감지된 SKILL.md 언어
영어
스타
34,526
포크
4,323

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
2 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
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: 1. Activate this skill when the task requires calling an API. 2. If you need examples, call `read_skill_file` for `references/examples.md`. 3. Write a short Python script that performs the request. 4. Prefer the `requests` library if available in the environment. 5. Prefer `execute_code`. 6. Parse the response and print only the fields needed for the final answer. 7. Summarize the API result clearly for the user. Rules: 1. Do not invent API responses. Run the request first. 2. For JSON APIs, parse JSON and extract the relevant fields instead of dumping the whole payload unless the user asks for the raw body. 3. If the user provides an environment variable name for a token or API key, read it from `os.environ` inside the script. 4. If the endpoint requires auth and no credential source is provided, say what is missing. 5. If the request fails, report the HTTP status code or error message clearly. 6. 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
GitHub에서 보기