[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EA2BCCFGH4NTHKX7Z3PWZ9":3,"skill-same:01M7EA2BCCFGH4NTHKX7Z3PWZ9":118},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":13,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M7EA2BCCFGH4NTHKX7Z3PWZ9","efcore",null,"Data access code with Entity Framework Core 10 on SQL Server or PostgreSQL. Use when code or a review touches DbContext, DbSet, LINQ queries, Include, SaveChanges, ExecuteUpdate, raw SQL through EF, transactions, concurrency tokens, value objects, query filters, interceptors, migrations (dotnet ef, Migrations folder), seed data, or migration deployment in CI. Not for Dapper or plain ADO.NET code, T-SQL or PostgreSQL engine work (indexes, isolation, locks), or EF6 on .NET Framework.","Charmedme\u002Fmaikelsoft-skills","Charmedme","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F11330182?v=4","01M7E9YWP4Z4JJ1BRXTMWNXAEV","01M7E9YWPS4N3GKRGAYBBDJWNQ",0,"MIT","https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Fefcore\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: efcore\ndescription: Data access code with Entity Framework Core 10 on SQL Server or PostgreSQL. Use when code or a review touches DbContext, DbSet, LINQ queries, Include, SaveChanges, ExecuteUpdate, raw SQL through EF, transactions, concurrency tokens, value objects, query filters, interceptors, migrations (dotnet ef, Migrations folder), seed data, or migration deployment in CI. Not for Dapper or plain ADO.NET code, T-SQL or PostgreSQL engine work (indexes, isolation, locks), or EF6 on .NET Framework.\nmetadata:\n  verified: \"2026-10-27\"\n  versions: \"EF Core 10.0 (LTS), EFCore.PG 10.0, SQL Server 2025, PostgreSQL 18, .NET 10. EF Core 11 RC 3 in references\u002Fef11.md\"\n---\n\n# EF Core\n\nHow to use EF Core well, with any relational provider. Engine rules (T-SQL, indexes, isolation, locks) are in `dev-stack:sqlserver` and `dev-stack:postgresql`. Test database setup is in `dev-stack:dotnet-testing`.\n\n## First\n\n1. Read `references\u002Fstack-rules.md`.\n2. Find the EF version: the `Microsoft.EntityFrameworkCore*` package in `*.csproj` or `Directory.Packages.props`.\n   - EF Core 10: use this file.\n   - EF Core 11: use this file and read `references\u002Fef11.md`.\n   - EF Core 8 or 9: support ends on 2026-11-10. These rules apply, except the EF 10 APIs: complex type JSON, named query filters, `LeftJoin`, and the block lambda in `ExecuteUpdateAsync`. Tell the human about the upgrade. Do not upgrade unless the task asks for it.\n3. Find the provider: `UseSqlServer`, `UseAzureSql`, or `UseNpgsql`. Read `references\u002Fprovider-sqlserver.md` or `references\u002Fprovider-postgresql.md`.\n\nDone when you can name the EF version, the provider, and the provider version setting.\n\n## Defaults for new code\n\nAsk the human before you apply a default that has no accepted decision (stack rule 4). The full entries are in `references\u002Fdecisions.md`.\n\n| Area | Default | ID |\n|------|---------|----|\n| Library | EF Core only. `Select` projections for reads, `SqlQuery\u003CT>` for the rare query that LINQ cannot express. | DATA-02 |\n| Context | One DbContext per service. One per module in a modular monolith, with its own schema. | DATA-03, DATA-04 |\n| Data access | The DbContext directly in handlers. No generic repository, no `IUnitOfWork`. | DATA-05, DATA-06 |\n| Keys | `Guid` keys that the provider generates. Do not set them in code. | DATA-07 |\n| Names | SQL Server: PascalCase. PostgreSQL: snake_case with `EFCore.NamingConventions`. | DATA-09 |\n| Time | `DateTimeOffset` (UTC) for instants, `DateOnly` and `TimeOnly`, `TimeProvider` for now. | DATA-10 |\n| Decimals | `Properties\u003Cdecimal>().HavePrecision(18, 4)`. Money as a complex type when there are two or more currencies. | DATA-11 |\n| Enums | Strings, set in `ConfigureConventions`. | DATA-12 |\n| Audit | `CreatedAt` and `UpdatedAt` from one `SaveChangesInterceptor`. | DATA-14 |\n| Concurrency | `rowversion` (SQL Server) or `xmin` (PostgreSQL) on edited aggregates. | DATA-15 |\n| Migrations | EF migrations. Deploy with a bundle job. No `Migrate` at startup. | DATA-17, DATA-18 |\n| Bulk | `ExecuteUpdateAsync` and `ExecuteDeleteAsync`. `SqlBulkCopy` or Npgsql `COPY` for big inserts. | DATA-22 |\n\nExisting code keeps its style (stack rule 3).\n\n## Rules\n\n### Context and setup\n\n1. Register the context with `AddDbContext` (scoped, one per request). Use `AddDbContextPool` only when profiling shows that setup cost matters and the context has no state per request. A pooled context keeps fields such as a tenant ID from the last request.\n2. In background services, singletons, Blazor Server, and parallel work, inject `IDbContextFactory\u003CT>`. Create and dispose one context for each unit of work. A singleton that holds a scoped context keeps it alive forever.\n3. Run one operation at a time on a context. Do not use `Task.WhenAll` on queries of one context, because EF throws \"A second operation started on this context\".\n4. Put the model in `IEntityTypeConfiguration\u003CT>` classes with `ApplyConfigurationsFromAssembly`. Put type-wide defaults in `ConfigureConventions`. Then a new property gets the correct precision, length, and enum mapping without extra code.\n5. Set the provider version to the real server version. SQL Server 2025: `UseCompatibilityLevel(170)`. PostgreSQL 18: `SetPostgresVersion(18, 0)`. EF writes SQL for the version that it assumes, and the defaults are older.\n6. Turn on `EnableRetryOnFailure` for cloud and container databases. Then follow rule 20.\n\n```csharp\nservices.AddDbContext\u003CAppDbContext>((sp, options) =>\n{\n    options.UseSqlServer(connectionString, sql =>\n    {\n        sql.UseCompatibilityLevel(170); \u002F\u002F SQL Server 2025: native json type\n        sql.EnableRetryOnFailure();\n    });\n    options.AddInterceptors(sp.GetRequiredService\u003CAuditInterceptor>());\n    options.EnableSensitiveDataLogging(env.IsDevelopment());\n});\n```\n\n### Queries\n\n7. Project read endpoints to DTOs with `Select`. EF reads only the columns that you need, and it tracks nothing.\n8. Add `AsNoTracking()` only to read-only queries that return entities. A projection without entities has nothing to track. EF tracks an entity inside a DTO.\n9. Load related data in the same query, with a projection or `Include`. Do not read a navigation inside a loop (N+1). Do not turn on lazy loading.\n10. Add `AsSplitQuery()` to a query that includes two or more sibling collections. Keep single queries as the default. A split query sends more statements and can read data that changed between them.\n11. Give each paged query a unique, stable order (`OrderBy(...).ThenBy(o => o.Id)`). Use keyset paging for deep pages, because `Skip` reads and discards each skipped row.\n12. Compare the bare column: `o.CreatedAt >= start && o.CreatedAt \u003C end`, not `o.CreatedAt.Year == year`. Do not use `ToLower()` for case-insensitive search. Use a collation (see the provider reference).\n13. Use the async methods (`ToListAsync`, `SingleAsync`, `SaveChangesAsync`) and pass the `CancellationToken`. Stream large results with `AsAsyncEnumerable()`.\n14. Use `EF.CompileAsyncQuery` only for a hot query with a fixed shape that runs many times each second. EF already caches the translation of each query shape.\n15. For a `Contains` with a large list, write `EF.Parameter(ids).Contains(o.Id)`. EF 10 sends one parameter for each element by default, and SQL Server allows at most 2100 parameters.\n\nDetail, evidence rules, and examples: `references\u002Fqueries.md`.\n\n### Writes\n\n16. Call `SaveChangesAsync` one time per request or message. It sends all changes in one transaction.\n17. Use `ExecuteUpdateAsync` and `ExecuteDeleteAsync` for set-based changes without logic per entity. They run at once and skip the change tracker, concurrency tokens, and `SaveChanges` interceptors. Do not change the same rows through tracked entities in the same unit of work.\n18. Put a concurrency token on each aggregate that two users or two messages can change (DATA-15). Catch `DbUpdateConcurrencyException` and return 409, or retry the message.\n19. Put a unique index on a unique column and catch the violation. A check before the insert does not stop two inserts at the same time.\n20. When retries are on, run each explicit transaction inside `CreateExecutionStrategy().ExecuteAsync`. Clear the change tracker at the start, because the strategy can run the delegate again. Without the strategy, EF throws.\n21. Keep a transaction short. Do not call an HTTP service or wait for a user inside it.\n22. When a cache holds the data, save first, then remove the cache key. Do not write the new value into the cache from the write path (`dev-stack:redis`).\n\n```csharp\nvar strategy = db.Database.CreateExecutionStrategy();\nawait strategy.ExecuteAsync(async token =>\n{\n    db.ChangeTracker.Clear(); \u002F\u002F the delegate can run again: start clean\n    await using var tx = await db.Database.BeginTransactionAsync(token);\n    var order = await db.Orders.SingleAsync(o => o.Id == id, token);\n    order.Status = OrderStatus.Shipped;\n    await db.SaveChangesAsync(token);\n    await db.Orders\n        .Where(o => o.CustomerId == order.CustomerId && o.Status == OrderStatus.Draft)\n        .ExecuteDeleteAsync(token);\n    await tx.CommitAsync(token);\n}, ct);\n```\n\nDetail on bulk, concurrency, transactions, and cache invalidation: `references\u002Fwrites.md`.\n\n### Raw SQL\n\n23. Use `FromSql`, `SqlQuery\u003CT>`, and `ExecuteSqlAsync` with an interpolated string. EF sends each value as a parameter. Use `FromSqlRaw` only for an identifier that you check against an allow list, and pass the values as `{0}` parameters.\n\n```csharp\ndb.Customers.FromSql($\"SELECT * FROM Customers WHERE Email LIKE {\"%@\" + domain}\")\n```\n\n### Model\n\n24. Map value objects as complex types: `ComplexProperty(o => o.Address)` for columns, `ComplexProperty(o => o.Details, b => b.ToJson())` for a JSON column, `ComplexCollection(..., b => b.ToJson())` for a list. Owned types are entity types with a hidden key.\n25. Let the provider generate `Guid` keys (sequential on SQL Server, UUIDv7 on EFCore.PG 9+). Do not set `Id = Guid.NewGuid()`.\n26. Store instants as `DateTimeOffset` in UTC. Read the time from `TimeProvider`. Use `DateOnly` and `TimeOnly` for calendar values.\n27. Register an interceptor one time as a singleton and add that instance. A new instance for each context makes EF build a new internal service provider each time.\n28. Give each query filter a name (`HasQueryFilter(\"Tenant\", ...)`). Then a query can switch off one filter with `IgnoreQueryFilters([\"SoftDelete\"])` and keep the tenant filter.\n\nDetail on conventions, converters, interceptors, filters, seed data, and time: `references\u002Fmodeling.md`.\n\n### Migrations\n\n29. Read each generated migration before you commit it. EF writes a column rename as a drop and an add, and that deletes the data.\n30. Run `dotnet ef migrations has-pending-model-changes` in CI. EF 9+ also throws at `Migrate` when the model has changes without a migration.\n31. Deploy migrations with a bundle job or an idempotent script (DATA-18). Do not call `Database.Migrate` at startup without an accepted decision. Do not call `EnsureCreated` outside tests.\n32. On a merge conflict in the model snapshot, remove your migration, merge, and add your migration again. Do not edit the snapshot by hand.\n32a. Some teams deploy with one idempotent script (`migrations script --idempotent`). When a PostgreSQL index must not block writes there, keep that one script. Do not use `IsCreatedConcurrently()`: PostgreSQL rejects `CREATE INDEX CONCURRENTLY` in the `DO` block of the script (SQLSTATE 25001). Do these three steps:\n    - Add a pre-deploy SQL file that the DBA runs with psql before the script, outside a transaction. It drops an INVALID index with the same name, then runs `CREATE INDEX CONCURRENTLY IF NOT EXISTS`.\n    - In the migration, replace the generated `CreateIndex` with `migrationBuilder.Sql(\"CREATE INDEX IF NOT EXISTS ...\")` with the same index name. Keep `HasIndex` in the model, so the snapshot stays correct.\n    - Run the idempotent script after the pre-deploy file, and on a new database. Both runs must end without an error.\n\nDetail on teams, CI, bundles, scripts, seed data, and expand-contract: `references\u002Fmigrations.md`.\n\n### Logging\n\n33. Turn on `EnableSensitiveDataLogging` only in development. It writes parameter values to the log.\n\n## Never write\n\n| Wrong | Correct |\n|-------|---------|\n| `FromSqlRaw($\"... {name}\")` or `\"... \" + name` | `FromSql($\"... {name}\")` |\n| `FromSqlInterpolated(...)` | `FromSql(...)` |\n| `options.UseInMemoryDatabase(\"test\")` | Testcontainers with the production engine (`dev-stack:dotnet-testing`) |\n| `new Mock\u003CDbSet\u003COrder>>()` | A query test against the real engine |\n| `db.Database.EnsureCreated()` in app code | Migrations, deployed by a bundle or a script |\n| `app.Services...Database.Migrate()` in `Program.cs` | Bundle job (`dotnet ef migrations bundle`), or a startup call with a reason (DATA-18) |\n| `OwnsOne(o => o.Address)`, `OwnsMany(..., b => b.ToJson())` | `ComplexProperty(o => o.Address)`, `ComplexCollection(..., b => b.ToJson())` |\n| `UseXminAsConcurrencyToken()` | `[Timestamp] public uint Version { get; set; }` |\n| `public Guid Id { get; set; } = Guid.NewGuid();` | `public Guid Id { get; set; }` (the provider generates it) |\n| `Guid.CreateVersion7()` for a SQL Server clustered key | The EF sequential GUID generator (default) |\n| `CreatedAt = DateTime.Now` | `CreatedAt = clock.GetUtcNow()` |\n| `AppContext.SetSwitch(\"Npgsql.EnableLegacyTimestampBehavior\", true)` | UTC values |\n| `Where(u => u.Email.ToLower() == email.ToLower())` | A case-insensitive collation, or `EF.Functions.ILike` on PostgreSQL |\n| `await Task.WhenAll(QueryA(db), QueryB(db))` | Two awaits, or one context per task from `IDbContextFactory\u003CT>` |\n| `BeginTransactionAsync()` with retries on, outside a strategy | `CreateExecutionStrategy().ExecuteAsync(...)` |\n| `Expression.Lambda\u003C...>` to build `SetPropertyCalls` | Block lambda: `ExecuteUpdateAsync(s => { if (x) s.SetProperty(...); })` |\n| `GroupJoin(...).SelectMany(... DefaultIfEmpty())` | `LeftJoin(...)` (.NET 10) |\n| `.AsNoTracking().Select(o => new Dto(...))` | `.Select(o => new Dto(...))` |\n| `UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery)` for all queries | `AsSplitQuery()` on the query that needs it |\n| `IRepository\u003CT>` over `DbSet\u003CT>` | The DbContext directly (DATA-05) |\n| `db.Orders.BulkInsertAsync(rows)` | `SqlBulkCopy` or Npgsql `COPY`. The BulkExtensions package has a dual license. |\n| `ToAsyncEnumerable()` on an EF query | `AsAsyncEnumerable()` |\n| Package `System.Linq.Async` on .NET 10 | Nothing: async LINQ is in the base library |\n| \"Npgsql 10 generates UUIDv7 keys\" | The EF provider EFCore.PG 9+ generates them. Npgsql (ADO.NET) does not. |\n\n## Check\n\n1. Build with the analyzers as errors. EF1002 and EF1003 (Raw SQL with interpolation or concatenation) come with the EF package.\n\n   ```\n   dotnet build -warnaserror\n   ```\n\n   Pass: `Build succeeded` with 0 warnings.\n\n2. Check that the model has no changes without a migration:\n\n   ```\n   dotnet ef migrations has-pending-model-changes --project \u003Cdata project> --startup-project \u003Capp project>\n   ```\n\n   Pass: exit code 0. Exit code 1 means that a migration is missing.\n\n3. Run the rules of this skill:\n\n   ```\n   python3 \u003Cskill folder>\u002Fscripts\u002Fstackcheck.py --root \u003Crepo>\n   ```\n\n   Pass: 0 errors. For each warning, fix it or add `\u002F\u002F stackcheck: ignore \u003CRULE-ID> \u003Creason>`.\n\n4. Run the tests with `ConfigureWarnings(w => w.Throw(...))` for `SqlServerEventId.DecimalTypeDefaultWarning` and `RelationalEventId.MultipleCollectionIncludeWarning`. Pass: all tests green.\n\n## Review checklist\n\nThe full list is in `references\u002Freview-checklist.md`.\n\n1. No interpolation or concatenation in `FromSqlRaw`, `SqlQueryRaw`, or `ExecuteSqlRaw`. tool (EF1002, EF1003, EF-RAW-SQL-INTERP, EF-RAW-SQL-CONCAT)\n2. No InMemory provider and no mocked `DbSet`. tool (EF-INMEMORY, EF-PKG-INMEMORY, EF-MOCK-DBSET)\n3. No `EnsureCreated` in app code, no startup `Migrate` without a decision. tool (EF-ENSURE-CREATED, EF-STARTUP-MIGRATE)\n4. CI runs `has-pending-model-changes`, and each new migration has no drop and add for a rename. tool (pipeline), judge\n5. Each `decimal` has a precision. tool (`DecimalTypeDefaultWarning` throws in tests)\n6. A query with two or more sibling collection `Include`s uses `AsSplitQuery()` or a projection. tool (`MultipleCollectionIncludeWarning`), judge\n7. No navigation access in a loop, no lazy loading. tool (EF-LAZY-PROXIES, EF-PKG-PROXIES), judge\n8. Async EF calls in async code, with the `CancellationToken`. tool (CA1849, CA2016)\n9. No two operations at the same time on one context. Background services use `IDbContextFactory\u003CT>`. judge\n10. Read endpoints project to DTOs. `AsNoTracking` only on entity reads. judge\n11. Paged queries have a unique order. judge\n12. Edited aggregates have a concurrency token, and the code handles `DbUpdateConcurrencyException`. judge\n13. Explicit transactions run inside the execution strategy when retries are on. judge\n14. `ExecuteUpdate` and `ExecuteDelete` callers do not need tracked state, tokens, or interceptors. judge\n15. Value objects are complex types. GUID keys come from the provider. tool (EF-OWNED-TYPE, EF-GUID-KEY)\n\n## Report\n\nEnd with the report of stack rule 8 (`references\u002Fstack-rules.md`): the same headings in the same order on each run.\n\n## References\n\n- `references\u002Fdecisions.md`: read before new code needs a DATA decision. It has the question, the options, and the recommendation.\n- `references\u002Fqueries.md`: read when you write or review a query (projections, N+1, split queries, paging, `Contains` lists).\n- `references\u002Fwrites.md`: read when you write `SaveChanges`, `ExecuteUpdate`, a transaction, a concurrency token, bulk work, or cache invalidation.\n- `references\u002Fmodeling.md`: read when you add an entity, a value object, a converter, an interceptor, a query filter, seed data, or a date column.\n- `references\u002Fmigrations.md`: read before you add, merge, review, or deploy a migration.\n- `references\u002Ftesting.md`: read before you write a test that uses a DbContext.\n- `references\u002Fprovider-sqlserver.md`: read when the project uses `UseSqlServer` or `UseAzureSql`.\n- `references\u002Fprovider-postgresql.md`: read when the project uses `UseNpgsql`.\n- `references\u002Fef11.md`: read only when the project uses EF Core 11.\n- `references\u002Freview-checklist.md`: read for a full review.\n- `references\u002Fsources.md`: the primary sources and the credits.\n- `references\u002Fstack-rules.md` and `references\u002Flanguage.md`: the common rules and the output language.\n- `scripts\u002Fstackcheck.py`: the rule check of this skill.\n","# EF Core\n\nHow to use EF Core well, with any relational provider. Engine rules (T-SQL, indexes, isolation, locks) are in `dev-stack:sqlserver` and `dev-stack:postgresql`. Test database setup is in `dev-stack:dotnet-testing`.\n\n## First\n\n1. Read `references\u002Fstack-rules.md`.\n2. Find the EF version: the `Microsoft.EntityFrameworkCore*` package in `*.csproj` or `Directory.Packages.props`.\n   - EF Core 10: use this file.\n   - EF Core 11: use this file and read `references\u002Fef11.md`.\n   - EF Core 8 or 9: support ends on 2026-11-10. These rules apply, except the EF 10 APIs: complex type JSON, named query filters, `LeftJoin`, and the block lambda in `ExecuteUpdateAsync`. Tell the human about the upgrade. Do not upgrade unless the task asks for it.\n3. Find the provider: `UseSqlServer`, `UseAzureSql`, or `UseNpgsql`. Read `references\u002Fprovider-sqlserver.md` or `references\u002Fprovider-postgresql.md`.\n\nDone when you can name the EF version, the provider, and the provider version setting.\n\n## Defaults for new code\n\nAsk the human before you apply a default that has no accepted decision (stack rule 4). The full entries are in `references\u002Fdecisions.md`.\n\n| Area | Default | ID |\n|------|---------|----|\n| Library | EF Core only. `Select` projections for reads, `SqlQuery\u003CT>` for the rare query that LINQ cannot express. | DATA-02 |\n| Context | One DbContext per service. One per module in a modular monolith, with its own schema. | DATA-03, DATA-04 |\n| Data access | The DbContext directly in handlers. No generic repository, no `IUnitOfWork`. | DATA-05, DATA-06 |\n| Keys | `Guid` keys that the provider generates. Do not set them in code. | DATA-07 |\n| Names | SQL Server: PascalCase. PostgreSQL: snake_case with `EFCore.NamingConventions`. | DATA-09 |\n| Time | `DateTimeOffset` (UTC) for instants, `DateOnly` and `TimeOnly`, `TimeProvider` for now. | DATA-10 |\n| Decimals | `Properties\u003Cdecimal>().HavePrecision(18, 4)`. Money as a complex type when there are two or more currencies. | DATA-11 |\n| Enums | Strings, set in `ConfigureConventions`. | DATA-12 |\n| Audit | `CreatedAt` and `UpdatedAt` from one `SaveChangesInterceptor`. | DATA-14 |\n| Concurrency | `rowversion` (SQL Server) or `xmin` (PostgreSQL) on edited aggregates. | DATA-15 |\n| Migrations | EF migrations. Deploy with a bundle job. No `Migrate` at startup. | DATA-17, DATA-18 |\n| Bulk | `ExecuteUpdateAsync` and `ExecuteDeleteAsync`. `SqlBulkCopy` or Npgsql `COPY` for big inserts. | DATA-22 |\n\nExisting code keeps its style (stack rule 3).\n\n## Rules\n\n### Context and setup\n\n1. Register the context with `AddDbContext` (scoped, one per request). Use `AddDbContextPool` only when profiling shows that setup cost matters and the context has no state per request. A pooled context keeps fields such as a tenant ID from the last request.\n2. In background services, singletons, Blazor Server, and parallel work, inject `IDbContextFactory\u003CT>`. Create and dispose one context for each unit of work. A singleton that holds a scoped context keeps it alive forever.\n3. Run one operation at a time on a context. Do not use `Task.WhenAll` on queries of one context, because EF throws \"A second operation started on this context\".\n4. Put the model in `IEntityTypeConfiguration\u003CT>` classes with `ApplyConfigurationsFromAssembly`. Put type-wide defaults in `ConfigureConventions`. Then a new property gets the correct precision, length, and enum mapping without extra code.\n5. Set the provider version to the real server version. SQL Server 2025: `UseCompatibilityLevel(170)`. PostgreSQL 18: `SetPostgresVersion(18, 0)`. EF writes SQL for the version that it assumes, and the defaults are older.\n6. Turn on `EnableRetryOnFailure` for cloud and container databases. Then follow rule 20.\n\n```csharp\nservices.AddDbContext\u003CAppDbContext>((sp, options) =>\n{\n    options.UseSqlServer(connectionString, sql =>\n    {\n        sql.UseCompatibilityLevel(170); \u002F\u002F SQL Server 2025: native json type\n        sql.EnableRetryOnFailure();\n    });\n    options.AddInterceptors(sp.GetRequiredService\u003CAuditInterceptor>());\n    options.EnableSensitiveDataLogging(env.IsDevelopment());\n});\n```\n\n### Queries\n\n7. Project read endpoints to DTOs with `Select`. EF reads only the columns that you need, and it tracks nothing.\n8. Add `AsNoTracking()` only to read-only queries that return entities. A projection without entities has nothing to track. EF tracks an entity inside a DTO.\n9. Load related data in the same query, with a projection or `Include`. Do not read a navigation inside a loop (N+1). Do not turn on lazy loading.\n10. Add `AsSplitQuery()` to a query that includes two or more sibling collections. Keep single queries as the default. A split query sends more statements and can read data that changed between them.\n11. Give each paged query a unique, stable order (`OrderBy(...).ThenBy(o => o.Id)`). Use keyset paging for deep pages, because `Skip` reads and discards each skipped row.\n12. Compare the bare column: `o.CreatedAt >= start && o.CreatedAt \u003C end`, not `o.CreatedAt.Year == year`. Do not use `ToLower()` for case-insensitive search. Use a collation (see the provider reference).\n13. Use the async methods (`ToListAsync`, `SingleAsync`, `SaveChangesAsync`) and pass the `CancellationToken`. Stream large results with `AsAsyncEnumerable()`.\n14. Use `EF.CompileAsyncQuery` only for a hot query with a fixed shape that runs many times each second. EF already caches the translation of each query shape.\n15. For a `Contains` with a large list, write `EF.Parameter(ids).Contains(o.Id)`. EF 10 sends one parameter for each element by default, and SQL Server allows at most 2100 parameters.\n\nDetail, evidence rules, and examples: `references\u002Fqueries.md`.\n\n### Writes\n\n16. Call `SaveChangesAsync` one time per request or message. It sends all changes in one transaction.\n17. Use `ExecuteUpdateAsync` and `ExecuteDeleteAsync` for set-based changes without logic per entity. They run at once and skip the change tracker, concurrency tokens, and `SaveChanges` interceptors. Do not change the same rows through tracked entities in the same unit of work.\n18. Put a concurrency token on each aggregate that two users or two messages can change (DATA-15). Catch `DbUpdateConcurrencyException` and return 409, or retry the message.\n19. Put a unique index on a unique column and catch the violation. A check before the insert does not stop two inserts at the same time.\n20. When retries are on, run each explicit transaction inside `CreateExecutionStrategy().ExecuteAsync`. Clear the change tracker at the start, because the strategy can run the delegate again. Without the strategy, EF throws.\n21. Keep a transaction short. Do not call an HTTP service or wait for a user inside it.\n22. When a cache holds the data, save first, then remove the cache key. Do not write the new value into the cache from the write path (`dev-stack:redis`).\n\n```csharp\nvar strategy = db.Database.CreateExecutionStrategy();\nawait strategy.ExecuteAsync(async token =>\n{\n    db.ChangeTracker.Clear(); \u002F\u002F the delegate can run again: start clean\n    await using var tx = await db.Database.BeginTransactionAsync(token);\n    var order = await db.Orders.SingleAsync(o => o.Id == id, token);\n    order.Status = OrderStatus.Shipped;\n    await db.SaveChangesAsync(token);\n    await db.Orders\n        .Where(o => o.CustomerId == order.CustomerId && o.Status == OrderStatus.Draft)\n        .ExecuteDeleteAsync(token);\n    await tx.CommitAsync(token);\n}, ct);\n```\n\nDetail on bulk, concurrency, transactions, and cache invalidation: `references\u002Fwrites.md`.\n\n### Raw SQL\n\n23. Use `FromSql`, `SqlQuery\u003CT>`, and `ExecuteSqlAsync` with an interpolated string. EF sends each value as a parameter. Use `FromSqlRaw` only for an identifier that you check against an allow list, and pass the values as `{0}` parameters.\n\n```csharp\ndb.Customers.FromSql($\"SELECT * FROM Customers WHERE Email LIKE {\"%@\" + domain}\")\n```\n\n### Model\n\n24. Map value objects as complex types: `ComplexProperty(o => o.Address)` for columns, `ComplexProperty(o => o.Details, b => b.ToJson())` for a JSON column, `ComplexCollection(..., b => b.ToJson())` for a list. Owned types are entity types with a hidden key.\n25. Let the provider generate `Guid` keys (sequential on SQL Server, UUIDv7 on EFCore.PG 9+). Do not set `Id = Guid.NewGuid()`.\n26. Store instants as `DateTimeOffset` in UTC. Read the time from `TimeProvider`. Use `DateOnly` and `TimeOnly` for calendar values.\n27. Register an interceptor one time as a singleton and add that instance. A new instance for each context makes EF build a new internal service provider each time.\n28. Give each query filter a name (`HasQueryFilter(\"Tenant\", ...)`). Then a query can switch off one filter with `IgnoreQueryFilters([\"SoftDelete\"])` and keep the tenant filter.\n\nDetail on conventions, converters, interceptors, filters, seed data, and time: `references\u002Fmodeling.md`.\n\n### Migrations\n\n29. Read each generated migration before you commit it. EF writes a column rename as a drop and an add, and that deletes the data.\n30. Run `dotnet ef migrations has-pending-model-changes` in CI. EF 9+ also throws at `Migrate` when the model has changes without a migration.\n31. Deploy migrations with a bundle job or an idempotent script (DATA-18). Do not call `Database.Migrate` at startup without an accepted decision. Do not call `EnsureCreated` outside tests.\n32. On a merge conflict in the model snapshot, remove your migration, merge, and add your migration again. Do not edit the snapshot by hand.\n32a. Some teams deploy with one idempotent script (`migrations script --idempotent`). When a PostgreSQL index must not block writes there, keep that one script. Do not use `IsCreatedConcurrently()`: PostgreSQL rejects `CREATE INDEX CONCURRENTLY` in the `DO` block of the script (SQLSTATE 25001). Do these three steps:\n    - Add a pre-deploy SQL file that the DBA runs with psql before the script, outside a transaction. It drops an INVALID index with the same name, then runs `CREATE INDEX CONCURRENTLY IF NOT EXISTS`.\n    - In the migration, replace the generated `CreateIndex` with `migrationBuilder.Sql(\"CREATE INDEX IF NOT EXISTS ...\")` with the same index name. Keep `HasIndex` in the model, so the snapshot stays correct.\n    - Run the idempotent script after the pre-deploy file, and on a new database. Both runs must end without an error.\n\nDetail on teams, CI, bundles, scripts, seed data, and expand-contract: `references\u002Fmigrations.md`.\n\n### Logging\n\n33. Turn on `EnableSensitiveDataLogging` only in development. It writes parameter values to the log.\n\n## Never write\n\n| Wrong | Correct |\n|-------|---------|\n| `FromSqlRaw($\"... {name}\")` or `\"... \" + name` | `FromSql($\"... {name}\")` |\n| `FromSqlInterpolated(...)` | `FromSql(...)` |\n| `options.UseInMemoryDatabase(\"test\")` | Testcontainers with the production engine (`dev-stack:dotnet-testing`) |\n| `new Mock\u003CDbSet\u003COrder>>()` | A query test against the real engine |\n| `db.Database.EnsureCreated()` in app code | Migrations, deployed by a bundle or a script |\n| `app.Services...Database.Migrate()` in `Program.cs` | Bundle job (`dotnet ef migrations bundle`), or a startup call with a reason (DATA-18) |\n| `OwnsOne(o => o.Address)`, `OwnsMany(..., b => b.ToJson())` | `ComplexProperty(o => o.Address)`, `ComplexCollection(..., b => b.ToJson())` |\n| `UseXminAsConcurrencyToken()` | `[Timestamp] public uint Version { get; set; }` |\n| `public Guid Id { get; set; } = Guid.NewGuid();` | `public Guid Id { get; set; }` (the provider generates it) |\n| `Guid.CreateVersion7()` for a SQL Server clustered key | The EF sequential GUID generator (default) |\n| `CreatedAt = DateTime.Now` | `CreatedAt = clock.GetUtcNow()` |\n| `AppContext.SetSwitch(\"Npgsql.EnableLegacyTimestampBehavior\", true)` | UTC values |\n| `Where(u => u.Email.ToLower() == email.ToLower())` | A case-insensitive collation, or `EF.Functions.ILike` on PostgreSQL |\n| `await Task.WhenAll(QueryA(db), QueryB(db))` | Two awaits, or one context per task from `IDbContextFactory\u003CT>` |\n| `BeginTransactionAsync()` with retries on, outside a strategy | `CreateExecutionStrategy().ExecuteAsync(...)` |\n| `Expression.Lambda\u003C...>` to build `SetPropertyCalls` | Block lambda: `ExecuteUpdateAsync(s => { if (x) s.SetProperty(...); })` |\n| `GroupJoin(...).SelectMany(... DefaultIfEmpty())` | `LeftJoin(...)` (.NET 10) |\n| `.AsNoTracking().Select(o => new Dto(...))` | `.Select(o => new Dto(...))` |\n| `UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery)` for all queries | `AsSplitQuery()` on the query that needs it |\n| `IRepository\u003CT>` over `DbSet\u003CT>` | The DbContext directly (DATA-05) |\n| `db.Orders.BulkInsertAsync(rows)` | `SqlBulkCopy` or Npgsql `COPY`. The BulkExtensions package has a dual license. |\n| `ToAsyncEnumerable()` on an EF query | `AsAsyncEnumerable()` |\n| Package `System.Linq.Async` on .NET 10 | Nothing: async LINQ is in the base library |\n| \"Npgsql 10 generates UUIDv7 keys\" | The EF provider EFCore.PG 9+ generates them. Npgsql (ADO.NET) does not. |\n\n## Check\n\n1. Build with the analyzers as errors. EF1002 and EF1003 (Raw SQL with interpolation or concatenation) come with the EF package.\n\n   ```\n   dotnet build -warnaserror\n   ```\n\n   Pass: `Build succeeded` with 0 warnings.\n\n2. Check that the model has no changes without a migration:\n\n   ```\n   dotnet ef migrations has-pending-model-changes --project \u003Cdata project> --startup-project \u003Capp project>\n   ```\n\n   Pass: exit code 0. Exit code 1 means that a migration is missing.\n\n3. Run the rules of this skill:\n\n   ```\n   python3 \u003Cskill folder>\u002Fscripts\u002Fstackcheck.py --root \u003Crepo>\n   ```\n\n   Pass: 0 errors. For each warning, fix it or add `\u002F\u002F stackcheck: ignore \u003CRULE-ID> \u003Creason>`.\n\n4. Run the tests with `ConfigureWarnings(w => w.Throw(...))` for `SqlServerEventId.DecimalTypeDefaultWarning` and `RelationalEventId.MultipleCollectionIncludeWarning`. Pass: all tests green.\n\n## Review checklist\n\nThe full list is in `references\u002Freview-checklist.md`.\n\n1. No interpolation or concatenation in `FromSqlRaw`, `SqlQueryRaw`, or `ExecuteSqlRaw`. tool (EF1002, EF1003, EF-RAW-SQL-INTERP, EF-RAW-SQL-CONCAT)\n2. No InMemory provider and no mocked `DbSet`. tool (EF-INMEMORY, EF-PKG-INMEMORY, EF-MOCK-DBSET)\n3. No `EnsureCreated` in app code, no startup `Migrate` without a decision. tool (EF-ENSURE-CREATED, EF-STARTUP-MIGRATE)\n4. CI runs `has-pending-model-changes`, and each new migration has no drop and add for a rename. tool (pipeline), judge\n5. Each `decimal` has a precision. tool (`DecimalTypeDefaultWarning` throws in tests)\n6. A query with two or more sibling collection `Include`s uses `AsSplitQuery()` or a projection. tool (`MultipleCollectionIncludeWarning`), judge\n7. No navigation access in a loop, no lazy loading. tool (EF-LAZY-PROXIES, EF-PKG-PROXIES), judge\n8. Async EF calls in async code, with the `CancellationToken`. tool (CA1849, CA2016)\n9. No two operations at the same time on one context. Background services use `IDbContextFactory\u003CT>`. judge\n10. Read endpoints project to DTOs. `AsNoTracking` only on entity reads. judge\n11. Paged queries have a unique order. judge\n12. Edited aggregates have a concurrency token, and the code handles `DbUpdateConcurrencyException`. judge\n13. Explicit transactions run inside the execution strategy when retries are on. judge\n14. `ExecuteUpdate` and `ExecuteDelete` callers do not need tracked state, tokens, or interceptors. judge\n15. Value objects are complex types. GUID keys come from the provider. tool (EF-OWNED-TYPE, EF-GUID-KEY)\n\n## Report\n\nEnd with the report of stack rule 8 (`references\u002Fstack-rules.md`): the same headings in the same order on each run.\n\n## References\n\n- `references\u002Fdecisions.md`: read before new code needs a DATA decision. It has the question, the options, and the recommendation.\n- `references\u002Fqueries.md`: read when you write or review a query (projections, N+1, split queries, paging, `Contains` lists).\n- `references\u002Fwrites.md`: read when you write `SaveChanges`, `ExecuteUpdate`, a transaction, a concurrency token, bulk work, or cache invalidation.\n- `references\u002Fmodeling.md`: read when you add an entity, a value object, a converter, an interceptor, a query filter, seed data, or a date column.\n- `references\u002Fmigrations.md`: read before you add, merge, review, or deploy a migration.\n- `references\u002Ftesting.md`: read before you write a test that uses a DbContext.\n- `references\u002Fprovider-sqlserver.md`: read when the project uses `UseSqlServer` or `UseAzureSql`.\n- `references\u002Fprovider-postgresql.md`: read when the project uses `UseNpgsql`.\n- `references\u002Fef11.md`: read only when the project uses EF Core 11.\n- `references\u002Freview-checklist.md`: read for a full review.\n- `references\u002Fsources.md`: the primary sources and the credits.\n- `references\u002Fstack-rules.md` and `references\u002Flanguage.md`: the common rules and the output language.\n- `scripts\u002Fstackcheck.py`: the rule check of this skill.\n",{"name":5,"metadata":23,"description":7},{"verified":24,"versions":25},"2026-10-27","EF Core 10.0 (LTS), EFCore.PG 10.0, SQL Server 2025, PostgreSQL 18, .NET 10. EF Core 11 RC 3 in references\u002Fef11.md","main","c247fa77bdea99449b9df09f93d92a35fed91874","plugins\u002Fdev-stack\u002Fskills\u002Fefcore","https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills","https:\u002F\u002Fgithub.com\u002FCharmedme","2026-11-13 14:41:21",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Charmedme\u002Fmaikelsoft-skills --skill efcore",{"tool":38,"command":39},"bunx","bunx skills add Charmedme\u002Fmaikelsoft-skills --skill efcore",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Charmedme\u002Fmaikelsoft-skills --skill efcore","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Fefcore\u002FSKILL.md",true,[46,52,56,60,64,68,72,76,80,84,88,92,96,100,104,110,114],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Fdecisions.md","REFERENCE","参考文档",20154,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Fefcore\u002Freferences\u002Fdecisions.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fef11.md",4482,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Fefcore\u002Freferences\u002Fef11.md",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Flanguage.md",4840,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Fefcore\u002Freferences\u002Flanguage.md",{"path":61,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Fmigrations.md",7756,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Fefcore\u002Freferences\u002Fmigrations.md",{"path":65,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Fmodeling.md",10312,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Fefcore\u002Freferences\u002Fmodeling.md",{"path":69,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Fprovider-postgresql.md",7432,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Fefcore\u002Freferences\u002Fprovider-postgresql.md",{"path":73,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fprovider-sqlserver.md",6185,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Fefcore\u002Freferences\u002Fprovider-sqlserver.md",{"path":77,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fqueries.md",9629,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Fefcore\u002Freferences\u002Fqueries.md",{"path":81,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Freview-checklist.md",6766,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Fefcore\u002Freferences\u002Freview-checklist.md",{"path":85,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Fsources.md",8057,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Fefcore\u002Freferences\u002Fsources.md",{"path":89,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Fstack-rules.md",7772,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Fefcore\u002Freferences\u002Fstack-rules.md",{"path":93,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":94,"sourceHtmlUrl":95},"references\u002Ftesting.md",4517,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Fefcore\u002Freferences\u002Ftesting.md",{"path":97,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":98,"sourceHtmlUrl":99},"references\u002Fwrites.md",9057,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Fefcore\u002Freferences\u002Fwrites.md",{"path":101,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":102,"sourceHtmlUrl":103},"rules.json",19892,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Fefcore\u002Frules.json",{"path":105,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":108,"sourceHtmlUrl":109},"scripts\u002Fconvert.py","SCRIPT","脚本",2928,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Fefcore\u002Fscripts\u002Fconvert.py",{"path":111,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":112,"sourceHtmlUrl":113},"scripts\u002Fdoccheck.py",29463,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Fefcore\u002Fscripts\u002Fdoccheck.py",{"path":115,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":116,"sourceHtmlUrl":117},"scripts\u002Fstackcheck.py",12200,"https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-stack\u002Fskills\u002Fefcore\u002Fscripts\u002Fstackcheck.py",[119,126,133,140,147,154],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":18},"01M7EA9S53810TTZTXYDGBWXHY","web-accessibility","Web accessibility to WCAG 2.2 AA - a checklist for the design, the tool checks (axe-core, the Tab walk, reduced motion), and the manual checks that no tool does (screen reader, zoom, status messages) - with the EAA and EN 301 549 status. Use when a design, mockup, or built feature must be checked for accessibility, when a review must cover keyboard and screen reader use, when the user asks about focus, a focus trap, contrast, or a screen reader on a page, or when the user asks which accessibility rules apply.","https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fux-design\u002Fskills\u002Fweb-accessibility\u002FSKILL.md",[],[],{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":18},"01M7EA9MGJ7ESKQ7WE2Z96858T","ux-states","State inventory for each screen - default, empty, loading, partial, error, success, disabled, overflow, offline, and the business states (no permission, stale data, locked by another user, waiting on an external system, bulk result with failures, read only) - with what the user sees, can do, and how the user recovers. Use when a screen or flow needs its states designed or checked, or when a design shows only the happy path.","https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fux-design\u002Fskills\u002Fux-states\u002FSKILL.md",[],[],{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":18},"01M7EA9FHYR0C26BHNQF7AZT4Q","ux-setup","Set up a project for UX work - finds the design tools, the design-system source, the brand files, the languages, and the run command, asks the human one round of questions, and writes the \"## Design\" section of .claude\u002Frules\u002Fdelivery.md that the ux-design commands and the ux-designer agent read. Moves an older \"## Design\" section out of CLAUDE.md. Use when \u002Fsetup, \u002Fux-design, or \u002Fux-review needs the design facts, when the ux-designer agent returns NEEDS_HUMAN because the \"## Design\" section is missing, or when the user wants to set up or change the design tools of a project.","https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fux-design\u002Fskills\u002Fux-setup\u002FSKILL.md",[],[],{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":18},"01M7EA99DQDFVJQBJNYDJQC643","ux-review","UX review of a built feature against its approved design - Playwright walks each flow and state at 390, 820, and 1440 px, axe-core and the tell checks run on each state, and each heuristic gets a verdict - with findings by owner, severity, and origin, and a verdict in ux-review.md in the work folder of the item. Use when a built feature or screen must be checked against its design, mockups, or prototype, in each state or at each screen size, when built screens need findings by severity, when the build of an item with a UX design is done, or when existing screens need a UX audit.","https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fux-design\u002Fskills\u002Fux-review\u002FSKILL.md",[],[],{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":18},"01M7EA95YPJQQ1YDW5HS0RVAN2","ux-prototype","Clickable prototype of a designed story in the proto-shell standard, with variants for an A\u002FB test, all states in scope, three sizes, and a test plan with tasks. Use when a design or mockups exist and the team must test the flow or compare variants with users before the build.","https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fux-design\u002Fskills\u002Fux-prototype\u002FSKILL.md",[],[],{"skillNo":155,"name":156,"nameZh":6,"description":157,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":158,"categories":159,"keywords":160,"publishedAt":18},"01M7EA91SKA2RNFGW9VDG9JFW7","ux-practice","The method of the ux-designer agent for the UX design of a story, a feature, or a screen - Double Diamond phases, a design spec with a source for each decision, the UX decision log, evidence tags, severity, and the modes light, full, and new-direction. Preloaded by the ux-designer agent. Use when the ux-designer agent or another UX skill names this method. For the design of an item, a person starts ux-design:ux-design.","https:\u002F\u002Fgithub.com\u002FCharmedme\u002Fmaikelsoft-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fux-design\u002Fskills\u002Fux-practice\u002FSKILL.md",[],[]]