go-cache

Generates Go cache implementations backed by Redis with two-file port and implementation patterns.

Updated Jan 4, 2026
One-click install
npx skills add https://github.com/cristiano-pacheco/ai-tools --skill go-cache
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-cache
Source: https://github.com/cristiano-pacheco/ai-tools/tree/main/skills/go-cache
Command: npx skills add https://github.com/cristiano-pacheco/ai-tools --skill go-cache

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the creation of Go cache layers using Redis, ensuring consistent implementation of caching patterns for improved application performance and reduced database load.

Core Features & Use Cases

  • Boilerplate Generation: Creates both the cache port interface and the Redis-backed implementation, adhering to the two-file pattern.
  • Variant Support: Generates code for both boolean flag caches (for existence checks) and JSON data caches (for structured objects).
  • Use Case: When developing a new Go microservice that requires caching user sessions or API rate limiting, invoke this skill to quickly scaffold the necessary Redis cache components.

Quick Start

Use the go-cache skill to generate a JSON data cache for user profiles.

Frequently Asked Questions about go-cache

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

FAQPage Schema
How do I generate a Redis cache implementation in Go?

To generate a Redis cache implementation in Go, this Skill creates both the cache port interface and the Redis-backed implementation following a strict two-file pattern. It automates boilerplate creation for modular Go applications.

What Go caching patterns does this boilerplate generator support?

This Go caching boilerplate generator supports both boolean flag caches for existence checks and JSON data caches for structured objects. Both variants include configurable TTL and key-building strategies.

When do I need a Go cache port interface for Redis?

You need a Go cache port interface for Redis when developing modular microservices that require caching for user sessions or API rate limiting. It separates the caching contract from the Redis implementation to ensure application performance.

Can I configure TTL and key-building strategies for Go Redis caches?

Yes, you can configure TTL and key-building strategies for Go Redis caches. The generated implementations support configurable time-to-live settings and customizable key-building strategies for both boolean flag and JSON data variants.

What's the best way to structure Go Redis cache layers for microservices?

The best way to structure Go Redis cache layers is using a two-file pattern separating ports and implementations. This approach adheres to strict coding conventions for modular Go applications, reducing database load and ensuring consistent caching patterns.