BookStore Cheat Sheet

VerifiedSafe

Quick reference for BookStore code conventions and patterns. Use it to quickly look up standard practices for generating UUIDv7 IDs, UTC timestamps, event naming, logging with LoggerMessage, caching with HybridCache, and multi-tenancy. Not intended for step-by-step workflows – those are covered by dedicated scaffold skills.

Sby Skills Guide Bot
DevelopmentBeginner
1106/2/2026
Claude Code
#cheat-sheet#bookstore#csharp#guidelines#quick-reference

Recommended for

Our review

This skill provides a quick reference cheat sheet for BookStore coding conventions including IDs, timestamps, events, commands, caching, and multi-tenancy.

Strengths

  • Fast lookup of common patterns
  • Enforces consistency across the codebase
  • Reduces errors by centralizing conventions
  • Covers key areas like caching and event patterns

Limitations

  • Only covers BookStore-specific conventions
  • Not a full tutorial or guide
  • May become outdated as the codebase evolves
When to use it

Use this skill when you need a quick reminder of BookStore coding patterns or conventions.

When not to use it

Do not use it when you need a step-by-step guide for complex workflows; use the relevant scaffold skill instead.

Security analysis

Safe
Quality score90/100

The skill is purely a reference cheat sheet of code patterns and conventions. It does not instruct or execute any actions, and there are no declared tools that could perform risky operations. No destructive, exfiltrating, or obfuscated content is present.

No concerns found

Examples

ID generation pattern
How should I generate a new ID in BookStore?
Event definition pattern
What is the pattern for defining an event in BookStore?
HybridCache query pattern
Show me the HybridCache query pattern for BookStore.

name: meta__cheat_sheet description: 'Quick reference for BookStore code rules and patterns. Use this when you need a fast lookup of conventions for IDs (Guid.CreateVersion7), timestamps (DateTimeOffset.UtcNow), event naming, logging (LoggerMessage), caching, or multi-tenancy. DO NOT USE FOR: step-by-step workflows — use the relevant scaffold skill instead.'

BookStore Cheat Sheet

IDs & Timestamps

var id = Guid.CreateVersion7();           // ✅ UUIDv7
var now = DateTimeOffset.UtcNow;          // ✅ UTC timestamp

Event (past tense, record)

public record BookAdded(Guid Id, string Title, decimal Price);

Command (record)

public record AddBookCommand(string Title, decimal Price);

Aggregate Apply Method

public void Apply(BookAdded @event)
{
    Id = @event.Id;
    Title = @event.Title;
}

Handler (static, Wolverine)

public static class AddBookHandler
{
    public static BookAdded Handle(AddBookCommand cmd) =>
        new(Guid.CreateVersion7(), cmd.Title, cmd.Price);
}

HybridCache Query

var result = await cache.GetOrCreateAsync(
    $"books:{culture}",
    async ct => await session.Query<BookProjection>().ToListAsync(ct),
    tags: [CacheTags.BookList],
    cancellationToken: ct);

Cache Invalidation

await cache.RemoveByTagAsync(CacheTags.BookList, ct);

SSE Notification

public record BookUpdatedNotification(Guid Id) : IDomainEventNotification;

TUnit Test

[Test]
public async Task Should_Create_Book()
{
    var result = await client.CreateBookAsync(request);
    await Assert.That(result.Id).IsNotNull();
}

Namespace

namespace BookStore.ApiService.Handlers;  // ✅ File-scoped

Related Skills

  • /wolverine__guide - All Wolverine write operations (create, update, delete)
  • /marten__guide - Aggregates, projections, and query endpoints
Related skills