agentleFS
fpindejfpindej/netrock/.claude/skills/new-entity/SKILL.md

new-entity

Skill234 starsChanged 3 months agoMITView on GitHub

Create a backend entity with EF Core configuration and migration

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use these as starting points - fill in the specifics from context:

    line 12
  2. Very specific:

    Boolean properties: Use Is* prefix in C# (e.g.

    line 18
  3. Distinctive:

    If enums: create alongside entity with explicit integer values

    line 26
  4. Very specific:

    Add Error entries (snake_case code + message) to src/backend/MyProject.Shared/ErrorMessages.cs

    line 27
  5. Very specific:

    Create EF config Infrastructure/Features/{Feature}/Configurations/{Entity}Configuration.cs:

    line 31
  6. Very specific:

    Add DbSet<{Entity}> to Infrastructure/Persistence/MyProjectDbContext.cs

    line 34
  7. Very specific:

    If a new project was added that WebApi references, add its .csproj COPY line to the Dockerfile restore layer - otherwise dotnet restore …

    line 45

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Creates a new backend entity with EF Core configuration and migration.

Infers entity name, properties, feature name, and enum values from context. Asks only if the entity's purpose or key properties are genuinely ambiguous.

Templates

Use these as starting points - fill in the specifics from context:

  • Entity class template
  • EF Core configuration template

Conventions

  • Boolean properties: Use Is* prefix in C# (e.g. IsUsed, IsInvalidated) per .NET convention, but map to prefix-free DB column names via HasColumnName (e.g. Used, Invalidated) to keep the schema clean.

Steps

Domain:

  1. Create src/backend/MyProject.Domain/Entities/{Entity}.cs:
    • Extend BaseEntity, private setters, protected parameterless ctor, public ctor with Id = Guid.NewGuid()
  2. If enums: create alongside entity with explicit integer values
  3. Add Error entries (snake_case code + message) to src/backend/MyProject.Shared/ErrorMessages.cs

Infrastructure:

  1. Create EF config Infrastructure/Features/{Feature}/Configurations/{Entity}Configuration.cs:
    • Extend BaseEntityConfiguration<T>, mark internal, .HasComment() on enum columns
    • For boolean properties: map with .HasColumnName("PrefixFree") to keep DB schema clean
  2. Add DbSet<{Entity}> to Infrastructure/Persistence/MyProjectDbContext.cs
  3. Run migration:
    dotnet ef migrations add Add{Entity} \
      --project src/backend/MyProject.Infrastructure \
      --startup-project src/backend/MyProject.WebApi \
      --output-dir Persistence/Migrations

Dockerfile:

  1. If a new project was added that WebApi references, add its .csproj COPY line to the Dockerfile restore layer - otherwise dotnet restore fails in Docker builds.

Verify and commit:

  1. dotnet build src/backend/MyProject.slnx - fix errors, loop until green
  2. Commit: feat({feature}): add {Entity} entity and EF configuration

This skill stops at Infrastructure. Use /new-endpoint to add service, controller, and API surface.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.