Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/comeonoliver-database-performance
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/database-performance
What's inside
- Skill name
database-performance- Description
- Database access patterns for performance. Separate read/write models, avoid N+1 queries, use AsNoTracking, apply row limits, and never do application-side joins. Works with EF Core and Dapper.
- License
- MIT
- Instructions
- 501 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- body: 501 lines (spec recommends under 500)
Files (1)
- SKILL.md
SKILL.md (first lines)
# Database Performance Patterns
## When to Use This Skill
Use this skill when:
- Designing data access layers
- Optimizing slow database queries
- Choosing between EF Core and Dapper
- Avoiding common performance pitfalls
---
## Core Principles
1. **Separate read and write models** - Don't use the same types for both
2. **Think in batches** - Avoid N+1 queries
3. **Only retrieve what you need** - No SELECT *
4. **Apply row limits** - Always have a configurable Take/Limit
5. **Do joins in SQL** - Never in application code
6. **AsNoTracking for reads** - EF Core change tracking is expensive
---
## Read/Write Model Separation (CQRS Pattern)
**Read and write models are fundamentally different - they have different shapes, columns, and purposes.** Don't create a single "User" entity and reuse it everywhere.
- **Read models** are denormalized, optimized for query efficiency, and return multiple projection types (UserProfile, UserSummary, UserDetailForAdmin)
- **Write models** are normalized, validation-focused, and accept strongly-typed commands (CreateUserCommand, UpdateUserCommand)
### Architecture
```
src/
MyApp.Data/
Users/
# Read side - multiple optimized projections
IUserReadStore.cs
PostgresUserReadStore.cs
# Write side - command handlers
IUserWriteStore.cs
PostgresUserWriteStore.cs
# Read DTOs - lightweight, denormalized
UserProfile.cs
UserSummary.cs
# Write commands - validation-focused
CreateUserCommand.cs
UpdateUserCommand.cs
Orders/
IOrderReadStore.cs
IOrderWriteStore.cs
(similar structure...)
```
### Read Store Interface
```csharp
// Read models: Multiple specialized projections optimized for different use cases
public interface IUserReadStore
{
// Returns detailed profile for single-user view
Task<UserProfile?> GetByIdAsync(UserId id, CancellationToken ct = default);
// Returns lightweight info for lookups
Task<UserProfile?> GetByEmailAsync(EmailAddress email, CancellationToken ct = default);
// Returns paginated summaries - only what the list view needs
Task<IReadOnlyList<UserSummary>> GetAllAsync(int limit, UserId? cursor = null, CancellationToken ct = default);
// Boolean query - no entity needed
Task<bool> EmailExistsAsync(EmailAddress email, CancellationToken ct = default);
}
```
### Write Store Interface
```csharp
// Write model: Accepts strongly-typed commands, minimal return values
public interface IUserWriteStore
{
// Returns only the created ID - caller doesn't need the full entity
Task<UserId> CreateAsync(CreateUserCommand command, CancellationToken ct = default);
// Update validates command, returns void (success or throws)
Task UpdateAsync(UserId id, UpdateUserCommand command, CancellationToken ct = default);
// Delete is simple and explicit
Task DeleteAsync(UserId id, CancellationToken ct = default);
}
```
**Key structural differences illustrated:**
- Read store returns multiple different DTOs (UserProfile, UserSummary, bool flag)
- Write store returns minimal data (just UserId on create) or void
- Read queries are stateless projections - no tracking needed
- Write operations focus on command validation, not retrieving data afterwards
- Different databases/tables can back read vs write (eventual consistency pattern)
---
## Always Apply Row Limits
**Never return unbounded result sets.** Every read method should have a configurable limit.
### Pattern: Limit Parameter
```csharp
public interface IOrderReadStore
{
// Limit is required, not optional
Task<IReadOnlyList<OrderSummary>> GetByCustomerAsync(
CustomerId customerId,
int limit,
OrderId? cursor = null,
CancellationToken ct = default);
}From ComeOnOliver/skillshub, MIT.
More from ComeOnOliver/skillshub
- 0.512score
solidity-coding
ComeOnOliver
[AUTO-INVOKE] MUST be invoked BEFORE writing or modifying any Solidity contract (.sol files).
SkillDFreshness: D★ 64Claude Code +9 - 0.512score
solidity-debug
ComeOnOliver
[AUTO-INVOKE] MUST be invoked when debugging failed on-chain transactions.
SkillDFreshness: D★ 64Claude Code +9 - 0.512score
ilspy-decompile
ComeOnOliver
Understand implementation details of .NET code by decompiling assemblies.
SkillDFreshness: D★ 64Claude Code +9 - 0.512score
solidity-audit
ComeOnOliver
Security audit and code review checklist.
SkillDFreshness: D★ 64Claude Code +9 - 0.509score
crap-analysis
ComeOnOliver
Analyze code coverage and CRAP (Change Risk Anti-Patterns) scores to identify high-risk code.
SkillDFreshness: D★ 64Claude Code +9 - 0.509score
claude-code-usage
ComeOnOliver
[AUTO-INVOKE] MUST be invoked at the START of each new coding session.
SkillDFreshness: D★ 64Claude Code +9 - 0.509score
package-management
ComeOnOliver
Manage NuGet packages using Central Package Management (CPM) and dotnet CLI commands.
SkillDFreshness: D★ 64Claude Code +9 - 0.509score
solidity-deploy
ComeOnOliver
[AUTO-INVOKE] MUST be invoked BEFORE deploying contracts or writing deployment scripts (*.s.sol).
SkillDFreshness: D★ 64Claude Code +9 - 0.509score
microsoft-extensions-configuration
ComeOnOliver
Microsoft.Extensions.Options patterns including IValidateOptions, strongly-typed settings, validation on startup, and the Options pattern for clean…
SkillDFreshness: D★ 64Claude Code +9 - 0.509score
aspire-service-defaults
ComeOnOliver
Create a shared ServiceDefaults project for Aspire applications.
SkillDFreshness: D★ 64Claude Code +9 - 0.509score
defi-security
ComeOnOliver
[AUTO-INVOKE] MUST be invoked BEFORE deploying DeFi contracts (DEX, lending, staking, LP, token).
SkillDFreshness: D★ 64Claude Code +9 - 0.509score
dotnet-devcert-trust
ComeOnOliver
Diagnose and fix .NET HTTPS dev certificate trust issues on Linux.
SkillDFreshness: D★ 64Claude Code +9
Signals
- Stars
- 64
- Forks
- 24
- Open issues
- 30
- Last commit (this folder)
- Mar 23, 2026 (7 months ago)
- Last release
- Apr 3, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ComeOnOliver/skillshub
- Website
- skillshub.wtf
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ComeOnOliver
- 0.512score
ilspy-decompile
ComeOnOliver
Understand implementation details of .NET code by decompiling assemblies.
SkillDFreshness: D★ 64Claude Code +9 - 0.512score
solidity-audit
ComeOnOliver
Security audit and code review checklist.
SkillDFreshness: D★ 64Claude Code +9 - 0.512score
solidity-debug
ComeOnOliver
[AUTO-INVOKE] MUST be invoked when debugging failed on-chain transactions.
SkillDFreshness: D★ 64Claude Code +9 - 0.512score
solidity-coding
ComeOnOliver
[AUTO-INVOKE] MUST be invoked BEFORE writing or modifying any Solidity contract (.sol files).
SkillDFreshness: D★ 64Claude Code +9 - 0.509score
claude-code-usage
ComeOnOliver
[AUTO-INVOKE] MUST be invoked at the START of each new coding session.
SkillDFreshness: D★ 64Claude Code +9 - 0.509score
solidity-deploy
ComeOnOliver
[AUTO-INVOKE] MUST be invoked BEFORE deploying contracts or writing deployment scripts (*.s.sol).
SkillDFreshness: D★ 64Claude Code +9
Cite this page
database-performance skill. Agent Mart. https://agentmart.dev/skills/comeonoliver-database-performance (last updated 2026-10-24)