Foundatio
FoundatioFx/Foundatio
A skill your agent uses when working with Foundatio infrastructure abstractions for .NET -- caching, queuing, messaging, file storage, distributed locking, or background jobs.
Caching strategies for .NET 10 applications. An agent skill from codewithmukesh/dotnet-claude-kit.
$ npx skills add codewithmukesh/dotnet-claude-kit --skill caching -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install codewithmukesh/dotnet-claude-kit caching --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/caching .claude/skills/caching && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "caching" agent skill from https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/caching into .claude/skills/caching/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "caching", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/cachingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add codewithmukesh/dotnet-claude-kit --skill caching -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install codewithmukesh/dotnet-claude-kit caching --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/caching .agents/skills/caching && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "caching" agent skill from https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/caching into .agents/skills/caching/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "caching", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add codewithmukesh/dotnet-claude-kit --skill caching -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install codewithmukesh/dotnet-claude-kit caching --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/caching .cursor/skills/caching && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "caching" agent skill from https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/caching into .cursor/skills/caching/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "caching", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/codewithmukesh/dotnet-claude-kit.git --path skills/caching--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add codewithmukesh/dotnet-claude-kit --skill caching -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install codewithmukesh/dotnet-claude-kit caching --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/caching .gemini/skills/caching && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "caching" agent skill from https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/caching into .gemini/skills/caching/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "caching", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install codewithmukesh/dotnet-claude-kit cachingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add codewithmukesh/dotnet-claude-kit --skill caching -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/caching .github/skills/caching && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "caching" agent skill from https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/caching into .github/skills/caching/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "caching", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add codewithmukesh/dotnet-claude-kit --skill caching -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install codewithmukesh/dotnet-claude-kit caching --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/caching .opencode/skills/caching && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "caching" agent skill from https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/caching into .opencode/skills/caching/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "caching", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
cachingCaching strategies for .NET 10 applications. An agent skill from codewithmukesh/dotnet-claude-kit.
Caching is an agent skill from codewithmukesh/dotnet-claude-kit. Caching strategies for .NET 10 applications. Covers HybridCache (the default), output caching, response caching, and distributed cache patterns. Load this skill when implementing caching, optimizing read performance, reducing database load, or when the user mentions "cache", "HybridCache", "Redis", "output cache", "response cache", "distributed cache", "IMemoryCache", "cache invalidation", "stampede protection", or "cache-aside".
Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Backend & APIs, covering Caching. It works with Redis and .NET. The repository describes itself as: Make Claude Code a .NET 10 Expert. The licence is MIT.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 2330089. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are csharp).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Caching loads about 1.4k tokens when it runs. Until then it costs about 110 tokens; SKILL.md has 193 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from codewithmukesh/dotnet-claude-kit at commit 2330089, republished under its MIT licence (© codewithmukesh). 193 words, ~1,437 tokens.
.claude/skills/caching/SKILL.md (or your agent's skills folder).HybridCache as the unified caching abstraction. It combines in-memory (L1) and distributed (L2) caching with stampede protection. See ADR-004.// Program.cs
builder.Services.AddHybridCache(options =>
{
options.DefaultEntryOptions = new HybridCacheEntryOptions
{
Expiration = TimeSpan.FromMinutes(5),
LocalCacheExpiration = TimeSpan.FromMinutes(2)
};
});
// Optional: Add Redis as the L2 distributed cache
builder.Services.AddStackExchangeRedisCache(options =>
{
options.Configuration = builder.Configuration.GetConnectionString("Redis");
});// Usage in a handler
public class GetProduct
{
public record Query(Guid Id);
public record Response(Guid Id, string Name, decimal Price);
internal class Handler(AppDbContext db, HybridCache cache)
{
public async Task<Response?> Handle(Query query, CancellationToken ct)
{
return await cache.GetOrCreateAsync(
$"products:{query.Id}",
async token => await db.Products
.Where(p => p.Id == query.Id)
.Select(p => new Response(p.Id, p.Name, p.Price))
.FirstOrDefaultAsync(token),
new HybridCacheEntryOptions
{
Expiration = TimeSpan.FromMinutes(10)
},
cancellationToken: ct);
}
}
}// Invalidate on mutation
public class UpdateProduct
{
internal class Handler(AppDbContext db, HybridCache cache)
{
public async Task<Result> Handle(Command command, CancellationToken ct)
{
var product = await db.Products.FindAsync([command.Id], ct);
if (product is null) return Result.Failure("Product not found");
product.Update(command.Name, command.Price);
await db.SaveChangesAsync(ct);
// Invalidate the cached entry
await cache.RemoveAsync($"products:{command.Id}", ct);
return Result.Success();
}
}
}// Program.cs
builder.Services.AddOutputCache(options =>
{
options.AddBasePolicy(b => b.NoCache()); // Don't cache by default
options.AddPolicy("ProductList", b => b
.Expire(TimeSpan.FromMinutes(5))
.Tag("products"));
options.AddPolicy("ProductById", b => b
.Expire(TimeSpan.FromMinutes(10))
.SetVaryByRouteValue("id")
.Tag("products"));
});
app.UseOutputCache();
// Apply to endpoints
group.MapGet("/", ListProducts).CacheOutput("ProductList");
group.MapGet("/{id:guid}", GetProduct).CacheOutput("ProductById");
// Invalidate by tag on mutations
group.MapPut("/{id:guid}", async (Guid id, UpdateProductRequest request,
IOutputCacheStore store, CancellationToken ct) =>
{
// ... update logic ...
await store.EvictByTagAsync("products", ct);
return TypedResults.NoContent();
});Prefer HybridCache for all new code. Manual
IDistributedCachecache-aside lacks stampede protection, requires manual serialization, and has no L1/L2 layering. Use only when integrating with existing code that already usesIDistributedCachedirectly.
// BAD — cache lives forever, stale data guaranteed
await cache.SetStringAsync(key, value);
// GOOD — always set TTL
await cache.SetStringAsync(key, value, new DistributedCacheEntryOptions
{
AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(10)
});// BAD — caching user's cart with a global key
await cache.GetOrCreateAsync("shopping-cart", ...);
// GOOD — include user ID in key
await cache.GetOrCreateAsync($"shopping-cart:{userId}", ...);// BAD — manual lock to prevent cache stampede
private static readonly SemaphoreSlim Lock = new(1, 1);
await Lock.WaitAsync();
try { /* check cache, populate if missing */ }
finally { Lock.Release(); }
// GOOD — HybridCache has built-in stampede protection
await hybridCache.GetOrCreateAsync(key, factory);| Scenario | Recommendation |
|---|---|
| General data caching | HybridCache (GetOrCreateAsync) |
| Full HTTP response | Output caching with .CacheOutput() |
| Frequently read, rarely written | HybridCache with longer TTL |
| User-specific data | HybridCache with user-scoped key |
| Cache invalidation on write | cache.RemoveAsync() or output cache tags |
| Distributed deployment | HybridCache + Redis L2 backend |
| Single-server deployment | HybridCache with in-memory only |
© codewithmukesh, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/caching of codewithmukesh/dotnet-claude-kit.
Open the folder on GitHubat commit 2330089
We found 4 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in codewithmukesh/dotnet-claude-kit, which our catalogue first saw on October 7, 2026.
Caching next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Caching this skillcodewithmukesh/dotnet-claude-kit | 751 | 1 repos | ~1.4k | Automated safety check: Pass | MIT | |
| FoundatioFoundatioFx/Foundatio | 2.1k | — | ~3.9k | Automated safety check: Pass | Apache-2.0 | |
| Azure Resource Manager Redis Dotnetmicrosoft/skills | 3.1k | 5 repos | ~3k | Automated safety check: Pass | MIT | |
| Stripe Projectsfossasia/eventyay | 1.7k | 5 repos | ~2k | Automated safety check: Notes | Apache-2.0 | |
| FastAPI-Redis SDK Developmentredis/fastapi-redis-sdk | 404 | — | ~2.5k | Automated safety check: Notes | MIT | |
| Caching Patternsdilolabs/nosia | 213 | 1 repos | ~1.9k | Automated safety check: Pass | MIT |
FoundatioFx/Foundatio
A skill your agent uses when working with Foundatio infrastructure abstractions for .NET -- caching, queuing, messaging, file storage, distributed locking, or background jobs.
microsoft/skills
Azure Resource Manager SDK for Redis in .NET. An agent skill from microsoft/skills.
fossasia/eventyay
A skill your agent uses when the user wants to provision infrastructure or third-party services using Stripe Projects.
redis/fastapi-redis-sdk
Guides development on the fastapi-redis-sdk library itself - its connection lifecycle, dependency-injected caching, and async/sync bridging.
dilolabs/nosia
Implements HTTP caching with ETags, fragment caching, Russian doll caching, and Solid Cache configuration.
ThibautBaissac/rails_ai_agents
Implements Rails caching patterns for performance optimization.
codewithmukesh/dotnet-claude-kit
API versioning strategies for ASP.NET Core. An agent skill from codewithmukesh/dotnet-claude-kit.
codewithmukesh/dotnet-claude-kit
Architecture-aware feature scaffolding for .NET 10 projects.
codewithmukesh/dotnet-claude-kit
Architecture selection advisor for .NET applications. An agent skill from codewithmukesh/dotnet-claude-kit.
codewithmukesh/dotnet-claude-kit
.NET Aspire for cloud-native orchestration. An agent skill from codewithmukesh/dotnet-claude-kit.
codewithmukesh/dotnet-claude-kit
Authentication and authorization for ASP.NET Core. An agent skill from codewithmukesh/dotnet-claude-kit.
codewithmukesh/dotnet-claude-kit
CI/CD pipelines for .NET applications. An agent skill from codewithmukesh/dotnet-claude-kit.
Categories
Caching strategies for .NET 10 applications. An agent skill from codewithmukesh/dotnet-claude-kit. Caching is an agent skill from codewithmukesh/dotnet-claude-kit.NET 10 applications.
Caching fits situations like: distributed cache; cache invalidation; stampede protection.
Run `npx skills add codewithmukesh/dotnet-claude-kit --skill caching -a claude-code`. Or copy the skill folder (skills/caching in codewithmukesh/dotnet-claude-kit) into .claude/skills/caching in your project. Claude Code loads it when a task matches its description.
Run `npx skills add codewithmukesh/dotnet-claude-kit --skill caching -a codex`. Or copy the skill folder (skills/caching in codewithmukesh/dotnet-claude-kit) into .agents/skills/caching in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add codewithmukesh/dotnet-claude-kit --skill caching -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/caching, .gemini/skills/caching, .github/skills/caching and .opencode/skills/caching in your project.
SKILL.md names no scripts, command-line tools or credentials: Caching is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Caching is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Caching: Foundatio (FoundatioFx/Foundatio, 2.1k stars), Azure Resource Manager Redis Dotnet (microsoft/skills, 3.1k stars), Stripe Projects (fossasia/eventyay, 1.7k stars) and FastAPI-Redis SDK Development (redis/fastapi-redis-sdk, 404 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
codewithmukesh (a GitHub organization) maintains it in codewithmukesh/dotnet-claude-kit, which has 751 GitHub stars. The repository holds 47 skills in this directory. The repository was last updated on August 7, 2026.
Source: codewithmukesh/dotnet-claude-kit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.