[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74EX8CTVZ8CGFDKESMA000S":3,"skill-same:01M74EX8CTVZ8CGFDKESMA000S":63},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":13,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M74EX8CTVZ8CGFDKESMA000S","csharp-refactoring",null,"Safely refactors C#\u002F.NET code without changing behavior: rename, move, extract, inline, merge, consolidate, deduplicate, split, or modernize, including partial or generated declarations, public APIs, serialization and reflection names, friend assemblies, conditional compilation, and multi-targeted projects. Use when a request asks for a refactor, or calls a feature, bug fix, upgrade, or public nullability change a refactor and the behavior-changing part must be separated or declined. Not for ordinary feature or bug fixes, standalone framework or package upgrades, adding tests, or formatting-only work.","Cratis\u002FArchitecture","Cratis","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F16456213?v=4","01M6BXRH290K4C8RS4PTKK3HXQ","01M74ET2PT8TQK44HAHJBABW28",0,"MIT","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fcsharp-refactoring\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fcsharp-refactoring\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: csharp-refactoring\ndescription: 'Safely refactors C#\u002F.NET code without changing behavior: rename, move, extract, inline, merge, consolidate, deduplicate, split, or modernize, including partial or generated declarations, public APIs, serialization and reflection names, friend assemblies, conditional compilation, and multi-targeted projects. Use when a request asks for a refactor, or calls a feature, bug fix, upgrade, or public nullability change a refactor and the behavior-changing part must be separated or declined. Not for ordinary feature or bug fixes, standalone framework or package upgrades, adding tests, or formatting-only work.'\nlicense: MIT\n---\n\u003C!-- cratis-ai-managed: skills\u002Fcsharp-refactoring\u002FSKILL.md -->\n\n\u003C!-- Modified by Cratis from dotnet's original (MIT): frontmatter, applicability, navigation and the changes listed in NOTICE. Upstream: https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fskills (plugins\u002Fdotnet\u002Fskills\u002Fcsharp-refactoring\u002FSKILL.md; see NOTICE) -->\n\n# C# Refactoring (behavior-preserving)\n\nCratis rules in `.cratis\u002Fai\u002Frules\u002F` (including `csharp.md`, `specs.csharp.md`, and `orleans.md`) and the `cratis-*` skills win where they differ.\n\nA refactor changes **structure**, never observable **behavior**. Do the edit with binding-aware tools,\nthen confirm behavior held with a build + the relevant tests. Keep the effort proportional to the change:\na one-line local rename does not need the ceremony a public multi-targeted change does.\n\n## Mandatory gate: classify before validation or editing\n\nRead only enough repository context to classify **each requested operation**. Do this before restoring,\nbuilding, or making an edit. Classification precedence is:\n\n- If the request explicitly asks for at least one separable behavior-preserving operation, complete\n  that structural work and defer only the behavior-changing or contract-changing operations. Do not\n  invent or infer structural work to avoid the stop response.\n- If the structural and behavior-changing parts cannot be separated, use the whole-request stop\n  response and state why they are inseparable.\n- Otherwise, use the whole-request stop response only when **every** requested operation is outside\n  behavior-preserving refactoring.\n\nFor a whole request that is outside behavior-preserving refactoring:\n\n1. State: `Not a behavior-preserving refactor: \u003Cspecific reason>.`\n2. State: `No files changed.`\n3. State: `Next workflow: \u003Cworkflow>.` Then stop. Do not add manual implementation steps, alternatives,\n   an offer to proceed without the workflow, or a follow-up question — even when that workflow is unavailable.\n\n| Requested as a \"refactor\" | Classification and action |\n|---|---|\n| Framework or NuGet version change | **Upgrade.** Do not edit or validate the upgrade here; hand off to the repository's upgrade workflow. |\n| New capability, flag, endpoint, tier, or behavior | **Feature.** Do not implement it here; hand off to the repository's feature workflow. |\n| Threshold, rate, output, or bug-result change | **Behavior change.** Defer it and hand off to the repository's bug-fix or behavior-change workflow; still complete any clearly separable structural operation. |\n| Tighten or loosen a shipped\u002Fpublic nullable annotation | **Source-contract change.** Leave the declaration and API record unchanged; hand off to the repository's API-contract workflow. |\n\nFor a mixed request, never stop after classification. Perform the separable structural operation,\nexplicitly defer the behavior\u002Fcontract change, and never state `No files changed.` after completing\nstructural work. Never modify tests to make an unauthorized behavior change appear preserved.\n\n## Work only in the current workspace\n\nUse the current agent workspace as the boundary. If it is a Git checkout, resolve its repository root\n(`git rev-parse --show-toplevel`) and stay inside it. If Git metadata is absent, treat the current working\ndirectory and its subdirectories as the boundary, and use a solution or project named in the request\ninside it; Git is not a prerequisite for a refactor. Resolve prompt-provided relative paths inside that\nboundary.\n\nSearch and edit only that workspace. Never use filesystem-wide search or select a similarly named clone,\nanother worktree, build output, or unrelated temporary directory because a file also exists there. If a\nnamed path is absent, stop and report the mismatch instead of guessing another workspace. If a tool rejects\nan in-workspace path for a mechanical reason such as path form or unsupported tool root, retry through\nanother in-workspace mechanism. If the rejection is a permission or policy denial, report it instead of\nworking around it. Never search outside the boundary.\n\n## Rename \u002F move by bindings, not text\n\nThe #1 way a \"rename\" silently corrupts code is editing textual matches (comments, strings, unrelated\noverloads) instead of real **bindings**. Find every binding reference first, then edit semantically. Use\nthe strongest tool available: an IDE\u002FRoslyn workspace refactoring, then the C# LSP the\n[`dotnet` plugin declares](https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet\u002Flsp.json)\n(`findReferences`, `goToDefinition`, `incomingCalls`, `rename` code action), then analyzer code-fixes \u002F\nRoslynator, then compiler-validated edits (edit the true bindings, rebuild, let the compiler flag misses).\nPlain find\u002Freplace only when scope is provably tiny and every hit is verified. Include **every** `partial`\ndeclaration, and edit the generator input, never generated (`*.g.cs`) output.\n\nFor the operation → Roslyn-provider mapping and representative PRs, see\n[references\u002Foperation-catalog.md](references\u002Foperation-catalog.md).\n\n## Consolidate toward the existing source of truth\n\nWhen de-duplicating, preserve the ownership direction stated by the code or request. If `B` duplicates\nan implementation already owned by `A`, keep `A` canonical and make `B` delegate to it; do not invert\nthe dependency merely because either direction compiles. Preserve public compatibility wrappers when\nthe duplicate surface is shipped, and migrate only in-repo callers that are safe to move.\n\n## Decisions that change the edit\n\nUse the first matching row instead of applying the requested operation mechanically:\n\n| Situation | Do | Never |\n|---|---|---|\n| Inline an internal, unshipped pass-through wrapper | Migrate every binding reference to the target, remove the wrapper, then compile to catch misses. | Keep dead indirection \"for compatibility\" when no compatibility boundary exists. |\n| Inline or remove a shipped\u002Fpublic wrapper | Migrate ordinary in-repo callers, but retain an `[Obsolete]` forwarding entry point unless the request explicitly authorizes a breaking change. | Delete a shipped API merely because all current source callers were migrated. |\n| Rename a member reached by a string, reflection, DI, or configuration | Rename binding-based callers; preserve the observed external name with a forwarding shim or metadata, and exercise the old-name path. | Rewrite an external\u002Fconfigured name just to make the new source name consistent. |\n| Extract duplicated logic whose callers pass different values | Extract the algorithm and pass each caller's existing inputs through unchanged. | Collapse distinct inputs, evaluation order, rounding, or side effects into one caller's version. |\n| Rename code compiled under `#if` or multiple TFMs | Update every source branch and validate each target framework explicitly. | Treat a green default-target build as evidence for unbuilt branches. |\n| Merge near-identical types | Parameterize only the values that differ, migrate every construction site, and preserve each old value exactly. If the old types are internal\u002Funshipped and the request says to merge into one type, delete their declarations. | Retain unnecessary aliases, static holders, factories, or wrapper types that leave the requested merge incomplete; introduce a new hierarchy or behavior. |\n\n## Preserve contracts beyond C# call sites\n\nCompilation proves binding compatibility, not every external contract. Before renaming or moving a\ntype\u002Fmember, check whether its name or metadata is observed by serialization, reflection, dependency\ninjection, configuration binding, source generators, P\u002FInvoke, or `dynamic`.\n\n| Boundary | Required decision |\n|---|---|\n| Serialized\u002Fconfiguration name | Preserve the external name with the repository's existing mechanism (for example, `JsonPropertyName`) while migrating C# callers; run a focused round-trip or payload test. |\n| Public nullable annotation | The mandatory classification gate applies: leave it unchanged and hand off as a source-contract change. |\n| Uncovered reflection or runtime lookup | Do not guess that a compile-clean rename is safe. Preserve the observed name or stop and report the unverified runtime boundary. |\n\n## Verify proportionally\n\nConfirm behavior is preserved after the edit — scaled to blast radius, not a fixed ceremony:\n\n- **Local \u002F private** (method-local or `private` member, one file, single target framework, no public\n  surface, no `partial`\u002Fgenerated\u002F`#if`): skip a separate baseline unless the tree is already suspect.\n  Make the edit, then run the narrowest build and relevant tests once. Let the compiler catch missed\n  references.\n- **Cross-boundary** (public\u002Fshipped symbol, multi-targeted project, `#if`\u002Fplatform branches, or\n  `partial`\u002Fgenerated code): establish a baseline, then run an explicit build and the relevant tests for\n  **each** target framework after the edit (a test command's implicit build is not separate build evidence;\n  a green default build can hide a break on another TFM), and run the hazards check below.\n\nUse the repo's own build\u002Ftest workflow when it documents one (`README`\u002F`CONTRIBUTING`, `build.*`, `eng\u002F`,\n`global.json`, `.github\u002Fworkflows`); its instructions win over any generic command.\n\n### Typical workflow (one operation)\n1. Choose one named refactoring operation and keep the step focused on that operation only.\n2. Find true binding references (`findReferences`\u002F`goToDefinition`\u002Frename) and include all `partial` declarations.\n3. Establish a baseline first only for a cross-boundary change or a tree not already known green.\n4. Apply the change via the most semantics-aware tool available; avoid blind find\u002Freplace when possible.\n5. Rebuild and run the relevant tests. If the gate goes red, report the failure and repair or reassess only\n  your edit; never discard unrelated worktree changes.\n\nOtherwise:\n```bash\ndotnet build   # 0 errors\ndotnet test    # stays green; same pass count as before\n```\n\nOne operation per step; never mix a refactor and a behavior change in the same step. On red, stop and report the failure; repair only your edit without discarding unrelated worktree changes.\n\n## Final response contract\n\nKeep the handoff concise and evidence-based:\n\n- **Refactor:** name the structural operation and the symbols\u002Ffiles changed.\n- **Preserved:** name the behavior or compatibility boundary and the mechanism that preserved it.\n- **Validation:** report the exact commands and observed result; never claim success after a failed restore,\n  build, target framework, or test run.\n- **Deferred:** for a mixed request, name the behavior\u002Fcontract change intentionally left undone and its\n  correct next workflow. Omit this line when nothing was deferred.\n\n## Cross-boundary hazards (only when it touches a boundary)\n\nIf — and only if — the change touches a **public** symbol, a **multi-targeted** project, or\n`partial`\u002Fgenerated code, some breaks won't show up as a failing test. Search the repo for the surface\nthat governs the symbol (don't assume): the public-API gate (`PublicAPI.Shipped\u002FUnshipped.txt` for\nPublicApiAnalyzers, and\u002For `ApiCompat`\u002F`\u003CEnablePackageValidation>` — not interchangeable),\n`\u003CTargetFrameworks>`\u002F`#if` branches, and `InternalsVisibleTo`. Moving a public type to another assembly\nneeds `[TypeForwardedTo]` in the original assembly; a move within one assembly does not. A public\n*rename* needs an `[Obsolete]` shim, not a forwarder. For a provably local\u002Fprivate change, skip these\nchecks.\n\n## Stop an in-scope refactor when\n\n- The baseline is already red (you can't prove you preserved behavior).\n- The requested structural change would alter a public\u002Fshipped API and no compatibility shim or forwarder\n  can preserve it. Report the boundary. Use the gate's handoff format when no structural work was completed;\n  after separable work, put the incompatible operation on the `Deferred:` line instead. Do not ask to make\n  the breaking change.\n- Equivalence depends on runtime behavior tests don't cover (reflection, DI, serialization, `dynamic`,\n  P\u002FInvoke) — report the unverified boundary instead of claiming behavior was preserved.\n\n## Contracts the compiler cannot see in Cratis code\n\nPreserve `[EventType]` identifiers and type names of persisted events, generated TypeScript proxies of Arc commands\u002Fqueries, `[Alias]`\u002Fserializer ids in Orleans, and public API of framework packages (semver).\n","\u003C!-- cratis-ai-managed: skills\u002Fcsharp-refactoring\u002FSKILL.md -->\n\n\u003C!-- Modified by Cratis from dotnet's original (MIT): frontmatter, applicability, navigation and the changes listed in NOTICE. Upstream: https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fskills (plugins\u002Fdotnet\u002Fskills\u002Fcsharp-refactoring\u002FSKILL.md; see NOTICE) -->\n\n# C# Refactoring (behavior-preserving)\n\nCratis rules in `.cratis\u002Fai\u002Frules\u002F` (including `csharp.md`, `specs.csharp.md`, and `orleans.md`) and the `cratis-*` skills win where they differ.\n\nA refactor changes **structure**, never observable **behavior**. Do the edit with binding-aware tools,\nthen confirm behavior held with a build + the relevant tests. Keep the effort proportional to the change:\na one-line local rename does not need the ceremony a public multi-targeted change does.\n\n## Mandatory gate: classify before validation or editing\n\nRead only enough repository context to classify **each requested operation**. Do this before restoring,\nbuilding, or making an edit. Classification precedence is:\n\n- If the request explicitly asks for at least one separable behavior-preserving operation, complete\n  that structural work and defer only the behavior-changing or contract-changing operations. Do not\n  invent or infer structural work to avoid the stop response.\n- If the structural and behavior-changing parts cannot be separated, use the whole-request stop\n  response and state why they are inseparable.\n- Otherwise, use the whole-request stop response only when **every** requested operation is outside\n  behavior-preserving refactoring.\n\nFor a whole request that is outside behavior-preserving refactoring:\n\n1. State: `Not a behavior-preserving refactor: \u003Cspecific reason>.`\n2. State: `No files changed.`\n3. State: `Next workflow: \u003Cworkflow>.` Then stop. Do not add manual implementation steps, alternatives,\n   an offer to proceed without the workflow, or a follow-up question — even when that workflow is unavailable.\n\n| Requested as a \"refactor\" | Classification and action |\n|---|---|\n| Framework or NuGet version change | **Upgrade.** Do not edit or validate the upgrade here; hand off to the repository's upgrade workflow. |\n| New capability, flag, endpoint, tier, or behavior | **Feature.** Do not implement it here; hand off to the repository's feature workflow. |\n| Threshold, rate, output, or bug-result change | **Behavior change.** Defer it and hand off to the repository's bug-fix or behavior-change workflow; still complete any clearly separable structural operation. |\n| Tighten or loosen a shipped\u002Fpublic nullable annotation | **Source-contract change.** Leave the declaration and API record unchanged; hand off to the repository's API-contract workflow. |\n\nFor a mixed request, never stop after classification. Perform the separable structural operation,\nexplicitly defer the behavior\u002Fcontract change, and never state `No files changed.` after completing\nstructural work. Never modify tests to make an unauthorized behavior change appear preserved.\n\n## Work only in the current workspace\n\nUse the current agent workspace as the boundary. If it is a Git checkout, resolve its repository root\n(`git rev-parse --show-toplevel`) and stay inside it. If Git metadata is absent, treat the current working\ndirectory and its subdirectories as the boundary, and use a solution or project named in the request\ninside it; Git is not a prerequisite for a refactor. Resolve prompt-provided relative paths inside that\nboundary.\n\nSearch and edit only that workspace. Never use filesystem-wide search or select a similarly named clone,\nanother worktree, build output, or unrelated temporary directory because a file also exists there. If a\nnamed path is absent, stop and report the mismatch instead of guessing another workspace. If a tool rejects\nan in-workspace path for a mechanical reason such as path form or unsupported tool root, retry through\nanother in-workspace mechanism. If the rejection is a permission or policy denial, report it instead of\nworking around it. Never search outside the boundary.\n\n## Rename \u002F move by bindings, not text\n\nThe #1 way a \"rename\" silently corrupts code is editing textual matches (comments, strings, unrelated\noverloads) instead of real **bindings**. Find every binding reference first, then edit semantically. Use\nthe strongest tool available: an IDE\u002FRoslyn workspace refactoring, then the C# LSP the\n[`dotnet` plugin declares](https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet\u002Flsp.json)\n(`findReferences`, `goToDefinition`, `incomingCalls`, `rename` code action), then analyzer code-fixes \u002F\nRoslynator, then compiler-validated edits (edit the true bindings, rebuild, let the compiler flag misses).\nPlain find\u002Freplace only when scope is provably tiny and every hit is verified. Include **every** `partial`\ndeclaration, and edit the generator input, never generated (`*.g.cs`) output.\n\nFor the operation → Roslyn-provider mapping and representative PRs, see\n[references\u002Foperation-catalog.md](references\u002Foperation-catalog.md).\n\n## Consolidate toward the existing source of truth\n\nWhen de-duplicating, preserve the ownership direction stated by the code or request. If `B` duplicates\nan implementation already owned by `A`, keep `A` canonical and make `B` delegate to it; do not invert\nthe dependency merely because either direction compiles. Preserve public compatibility wrappers when\nthe duplicate surface is shipped, and migrate only in-repo callers that are safe to move.\n\n## Decisions that change the edit\n\nUse the first matching row instead of applying the requested operation mechanically:\n\n| Situation | Do | Never |\n|---|---|---|\n| Inline an internal, unshipped pass-through wrapper | Migrate every binding reference to the target, remove the wrapper, then compile to catch misses. | Keep dead indirection \"for compatibility\" when no compatibility boundary exists. |\n| Inline or remove a shipped\u002Fpublic wrapper | Migrate ordinary in-repo callers, but retain an `[Obsolete]` forwarding entry point unless the request explicitly authorizes a breaking change. | Delete a shipped API merely because all current source callers were migrated. |\n| Rename a member reached by a string, reflection, DI, or configuration | Rename binding-based callers; preserve the observed external name with a forwarding shim or metadata, and exercise the old-name path. | Rewrite an external\u002Fconfigured name just to make the new source name consistent. |\n| Extract duplicated logic whose callers pass different values | Extract the algorithm and pass each caller's existing inputs through unchanged. | Collapse distinct inputs, evaluation order, rounding, or side effects into one caller's version. |\n| Rename code compiled under `#if` or multiple TFMs | Update every source branch and validate each target framework explicitly. | Treat a green default-target build as evidence for unbuilt branches. |\n| Merge near-identical types | Parameterize only the values that differ, migrate every construction site, and preserve each old value exactly. If the old types are internal\u002Funshipped and the request says to merge into one type, delete their declarations. | Retain unnecessary aliases, static holders, factories, or wrapper types that leave the requested merge incomplete; introduce a new hierarchy or behavior. |\n\n## Preserve contracts beyond C# call sites\n\nCompilation proves binding compatibility, not every external contract. Before renaming or moving a\ntype\u002Fmember, check whether its name or metadata is observed by serialization, reflection, dependency\ninjection, configuration binding, source generators, P\u002FInvoke, or `dynamic`.\n\n| Boundary | Required decision |\n|---|---|\n| Serialized\u002Fconfiguration name | Preserve the external name with the repository's existing mechanism (for example, `JsonPropertyName`) while migrating C# callers; run a focused round-trip or payload test. |\n| Public nullable annotation | The mandatory classification gate applies: leave it unchanged and hand off as a source-contract change. |\n| Uncovered reflection or runtime lookup | Do not guess that a compile-clean rename is safe. Preserve the observed name or stop and report the unverified runtime boundary. |\n\n## Verify proportionally\n\nConfirm behavior is preserved after the edit — scaled to blast radius, not a fixed ceremony:\n\n- **Local \u002F private** (method-local or `private` member, one file, single target framework, no public\n  surface, no `partial`\u002Fgenerated\u002F`#if`): skip a separate baseline unless the tree is already suspect.\n  Make the edit, then run the narrowest build and relevant tests once. Let the compiler catch missed\n  references.\n- **Cross-boundary** (public\u002Fshipped symbol, multi-targeted project, `#if`\u002Fplatform branches, or\n  `partial`\u002Fgenerated code): establish a baseline, then run an explicit build and the relevant tests for\n  **each** target framework after the edit (a test command's implicit build is not separate build evidence;\n  a green default build can hide a break on another TFM), and run the hazards check below.\n\nUse the repo's own build\u002Ftest workflow when it documents one (`README`\u002F`CONTRIBUTING`, `build.*`, `eng\u002F`,\n`global.json`, `.github\u002Fworkflows`); its instructions win over any generic command.\n\n### Typical workflow (one operation)\n1. Choose one named refactoring operation and keep the step focused on that operation only.\n2. Find true binding references (`findReferences`\u002F`goToDefinition`\u002Frename) and include all `partial` declarations.\n3. Establish a baseline first only for a cross-boundary change or a tree not already known green.\n4. Apply the change via the most semantics-aware tool available; avoid blind find\u002Freplace when possible.\n5. Rebuild and run the relevant tests. If the gate goes red, report the failure and repair or reassess only\n  your edit; never discard unrelated worktree changes.\n\nOtherwise:\n```bash\ndotnet build   # 0 errors\ndotnet test    # stays green; same pass count as before\n```\n\nOne operation per step; never mix a refactor and a behavior change in the same step. On red, stop and report the failure; repair only your edit without discarding unrelated worktree changes.\n\n## Final response contract\n\nKeep the handoff concise and evidence-based:\n\n- **Refactor:** name the structural operation and the symbols\u002Ffiles changed.\n- **Preserved:** name the behavior or compatibility boundary and the mechanism that preserved it.\n- **Validation:** report the exact commands and observed result; never claim success after a failed restore,\n  build, target framework, or test run.\n- **Deferred:** for a mixed request, name the behavior\u002Fcontract change intentionally left undone and its\n  correct next workflow. Omit this line when nothing was deferred.\n\n## Cross-boundary hazards (only when it touches a boundary)\n\nIf — and only if — the change touches a **public** symbol, a **multi-targeted** project, or\n`partial`\u002Fgenerated code, some breaks won't show up as a failing test. Search the repo for the surface\nthat governs the symbol (don't assume): the public-API gate (`PublicAPI.Shipped\u002FUnshipped.txt` for\nPublicApiAnalyzers, and\u002For `ApiCompat`\u002F`\u003CEnablePackageValidation>` — not interchangeable),\n`\u003CTargetFrameworks>`\u002F`#if` branches, and `InternalsVisibleTo`. Moving a public type to another assembly\nneeds `[TypeForwardedTo]` in the original assembly; a move within one assembly does not. A public\n*rename* needs an `[Obsolete]` shim, not a forwarder. For a provably local\u002Fprivate change, skip these\nchecks.\n\n## Stop an in-scope refactor when\n\n- The baseline is already red (you can't prove you preserved behavior).\n- The requested structural change would alter a public\u002Fshipped API and no compatibility shim or forwarder\n  can preserve it. Report the boundary. Use the gate's handoff format when no structural work was completed;\n  after separable work, put the incompatible operation on the `Deferred:` line instead. Do not ask to make\n  the breaking change.\n- Equivalence depends on runtime behavior tests don't cover (reflection, DI, serialization, `dynamic`,\n  P\u002FInvoke) — report the unverified boundary instead of claiming behavior was preserved.\n\n## Contracts the compiler cannot see in Cratis code\n\nPreserve `[EventType]` identifiers and type names of persisted events, generated TypeScript proxies of Arc commands\u002Fqueries, `[Alias]`\u002Fserializer ids in Orleans, and public API of framework packages (semver).\n",{"name":5,"license":14,"description":7},"main","68f67ef8a166617b7a614aae2545f77d3c7d5ab8",".cratis\u002Fai\u002Fskills\u002Fcsharp-refactoring","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture","https:\u002F\u002Fwww.cratis.io\u002Farchitecture\u002F","https:\u002F\u002Fgithub.com\u002FCratis","https:\u002F\u002Fwww.cratis.io","Open-source (MIT) event sourcing and CQRS for .NET and beyond: Chronicle, Arc, Components and Screenplay.","2026-11-14 06:37:25",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add Cratis\u002FArchitecture --skill csharp-refactoring",{"tool":39,"command":40},"bunx","bunx skills add Cratis\u002FArchitecture --skill csharp-refactoring",{"tool":42,"command":43},"pnpm","pnpm dlx skills add Cratis\u002FArchitecture --skill csharp-refactoring","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fcsharp-refactoring\u002FSKILL.md",true,[47,51,57],{"path":48,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":15},"LICENSE","许可证",1171,{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"NOTICE","OTHER","其他",1159,"https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fcsharp-refactoring\u002FNOTICE",{"path":58,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Foperation-catalog.md","REFERENCE","参考文档",2943,"https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fcsharp-refactoring\u002Freferences\u002Foperation-catalog.md",[64,72,80,88,96,104],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":68,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M74EZHX4AJ09G25KF026Q7P5","vectorization","Designs, implements, optimizes, and reviews SIMD code in .NET: vectorizing scalar loops with TensorPrimitives, Vector64, Vector128, Vector256, Vector512, or hardware intrinsics, and reviewing existing SIMD code, including the generic Vector type, for contract equivalence, tail handling, memory safety, portability, fallbacks, and measured performance. Use when a .NET loop or SIMD routine is being written or reviewed. Not for performance work unrelated to SIMD.","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fvectorization\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fvectorization\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":76,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M74EZD5Y0JQAJATM11TTSZRA","target-authoring","Canonical patterns for writing custom MSBuild targets: DependsOnTargets versus BeforeTargets and AfterTargets, the Build-to-CoreBuild three-level pattern, and the XxxDependsOn chain-extension pattern. Use when diagnosing or fixing custom-target anti-patterns: Directory.Build.targets redefining SDK targets, targets that replace CompileDependsOn instead of extending it, Outputs versus Returns misuse that returns stale results, missing Inputs\u002FOutputs causing needless rebuilds, or missing FileWrites registration. Not for incremental build tuning or general anti-pattern review (use the msbuild skill), or non-MSBuild build systems.","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Ftarget-authoring\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Ftarget-authoring\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":84,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M74EZ8ZSW7M8ZR2WBDED4YNA","run-tests","Chooses and runs the repository-compatible .NET test command: classic, VSTest, bridged MTP, or native MTP syntax for MSTest, xUnit, NUnit, and TUnit. Use before running .NET tests or answering with a test command or flags: run the tests, one test, class, category, trait or target framework, combined filters, --filter-query, --no-build, --diag, TRX, coverage collection, crash or hang dumps, filter errors, or unrecognized options. Not for platform identification alone (use platform-detection), writing or debugging test code, interpreting a coverage report (use coverage-analysis), CI investigation, migration, or a persistent hot-reload loop.","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Frun-tests\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Frun-tests\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":92,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M74EZ4Q0W4B632KY77V6K5EP","profiling","Uses the free official .NET diagnostics CLI tools for profiling and runtime investigation in a repository: CPU, GC pressure, allocation growth, exception storms, lock contention, and slow code. Use when a .NET application needs performance or runtime profiling. Not for replacing realistic performance or load tests with ad-hoc tracing, production heap collection without a pause-risk plan, crash dumps (use dump-collect), or benchmark design (use microbenchmarking).","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fprofiling\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fprofiling\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":100,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M74EZ08N8PGKKZY6Z1DRR5YS","platform-detection","Identifies a .NET project's test platform, framework, command mode, and SDK-style versus classic project system, resolving global.json, project, packages.config, Directory.Build.props, and Directory.Packages.props precedence for MSTest, xUnit, NUnit, and TUnit. Use when asking \"which test platform or framework?\", \"VSTest or MTP?\", or \"what runner does this project use?\", including bridge settings, UseVSTest opt-outs, and conflicting VSTest\u002FMTP configuration. Not for running or filtering tests, commands, flags, TRX, dumps, or test-command errors (use run-tests), or for hot-reload or migration requests.","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fplatform-detection\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fplatform-detection\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":108,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M74EYW35N2Y22QQXANX9TQ1V","orleans","Designs Microsoft Orleans systems from each primitive's purpose and failure model: grains, digital twins, state versus databases, transactions, messaging, streams, timers, reminders, Durable Jobs, stateless workers, grain services, startup, and hosting. Use when a task needs an Orleans design decision: inspect version and topology, choose the primitive, implement, and validate. Not for other actor stacks, batch processing, relational-only CRUD, or advice without an Orleans decision.","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Forleans\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Forleans\u002FSKILL.md",[],[]]