Skills for Real Engineers. Straight from my .agents directory.
database-performance
Agent skill fromAaronontheweb/dotnet-skills
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.
How to install database-performance
npx skills add Aaronontheweb/dotnet-skills# or add only this skill to Claude Code: copy the folder
skills/database-performance/
# into
~/.claude/skills/database-performance/ (all projects)
.claude/skills/database-performance/ (one project)
1# Database Performance Patterns23## When to Use This Skill45Use this skill when:6- Designing data access layers7- Optimizing slow database queries8- Choosing between EF Core and Dapper9- Avoiding common performance pitfalls1011---1213## Core Principles14151. **Separate read and write models** - Don't use the same types for both162. **Think in batches** - Avoid N+1 queries173. **Only retrieve what you need** - No SELECT *184. **Apply row limits** - Always have a configurable Take/Limit195. **Do joins in SQL** - Never in application code206. **AsNoTracking for reads** - EF Core change tracking is expensive2122---2324## Read/Write Model Separation (CQRS Pattern)2526**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.2728- **Read models** are denormalized, optimized for query efficiency, and return multiple projection types (UserProfile, UserSummary, UserDetailForAdmin)29- **Write models** are normalized, validation-focused, and accept strongly-typed commands (CreateUserCommand, UpdateUserCommand)3031### Architecture3233```34src/35 MyApp.Data/36 Users/37 # Read side - multiple optimized projections38 IUserReadStore.cs39 PostgresUserReadStore.cs4041 # Write side - command handlers42 IUserWriteStore.cs43 PostgresUserWriteStore.cs4445 # Read DTOs - lightweight, denormalized46 UserProfile.cs47 UserSummary.cs4849 # Write commands - validation-focused50…
Excerpt shown under the repository's MIT license.
More skills in dotnet-skills
Similar skill repositories
Public repository for Agent Skills
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Production-grade engineering skills for AI coding agents.
The open-source app everyone uses to manage agents at work
The design vocabulary for your coding agent. Steer with polish and bolder, review with critique and audit, catch AI slop before it ships.
