In short.
golang-samber-hot is a skill for Go developers using AI coding assistants to build samber/hot caches, but its examples need checking against the project's library release. It combines guidance on nine eviction algorithms with expiration, automatic loading, background refresh, sharding and monitoring. The supplied evaluations define expected assistant behavior without demonstrating results. Expiration examples and copying of mutable values also need careful interpretation; runtime correctness and production performance remain unverified.
Researched and written by an AI model and checked by a second AI model. How it works
The scope is skills/golang-samber-hot at commit d68d80aec298e1b74b37c2a472c002b5217248b3: SKILL.md, evals/evals.json and the three reference guides, plus the repository root LICENSE as the related notice. Other repository skills, external documentation, the samber/hot implementation and its dependencies are excluded. Nothing was executed. API compatibility, evaluation outcomes, runtime correctness and production performance remain unverified.
The overview
Identity
golang-samber-hot is the skill in skills/golang-samber-hot within samber/cc-skills-golang. Its metadata names samber as author and describes compatibility with Claude Code, Codex and similar assistant environments for Go projects. The resource page is [https://github.com/samber/cc-skills-golang/tree/main/skills/golang-samber-hot].
The folder supplies assistant instructions, three reference guides and an evaluation definition file. The separate samber/hot Go package supplies the actual cache implementation.
Assessment
Its main strength is treating caching as a design decision involving workload, memory, data freshness, failure handling and concurrent access. Concrete builder calls and operational examples make the guidance useful when asking an assistant to implement or review a cache.
The 15 evaluation scenarios cover recognizable mistakes, including missing cleanup, ignored loader errors, shared mutable values and incompatible locking options. They establish intended coverage, but no model outputs, scores or comparative measurements demonstrate that the skill improves assistant performance.
Intended users
The closest fit is a Go developer already using samber/hot or considering it for frequently repeated lookups over a manageable set of resources. Examples include user profiles, API responses, configuration and DNS records.
Beginners receive concrete configuration patterns and explanations of common failures. Experienced developers receive guidance on loader chains, contention, negative caching and observability. Effective use still requires application-specific decisions about acceptable staleness, memory budgets and backend failures.
Capabilities
The algorithm guide discusses W-TinyLFU, LRU, LFU, TinyLFU, S3FIFO, ARC, TwoQueue, SIEVE and FIFO. It recommends starting choices based on recency, frequency, changing popularity, sequential scans, memory and throughput. These recommendations have no accompanying benchmark results in the supplied files.
Implementation guidance covers time-to-live expiration, randomized expiration timing, background cleanup, batched loaders, duplicate-load suppression, serving stale values during refresh, caching missing keys, sharding, value copying, startup warm-up and Prometheus metrics. The API reference also distinguishes Get, which returns a value, found flag and error, from Peek, which explicitly ignores expiration.
Using it
Requirements
The skill declares a Go executable requirement and describes samber/hot as requiring Go 1.22 or later. It assumes an assistant environment that can load skill instructions and a Go project using the cache dependency. A specific samber/hot release, assistant model, operating system and subscription requirement are not established.
Its declared tools include file reading and editing, Go and Git shell commands, delegation, web retrieval and language-server tools. Actual availability and permission enforcement depend on the assistant environment. Prometheus examples also require integration with a collector registry.
How it works
The assistant uses SKILL.md and its references to choose configuration and generate Go code. The documented cache flow begins with hot.NewHotCache[K, V](algorithm, capacity), attaches builder options and finishes with Build().
According to the reference, cache misses can invoke loaders with the signature func(keys []K) (map[K]V, error). Concurrent requests for the same missing key share one loader invocation. Chained loaders receive unresolved keys; later returned values can overwrite duplicate keys, and any loader error stops the chain and discards earlier partial results.
The documented refresh model separates a fresh lifetime from an additional stale serving window. During that window, reads can return stale values while refreshing in the background. Refresh error policies either retain the stale value until hard expiry or drop it.
Setup
Acquire the complete skill folder, preserving SKILL.md, references and evals, together with the repository LICENSE. Keeping the directory layout preserves the relative reference links. The supplied files do not specify installation or registration commands for individual assistant environments.
The documented Go dependency command is go get -u github.com/samber/hot. It requests an update without naming a release. For reproducible adoption, establish the dependency version appropriate to the project and check the examples against that version.
Example use
One supplied scenario asks an assistant to configure a mixed-workload user-profile cache with 50,000 entries and a 10-minute lifetime. Its expected answer uses hot.WTinyLFU, generic hot.NewHotCache, WithTTL(10 * time.Minute), WithJanitor(), Build() and deferred StopJanitor().
Choose the application's key and value types and size the cache against a memory budget. Configure a loader for automatic fetching on cache misses, or populate the cache explicitly with Set. Retrieval should handle the error before interpreting the found flag. The 50,000-entry capacity is a scenario input; no measured memory requirement, hit rate or latency result accompanies it.
Assessment & evidence
Limitations
No underlying cache implementation, pinned dependency release or execution results accompany the guidance. API compatibility, runtime behavior and assistant effectiveness remain unverified. Rules such as an 80% hit-rate target, approximate per-entry overhead and preferred shard counts are workload-dependent heuristics without supporting measurements here.
Expiration guidance needs clarification. One evaluation claims that omitting the janitor silently serves stale data, while SKILL.md specifically describes expired entries remaining in memory. The supplied files do not establish ordinary Get behavior in that configuration. The stale-refresh example also promises loading after hard expiry without explicitly configuring WithLoaders; whether WithRevalidation supplies that behavior needs confirmation. Its exact timing illustration does not account for its enabled expiration jitter.
The mutable-value example copies a User struct with copy := *u. That copies the outer struct, but does not demonstrate independent copies of nested slices, maps or pointed-to objects. Whether it prevents shared mutations depends on the actual User definition and copy function.
Basis for the guidance
The strongest decision aid connects cache policy to observed access patterns: the guide associates recency with LRU, stable popularity with LFU, changing frequency with TinyLFU and mixed or unknown patterns with W-TinyLFU. This gives developers concrete starting hypotheses.
Choosing among those hypotheses requires representative workload measurements. A useful comparison would examine miss rate, memory consumption and backend demand while respecting freshness requirements. The supplied material does not establish a universally best algorithm or capacity.
Alternatives and related resources
For direct API information, the skill points to the package documentation [https://pkg.go.dev/github.com/samber/hot] and library repository [https://github.com/samber/hot]. Their contents are outside the supplied evidence, so current compatibility and completeness are not assessed.
The skill also references golang-pkg-go-dev for package facts, golang-gopls for navigating project usage and golang-performance for broader caching choices involving in-memory caches, Redis and CDN. Those companion skills are not included, so their contents and effectiveness are unknown.
Evidence available
The supplied resource consists of SKILL.md, evals/evals.json, references/algorithm-guide.md, references/api-reference.md and references/production-patterns.md, accompanied by the repository root LICENSE. Together they establish the instruction content, documented APIs, examples, intended evaluation coverage and reuse terms.
The evaluation file contains 15 scenarios and expected-answer assertions. No completed evaluation outputs, runnable evaluation harness, compilation receipts, benchmark datasets or production measurements are supplied. The underlying Go package implementation is outside this material.
Access & freshness
Costs
The supplied files state no purchase price, subscription, support fee or hosted service tariff. Assistant charges, token usage and total adoption cost are unknown. The MIT license establishes reuse permissions without establishing operating costs.
The cache uses application memory, and the guidance discusses additional resource tradeoffs from bookkeeping, sharding and copying values. Its sizing examples are estimates rather than measurements. Actual memory, CPU and monitoring costs depend on the application and remain unknown.
Rights and licensing
SKILL.md declares MIT licensing, supported by the repository LICENSE naming Samuel Berthe, copyright 2026. The notice permits use, copying, modification, distribution, sublicensing and sale, subject to retaining the copyright and permission notice in copies or substantial portions.
The material is supplied without warranty under that notice. The licensing of the separately acquired samber/hot package and its dependencies is not established by these captured files.
Version and freshness
The supplied snapshot was captured on 2026-11-17 at 05:27:29.894 UTC from commit d68d80aec298e1b74b37c2a472c002b5217248b3. Its fixed source location is [https://github.com/samber/cc-skills-golang/tree/d68d80aec298e1b74b37c2a472c002b5217248b3/skills/golang-samber-hot].
SKILL.md identifies version 1.1.2 and a separate skill-library-version value of 0.13.0. Neither identifies the samber/hot dependency release. Later changes and compatibility with the currently available library are unknown.
Practical next steps
Acquire the complete folder and license from the fixed revision, establish how the chosen assistant loads it, and confirm the documented APIs against the project's samber/hot release. Set a memory budget and acceptable freshness window before choosing capacity and expiration options.
Before relying on generated code, check cold and hard-expired misses, loader errors, missing-key configuration, janitor shutdown and copying of nested mutable values. Use the supplied scenarios to assess the chosen assistant's answers, then measure cache behavior with representative traffic. These are prospective checks; the supplied material provides no results for them.
