mcpbeat

Requests

microsoft/requests

Best practices for HTTP client usage with Requests including sessions, error handling, and timeouts.

401 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
2448
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/microsoft/debugpy --skill requests

The instruction itself

7 sections, as written by the author

Skill: Requests

Best practices for HTTP client usage with Requests including sessions, error handling, and timeouts.

When to Use

Apply this skill when making HTTP requests with the Requests library — sessions, auth, error handling, retries, and file uploads.

Sessions

  • Use requests.Session() for connection pooling and persistent headers/cookies across multiple requests.
  • Configure session.headers for default auth tokens and user-agent strings.
  • Use session.mount() with HTTPAdapter for retry logic.

Error Handling

  • Always call response.raise_for_status() to surface HTTP errors as exceptions.
  • Always set timeout=(connect_timeout, read_timeout) — never use infinite timeouts.
  • Handle requests.ConnectionError, requests.Timeout, and requests.HTTPError explicitly.

Retries

  • Use urllib3.util.Retry with HTTPAdapter for automatic retries with backoff.
  • Configure status-based retries for transient errors (429, 500, 502, 503, 504).

Security

  • Never disable SSL verification (verify=False) in production.
  • Pass credentials via environment variables, not hardcoded strings.
  • Use auth= parameter for HTTP auth rather than manually setting headers.

Pitfalls

  • Don't forget timeouts — they default to None (infinite wait).
  • Don't use requests.get() for high-throughput — use sessions.
  • Close responses from streaming requests (stream=True) to release connections.

How to use it

Copy the folder

Take microsoft/requests from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.