devloopeddevloopedOfficial·1 Agent Skills Included

StructId

Strongly-typed source-generated identifiers for .NET projects

Generates strongly-typed struct identifiers for .NET projects with zero runtime dependencies. Eliminates manual boilerplate for constructors, parsing, comparison, and JSON serialization of ID types. Automatically adds EF Core, Dapper, and Newtonsoft.Json converters when those packages are referenced. Extends every ID type through compiled C# templates without extra configuration.
npx skills add devlooped/StructId --all -g -y
Available:

Explains the library's architecture, generator pipeline, and template system so your AI agent can correctly extend or modify the source generators and code fixes.

All Skills in This Repository (1)

Pure Emerald Level Indicators

Frequently Asked Questions

FAQPage Schema
How to install StructId?

Run `npx skills add devlooped/StructId --all -g -y` in your terminal to install this skill globally.

What problem does StructId solve in .NET?

It replaces primitive ID types like Guid or int with strongly-typed readonly record structs, preventing accidental mixing of different entity IDs. All supporting code is source-generated, so there are no runtime dependencies.

Does StructId work with EF Core and Dapper?

Yes. When you reference EF Core or Dapper, value converters and type handlers are generated automatically, and a UseStructId() extension method registers them with no extra configuration.

Can I customize the generated ID code?

Yes. You can write your own file-scoped C# templates marked with [TStructId] to add interfaces or members to all matching struct IDs in your project.

Does StructId support Ulid identifiers?

Yes. Ulid works out of the box with EF Core and Dapper, and a parameterless New() factory method is generated using Ulid.NewUlid().

Related Repositories in Software Engineering

View All in Software Engineering