Provides critical architectural patterns for the pricing engine. Covers database operations, B2B/B2C dual processing, background jobs, error handling, and performance patterns. Use before implementing pricing engine features, modifying background jobs, or reviewing pricing engine code changes.
/plugin marketplace add Bison-Office/bison-claude-marketplace/plugin install pricing-engine@bison-toolsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
This is a high-performance financial system processing hundreds of price change notifications per second with real money transactions. These patterns are critical.
MUST use QuickInsertService with PostgreSQL COPY protocol for inserting multiple records.
// CORRECT - Bulk insert
await quickInsertService.InsertAsync(items, cancellationToken);
// WRONG - Individual inserts in loop
foreach (var item in items)
await dbContext.AddAsync(item); // CRITICAL VIOLATION
New queries MUST consider indexes. Unindexed query on price_history_items (93M+ rows) = system degradation.
Append-only tables + _latest tables with triggers. Never update historical records.
Most entities have _b2b variants. If code touches B2C pricing, verify B2B is also handled.
| B2C Table | B2B Table |
|---|---|
price_history_items | price_history_items_b2b |
recommendations | recommendations_b2b |
buy_box_history | buy_box_history_b2b |
Missing B2B handling = 50% of pricing logic broken.
MUST accept and propagate CancellationToken to all async operations.
// CORRECT
public async Task ExecuteAsync(CancellationToken cancellationToken)
{
await dbContext.SaveChangesAsync(cancellationToken);
}
// WRONG - Missing cancellation token causes shutdown hangs
public async Task ExecuteAsync()
{
await dbContext.SaveChangesAsync(); // CRITICAL VIOLATION
}
Jobs that shouldn't run concurrently MUST use PostgresqlDistributedLock.
Via appsettings.json under Modules::{ModuleName}::BackgroundJobs.
MUST log start/completion/errors with context.
// CORRECT - Specific exception, logged and re-thrown
catch (DbUpdateException ex)
{
logger.LogError(ex, "Failed to save price update for {Sku}", sku);
throw; // Re-throw for retry logic
}
// WRONG - Silent swallow
catch (Exception) { } // CRITICAL VIOLATION in financial operations
// JSON parsing errors should be warnings, not crashes
catch (JsonException ex)
{
logger.LogWarning(ex, "Invalid JSON in notification");
}
IOptions<T> pattern/app/secrets/Modules/{Module}/Endpoints/Read/ - Read endpoints
Modules/{Module}/Endpoints/Write/ - Write endpoints
Contracts (request/response) in same file as endpoint. All I/O operations MUST be async.
/components/ui/ (shadcn components)Before any change:
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.