Agent skill
data-access
Implement data access for the .NET 8 WPF widget host app using EF Core or Dapper. Use when creating repositories, unit of work, migrations, DbContext configuration, and query patterns while keeping clean architecture boundaries.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/data-access-yosrbennagra-3sc
SKILL.md
Data Access
Overview
Define reliable persistence patterns using EF Core or Dapper without leaking infrastructure concerns into domain or UI.
Constraints
- .NET 8
- Clean architecture boundaries
- Prefer repositories and unit of work for write operations
Definition of done (DoD)
- Repository interfaces in Application layer, implementations in Infrastructure
- DbContext lifetime is per-operation (using statement or scoped)
- Read queries use AsNoTracking where applicable
- Migrations are tested with test database before merge
- No raw SQL outside Infrastructure layer
- Integration tests exist for repository operations
Workflow
- Decide EF Core vs Dapper based on query complexity and tracking needs.
- Define interfaces in Application/Domain and implement in Infrastructure.
- Configure DbContext or connection factory and register via DI.
- Use migrations for schema changes and keep seed data explicit.
- Keep data models aligned to domain entities or mapping layer.
EF Core guidance
- Use
DbContextper unit of work. - Use
AsNoTrackingfor read-only queries. - Keep migrations small and reversible.
Dapper guidance
- Use parameterized queries only.
- Map results to DTOs, not EF entities.
- Keep SQL in Infrastructure.
References
references/ef-core.mdfor configuration and migrations.references/dapper.mdfor query patterns.references/repositories-uow.mdfor repository/unit of work boundaries.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?