audit-trail

Generate audit trail infrastructure for .NET entities using Entity Framework Core.

Updated Jan 30, 2026
One-click install
npx skills add https://github.com/spallempati/AI-Studio --skill audit-trail-spallempati
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audit-trail
Source: https://github.com/spallempati/AI-Studio/tree/main/skills/dotnet-infrastructure/audit-trail
Command: npx skills add https://github.com/spallempati/AI-Studio --skill audit-trail-spallempati

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the tracking of entity creation, modification, and deletion, ensuring a complete and reliable audit history for your .NET applications.

Core Features & Use Cases

  • Automatic Auditing: Implements IAuditable interface and an EF Core SaveChangesInterceptor to automatically populate CreatedAt, CreatedBy, UpdatedAt, and UpdatedBy fields.
  • Soft Delete: Integrates soft delete functionality using ISoftDeletable and AuditableEntity, allowing entities to be marked as deleted without permanent removal.
  • Use Case: When a user updates a customer record, the UpdatedAtUtc and UpdatedBy fields are automatically populated by the interceptor, providing a clear trail of who changed what and when.

Quick Start

Apply the AuditableEntityConfiguration<TEntity> to your entity configurations to enable automatic audit field population and soft delete.

Frequently Asked Questions about audit-trail

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate audit trail tracking for Entity Framework Core entities?

Automate audit trail tracking in Entity Framework Core by applying an IAuditable interface and a SaveChangesInterceptor to automatically populate CreatedAt, UpdatedAt, CreatedBy, and UpdatedBy fields during database operations.

How does soft delete work with EF Core auditable entities?

Soft delete in EF Core auditable entities works by implementing the ISoftDeletable interface within AuditableEntity, allowing records to be marked as deleted without permanent removal from the database.

What is the best way to track who changed entity data and when in .NET?

Track who changed entity data and when in .NET by using an EF Core SaveChangesInterceptor that automatically captures the user identity and timestamp, populating the CreatedBy and UpdatedBy fields on your entities.

Do I need manual entity configurations to enable automatic auditing in EF Core?

No, you do not need manual entity configurations for automatic auditing. You apply the AuditableEntityConfiguration to your entity setups to enable the interceptor to automatically populate audit fields and soft delete functionality.

Does the EF Core audit trail interceptor support compliance and historical tracking requirements?

Yes, the EF Core audit trail interceptor supports compliance and historical tracking requirements by generating a reliable infrastructure that ensures data integrity and a complete history of entity creation, modification, and deletion.

When should I implement an audit trail in my .NET application?

Implement an audit trail in your .NET application when you need data integrity, compliance, or historical tracking of entity changes, ensuring a complete and reliable record of who created, modified, or deleted data.