http-client-skill

Create a Go HTTP client wrapper for CBOR and JSON API calls.

Updated Jan 24, 2026
One-click install
npx skills add https://github.com/Penitence1992/go-zero-backend-skills --skill http-client-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: http-client-skill
Source: https://github.com/Penitence1992/go-zero-backend-skills/tree/main/skills/http-client-skill
Command: npx skills add https://github.com/Penitence1992/go-zero-backend-skills --skill http-client-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a reusable HTTP client for external API calls in Go, encapsulating request construction, header management, authentication, CBOR encoding, retry logic, and response decoding to reduce boilerplate.

Core Features & Use Cases

  • HTTP request wrapper: simplified Post-like function with context-aware requests.
  • CBOR + JSON handling: supports CBOR-encoded requests and JSON responses seamlessly.
  • Authentication helpers: built-in BasicAuth and Bearer Token helpers for secure access.
  • Custom headers & retries: easy header customization and resilient retry mechanism.
  • Structured response decoding: typed response models with error handling for consistent APIs.

Quick Start

Use the http-client-skill to implement a client that posts a CBOR payload to an external API, with a Bearer token and retry logic.

Frequently Asked Questions about http-client-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make HTTP requests with CBOR payloads in Go?

You can make HTTP requests with CBOR payloads in Go by using a reusable client wrapper that handles CBOR encoding and JSON response decoding seamlessly. This reduces boilerplate by encapsulating request construction and typed response handling.

What is the best way to add retry logic to external API calls in Go?

The best way to add retry logic to external API calls is to use a client wrapper with a built-in resilient retry mechanism. This simplifies communication with external REST endpoints by automatically retrying failed requests.

Does this HTTP client support both BasicAuth and Bearer Token authentication?

Yes, the HTTP client supports both BasicAuth and Bearer Token authentication. It provides built-in authentication helpers to ensure secure access when communicating with external REST endpoints.

How do I handle JSON response decoding with typed models in Go?

You handle JSON response decoding by mapping responses to typed models with built-in error-safe decoding logic. This structured response handling ensures consistent API interactions across your microservices.

Can I customize HTTP headers for context-aware requests in Go microservices?

Yes, you can customize HTTP headers for context-aware requests in Go microservices. The client wrapper provides easy header customization alongside context-aware request execution for external API integrations.

Why does my HTTP client require boilerplate for external API integrations in Go?

Your HTTP client requires boilerplate because standard Go libraries lack built-in CBOR encoding and retry mechanisms. A reusable client wrapper eliminates this boilerplate by encapsulating request construction, authentication, and error-safe decoding.