go-db-cache

go-db-cache is a skill for Claude Code, Codex from Dankosik/go-service-template-rest. It costs 32 tokens per session (474 once invoked), scanned A, original, MIT.

A guide for reviewing database reads and writes, transactions, and caches along a request path. A transaction groups database work that must succeed or fail together; a cache stores reusable results temporarily.

In plain words
What is it for?
Use it when changing SQL, transaction boundaries, query behavior, cache freshness or invalidation, or fallback handling in Go services.
Why use it?
It helps prevent partial updates, unsafe retries, cross-tenant data leaks, stale cache results, and unclear behavior after a database commit is uncertain.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when changing SQL, transaction boundaries, query behavior, cache freshness or invalidation, or fallback handling in Go services.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dankosik/go-service-template-rest/go-db-cache
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Dankosik/go-service-template-rest --skill go-db-cache
Clone the repo
git clone --depth 1 https://github.com/Dankosik/go-service-template-rest

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for go-db-cache

README.md
[![agentmods](https://agentmods.dev/badge/skills/dankosik/go-service-template-rest/go-db-cache/github.svg)](https://agentmods.dev/skills/dankosik/go-service-template-rest/go-db-cache)
Your own site
<a href="https://agentmods.dev/skills/dankosik/go-service-template-rest/go-db-cache"><img src="https://agentmods.dev/badge/skills/dankosik/go-service-template-rest/go-db-cache/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for go-db-cache

Your own site · 80×15
<a href="https://agentmods.dev/skills/dankosik/go-service-template-rest/go-db-cache"><img src="https://agentmods.dev/badge/skills/dankosik/go-service-template-rest/go-db-cache.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 474 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.00474
Opus 5 $0.00016 $0.00237
Sonnet 5 $0.00006 $0.00095
Haiku 4.5 $0.00003 $0.00047

Measured 3d ago against content hash c80f010c599c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

go-db-cache scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/go-db-cache/SKILL.md · 44 lines

What it actually says

Go DB Cache

Every read and write is an access path: transaction boundary, tenant identity, query shape, and any cache's authority, freshness, invalidation, and fallback.

caller intent -> transaction -> query -> cache contract -> fallback -> observability -> proof

Trace the changed caller intent through its terminal result, including tenant identity, commit outcome, and resource lifetime. What must be atomically true together defines the transaction. A cache needs measured value, tenant-scoped keys, a freshness bound, an invalidation owner, and bounded origin fallback.

When comparing multiple affected access paths or handing off a Decision or Review, record AccessPath{caller, transaction, query, tenant, cache_authority, freshness, invalidation, fallback, commit_outcome, resource_lifetime, proof} for each path. A single local path needs a grounded disposition and matching proof. For a delegated Decision or Review, load the shared specialist contract.

For a Decision, load transaction and commit outcome when deciding atomicity, safe retry, or an unknown commit. Reject a cache without measured need. For Review, load PostgreSQL access review when the query seam, rows, errors, or deadline changes. Complete when every access path has one atomicity and commit-outcome disposition and no cache can become an unnamed authority.

This template ships internal/infra/postgres and no data-cache client. A distributed cache therefore adds a dependency and operational surface; internal/health and internal/infra/oidcjwt are the in-process precedents.

Use cache engineering when cache semantics themselves are open and PostgreSQL performance for a measured database bottleneck.

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago Changed · +5 lines c80f010c599c
  2. 10d ago First seen · 39 lines · 32 tokens per session scan A e2049a675cac

Subscribe to this mod's changes

go-db-cache is a skill published in the GitHub repository Dankosik/go-service-template-rest (7 stars, last pushed yesterday), licensed MIT. It adds 32 tokens to every session and 474 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

golang-samber-hot

In-memory caching in Golang using samber/hot — eviction algorithms (LRU, LFU, TinyLFU, W-TinyLFU, S3FIFO, ARC, TwoQueue, SIEVE, FIFO), TTL, cache loaders, sharding, stale-while-revalidate, missing key caching, and Prometheus metrics. Apply when using or adopting samber/hot, when the codebase imports…

alexastrum/skl · 122 tokens

sq

Guides use of the sq CLI to query SQL databases and tabular files with SLQ (sq's jq-like query language) or native SQL, manage sources, choose output formats, and run inspect, diff, and table commands. Use when the user mentions sq, SLQ, wrangling CSV/Excel/JSON/DB data, cross-source joins, or command-line data…

neilotoole/sq · 89 tokens

using-redis-token-buckets

Use when adding a bucket-like rate limit backed by Redis: a per-caller budget with burst capacity and continuous refill, a refund path for requests that did no work, or a limit whose Retry-After must be a real wait rather than a window edge. posthog/tokenbucket.py provides an atomic Lua token bucket (consume, refund…

PostHog/posthog-foss · 148 tokens

using-redis-token-buckets

Use when adding a bucket-like rate limit backed by Redis: a per-caller budget with burst capacity and continuous refill, a refund path for requests that did no work, or a limit whose Retry-After must be a real wait rather than a window edge. posthog/tokenbucket.py provides an atomic Lua token bucket (consume, refund…

PostHog/posthog · 148 tokens

spring-data-redis

Use when implementing caching, session storage, rate limiting, or any Redis integration. Covers cache-aside pattern, key naming, TTL strategy, and serialization config.

rrezartprebreza/spring-boot-skills · 37 tokens

background-job-orchestrator

Expert in background job processing with Bull/BullMQ (Redis), Celery, and cloud queues. Implements retries, scheduling, priority queues, and worker management. Use for async task processing, email campaigns, report generation, batch operations. Activate on "background job", "async task", "queue", "worker", "BullMQ"…

curiositech/some_claude_skills · 95 tokens