Scaffold a new domain entity or aggregate in this Vertical Slice Architecture template — the entity itself, its strongly typed ID, errors, specification, EF Core configuration, DbSet, the mandatory…

MITAuto-check passedDevelopment

Install Add Entity

skills CLI
$ npx skills add SSWConsulting/SSW.VerticalSliceArchitecture --skill add-entity -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install SSWConsulting/SSW.VerticalSliceArchitecture add-entity --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/SSWConsulting/SSW.VerticalSliceArchitecture.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/add-entity .claude/skills/add-entity && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
add-entity
GitHub stars
407
Token cost
~1.9k tokens
SKILL.md length
900 words
Files
3 (incl. references)
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

Scaffold a new domain entity or aggregate in this Vertical Slice Architecture template — the entity itself, its strongly typed ID, errors, specification, EF Core configuration, DbSet, the mandatory…

  • Works in 10 steps: Domain folder — create… → Errors — {Entity}Errors.cs with Error… → Specification — {Entity}Spec.cs… → …
  • The user says add an entity
  • SKILL.md covers The trap this skill exists to…, Read the live reference first, What you need to know before… and Steps, plus 3 more sections
  • Calls dotnet

What it does

Add Entity is an agent skill from SSWConsulting/SSW.VerticalSliceArchitecture. Scaffold a new domain entity or aggregate in this Vertical Slice Architecture template — the entity itself, its strongly typed ID, errors, specification, EF Core configuration, DbSet, the mandatory Vogen registration, and the migration. Use when the user says "add an entity", "add an aggregate", "create a domain model", "add a new table", "model X in the domain", or names a new domain concept that needs to be persisted. Use it before /add-slice when the use case needs a domain type that doesn't exist yet.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/domain.md` and `references/persistence.md`).

It sits in Development. It works with .NET. The repository describes itself as: An enterprise ready solution template for Vertical Slice Architecture. This template is just one way to apply the Vertical Slice Architecture. The licence is MIT.

When your agent uses it

  • The user says add an entity
  • Add an aggregate
  • Create a domain model
  • Add a new table

Example prompts

  • “add an entity”
  • “add an aggregate”
  • “create a domain model”
  • “/add-entity”

Workflow steps

10 steps, taken from the first numbered list in SKILL.md.

  1. Domain folder — create src/WebApi/Common/Domain/{Aggregate}/ and add the entity plus its [ValueObject] ID. Template: references/domain.md.
  2. Errors — {Entity}Errors.cs with Error constants. Add NotFound at minimum; endpoints will reach for it.
  3. Specification — {Entity}Spec.cs extending SingleResultSpecification, with a static ById(...) factory. One spec class per aggregate; add a…
  4. EF configuration — src/WebApi/Common/Persistence/{Aggregate}/{Entity}Configuration.cs inheriting AuditableConfiguration. Every string…
  5. Vogen registration — add [EfCoreConverter<{Entity}Id>] to VogenEfCoreConverters. See the trap above.
  6. DbSet — for an aggregate root only, add ApplicationDbContext.{Entities}.cs exposing DbSet<{Entity}> via AggregateRootSet(). Child entities…
  7. Migration — run it yourself, don't just print the command
  8. Test data — add a Bogus factory at tests/WebApi.IntegrationTests/Common/Factories/{Entity}Factory.cs so integration tests have something…
  9. Seeding (optional) — extend tools/Seeder/Initializers/ApplicationDbContextInitializer.cs if the entity should show up in dev. Keep it…
  10. Unit tests — invariants and factory rules belong in tests/WebApi.UnitTests/Features/{Aggregate}/{Entity}Tests.cs. Cover the guards you…

What it can do on your machine

Read from SKILL.md and the folder at commit 42e7a70. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • dotnet

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Add Entity loads about 1.9k tokens when it runs, and up to ~6.3k if it reads all its reference files. Until then it costs about 131 tokens; SKILL.md has 900 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~131
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from SSWConsulting/SSW.VerticalSliceArchitecture at commit 42e7a70, republished under its MIT licence (© SSWConsulting). 900 words, ~1,916 tokens.

Download SKILL.mdSave it as .claude/skills/add-entity/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
add-entity
description
Scaffold a new domain entity or aggregate in this Vertical Slice Architecture template — the entity itself, its strongly typed ID, errors, specification, EF Core configuration, DbSet, the mandatory Vogen registration, and the migration. Use when the user says "add an entity", "add an aggregate", "create a domain model", "add a new table", "model X in the domain", or names a new domain concept that needs to be persisted. Use it before `/add-slice` when the use case needs a domain type that doesn't exist yet.

Add an Entity

A new persisted domain type in this template is never one file. It's a domain object, a strongly typed ID, an EF configuration, a DbSet, a converter registration, and a migration — spread across two folders. Miss one and you get anything from a compile error to an app that won't start.

The trap this skill exists to close

Every strongly typed ID must be registered in src/WebApi/Common/Persistence/VogenEfCoreConverters.cs.

Forget it and nothing complains at compile time. dotnet build is green, the architecture tests are green, and the app throws on startup when EF Core tries to map a HeroId it has no converter for. That is the single most expensive thing to forget in this repo, so step 5 below is not optional and the verification step checks for it explicitly.

Read the live reference first

Before generating anything, read the canonical aggregate and its persistence wiring:

  • src/WebApi/Common/Domain/Heroes/Hero.cs — aggregate root, Vogen ID, field-keyword setter guards
  • src/WebApi/Common/Domain/Teams/Team.cs — an aggregate that returns ErrorOr<Success> from behaviour
  • src/WebApi/Common/Persistence/Heroes/HeroConfiguration.cs — EF configuration
  • src/WebApi/Common/Persistence/VogenEfCoreConverters.cs — the registration list

The templates in references/ follow these files, but the repo is the source of truth. If the two disagree, the repo wins — follow it and update the template (see Keeping this skill honest at the bottom).

One deliberate divergence: the aggregate template gives properties a private set plus a named mutator, following Team.cs. Hero.cs uses a public set instead, so UpdateHeroEndpoint can assign hero.Name directly. Both keep the guard in the setter, which is the part that matters; prefer the Team.cs shape for new work, because it keeps the aggregate in charge of how it changes.

What you need to know before scaffolding

Ask the user for anything not already stated:

InputNotes
Entity nameSingular, PascalCase (Hero, Mission). The folder and pluralised DbSet derive from it.
Aggregate or child entity?Aggregate root if it's the transactional boundary or raises domain events. Child entity if it only ever lives inside another aggregate (Mission inside Team).
Owning aggregateFor a child entity — which aggregate holds it, and via what collection.
PropertiesName, type, required/optional, and a max length for every string.
BehaviourThe methods that mutate it. Guards go in the property setter, business rules go in the method.
Domain eventsDoes any mutation need to trigger work elsewhere? Aggregate roots only.

If the entity has no behaviour and no invariants, say so — it may want to be a value object (a record implementing IValueObject, like Power) rather than an entity. Value objects need no ID, no configuration entry of their own, and no migration when owned.

Show full SKILL.md (484 more words)Show less

Steps

Work in this order. Later steps depend on earlier ones compiling.

  1. Domain folder — create src/WebApi/Common/Domain/{Aggregate}/ and add the entity plus its [ValueObject<Guid>] ID. Template: references/domain.md.

  2. Errors — {Entity}Errors.cs with Error constants. Add NotFound at minimum; endpoints will reach for it.

  3. Specification — {Entity}Spec.cs extending SingleResultSpecification<T>, with a static ById(...) factory. One spec class per aggregate; add a factory method per query rather than a new class. Child entities don't get their own spec — they're loaded through the aggregate's.

  4. EF configuration — src/WebApi/Common/Persistence/{Aggregate}/{Entity}Configuration.cs inheriting AuditableConfiguration<T>. Every string property's HasMaxLength reads the entity's const, never a literal. Template: references/persistence.md.

  5. Vogen registration — add [EfCoreConverter<{Entity}Id>] to VogenEfCoreConverters. See the trap above.

  6. DbSet — for an aggregate root only, add ApplicationDbContext.{Entities}.cs exposing DbSet<{Entity}> via AggregateRootSet<T>(). Child entities are reached through their aggregate, so they get no DbSet.

  7. Migration — run it yourself, don't just print the command:

    bash
    dotnet ef migrations add Add{Entity} \
      --project src/WebApi/WebApi.csproj \
      --startup-project src/WebApi/WebApi.csproj \
      --output-dir Common/Persistence/Migrations

    Then read the generated migration and confirm the tables and columns match what you configured. An empty Up() means EF didn't see your entity — usually a missing DbSet or a configuration that wasn't picked up by ApplyConfigurationsFromAssembly.

  8. Test data — add a Bogus factory at tests/WebApi.IntegrationTests/Common/Factories/{Entity}Factory.cs so integration tests have something to seed. Template in references/persistence.md.

  9. Seeding (optional) — extend tools/Seeder/Initializers/ApplicationDbContextInitializer.cs if the entity should show up in dev. Keep it idempotent: short-circuit when rows already exist.

  10. Unit tests — invariants and factory rules belong in tests/WebApi.UnitTests/Features/{Aggregate}/{Entity}Tests.cs. Cover the guards you wrote: a null/blank string should throw, an over-long string should throw, and the happy path should succeed.

Verification

bash
dotnet build && dotnet build -c Release
dotnet test tests/WebApi.UnitTests

Then confirm the two things a build can't:

  • Vogen registration — grep EfCoreConverter src/WebApi/Common/Persistence/VogenEfCoreConverters.cs lists your new ID. A green build proves nothing here.
  • The app still starts — the registration failure only surfaces at runtime, so boot it: aspire start --isolated (see the aspire skill), wait for the WebApi resource to report healthy, and check the migration ran. Alternatively dotnet test tests/WebApi.IntegrationTests exercises real startup against a real SQL Server, which catches the same class of failure.

Full detail on what "done" means: .claude/rules/verification.md.

Guardrails

  • Don't put guards in the factory. They go in the property setter using the field keyword — the setter is the only path every assignment goes through, including EF materialisation and later mutation.
  • Don't add a public parameterless constructor. EF needs a private one; the architecture tests assert this.
  • Don't reference a feature slice from the domain. Domain types know nothing about Features/.
  • Don't hand-edit a migration to fix a modelling mistake. Fix the entity or configuration and regenerate.
  • Don't delete or edit existing migrations. Roll forward with a new one.

Keeping this skill honest

The templates in references/ are copies of the repo's shapes, so they drift when the repo changes. If you hit a place where a template no longer matches Hero.cs or HeroConfiguration.cs, update the template as part of the same change.

© SSWConsulting, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in .claude/skills/add-entity of SSWConsulting/SSW.VerticalSliceArchitecture.

  • SKILL.md
  • references/domain.md
  • references/persistence.md

Open the folder on GitHubat commit 42e7a70

Compare with similar skills

Add Entity next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Add Entity compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Entity this skillSSWConsulting/SSW.VerticalSliceArchitecture407—~1.9kAutomated safety check: PassMIT
Speckit ConstitutionWeihanLi/WeihanLi.Common24211 repos~2.1kAutomated safety check: PassApache-2.0
Microsoft Code ReferenceMicrosoftDocs/mcp1.9k4 repos~1.1kAutomated safety check: PassCC-BY-4.0
Update .NET OS Packagesdotnet/core22k—~2.3kAutomated safety check: PassMIT
Update .NET Supported OS Matrixdotnet/core22k—~4.1kAutomated safety check: PassMIT
.NET Release Verificationdotnet/core22k—~1.8kAutomated safety check: PassMIT

Similar skills

  • Speckit Constitution

    WeihanLi/WeihanLi.Common

    Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.

    242 GitHub starsUsed in 11 repos~2.1k tokens
    DevelopmentAuto-check passed
  • Microsoft Code Reference

    MicrosoftDocs/mcp

    Official

    Find working code samples, verify API signatures, and fix Microsoft SDK errors using official docs.

    1.9k GitHub starsUsed in 4 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Official

    Audits and updates os-packages.json files listing the Linux packages each .NET release needs per distro, then regenerates the Markdown from the JSON.

    22k GitHub stars~2.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Official

    Audits and updates the supported-os.json files for .NET releases, checking them against upstream lifecycle data and regenerating the markdown with the release-notes tool.

    22k GitHub stars~4.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Official

    Validates .NET release data with the release-notes CLI: download URL liveness, SHA512 hashes, CDN latest.version files and aka.ms redirects.

    22k GitHub stars~1.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Official

    Scans C# and .NET code for about 50 performance anti-patterns and reports prioritized findings with concrete fixes, at a scan depth you choose.

    5.6k GitHub starsUsed in 3 repos~3.1k tokens
    DevelopmentAuto-check passed

More from SSWConsulting/SSW.VerticalSliceArchitecture

  • Add Slice

    SSWConsulting/SSW.VerticalSliceArchitecture

    Scaffold a slice in this Vertical Slice Architecture template — one use case in its own folder, with its FastEndpoints endpoint, request, response, validator, and summary, plus the Feature and Group…

    407 GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Aspire

    SSWConsulting/SSW.VerticalSliceArchitecture

    A skill your agent uses when the user is working with an Aspire distributed application and needs to operate the AppHost or its resources through the Aspire CLI: start, restart, stop, or wait on the…

    407 GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Add Adr

    SSWConsulting/SSW.VerticalSliceArchitecture

    Write an Architectural Decision Record in this repo's docs/adr/ following its Log4brains conventions — filename, title, metadata, and the sections that are required versus optional.

    407 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Bump Version

    SSWConsulting/SSW.VerticalSliceArchitecture

    Bump the SSW.VerticalSliceArchitecture.Template NuGet package version to cut a new release.

    407 GitHub stars~841 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Add Entity

What does Add Entity do?

Scaffold a new domain entity or aggregate in this Vertical Slice Architecture template — the entity itself, its strongly typed ID, errors, specification, EF Core configuration, DbSet, the mandatory…. VerticalSliceArchitecture. Scaffold a new domain entity or aggregate in this Vertical Slice Architecture template — the entity itself, its strongly typed ID, errors, specification, EF Core configuration, DbSet, the mandatory Vogen registration, and the migration.

When should I use Add Entity?

Add Entity fits situations like: the user says add an entity; add an aggregate; create a domain model; add a new table.

How do I install Add Entity in Claude Code?

Run `npx skills add SSWConsulting/SSW.VerticalSliceArchitecture --skill add-entity -a claude-code`. Or copy the skill folder (.claude/skills/add-entity in SSWConsulting/SSW.VerticalSliceArchitecture) into .claude/skills/add-entity in your project. Claude Code loads it when a task matches its description.

How do I install Add Entity in Codex?

Run `npx skills add SSWConsulting/SSW.VerticalSliceArchitecture --skill add-entity -a codex`. Or copy the skill folder (.claude/skills/add-entity in SSWConsulting/SSW.VerticalSliceArchitecture) into .agents/skills/add-entity in your project. Codex loads it when a task matches its description.

Can I use Add Entity in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add SSWConsulting/SSW.VerticalSliceArchitecture --skill add-entity -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-entity, .gemini/skills/add-entity, .github/skills/add-entity and .opencode/skills/add-entity in your project.

What does Add Entity need to run?

Going by SKILL.md and its folder, Add Entity needs the command-line tools its instructions call (dotnet).

Does Add Entity access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Add Entity safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Add Entity use?

Add Entity is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Add Entity use?

About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.4k tokens, read only when the agent opens those files.

What are the alternatives to Add Entity?

Skills that share tags, products or a category with Add Entity: Speckit Constitution (WeihanLi/WeihanLi.Common, 242 stars), Microsoft Code Reference (MicrosoftDocs/mcp, 1.9k stars), Update .NET OS Packages (dotnet/core, 22k stars) and Update .NET Supported OS Matrix (dotnet/core, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Entity?

SSWConsulting (a GitHub organization) maintains it in SSWConsulting/SSW.VerticalSliceArchitecture, which has 407 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 8, 2026.

Source: SSWConsulting/SSW.VerticalSliceArchitecture on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.