[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DZRB7D3BCZFD8ZJB71GXTH":3,"skill-same:01M6DZRB7D3BCZFD8ZJB71GXTH":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":45,"linkOnly":46,"markdownContent":47,"markdownBody":48,"frontMatter":49,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":55,"ownerHtmlUrl":56,"ownerBlogUrl":57,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M6DZRB7D3BCZFD8ZJB71GXTH","csharp-refactoring",null,"Safely refactors C#\u002F.NET code without changing behavior. USE FOR any request to refactor, rename, move, extract, inline, merge, consolidate, deduplicate, split, or modernize C# code, even a small extract, inline, or rename, or merging near-identical types; green builds miss drift in #if branches, generated partials, and reflection\u002Fconfig names. When a changed member is visible outside the assembly (PublicAPI.*.txt, InternalsVisibleTo, shipped package), also invoke dotnet-breaking-changes; local\u002Fprivate renames do not need it. Also use when a request calls a feature, bug fix, package\u002Fframework upgrade, or public nullability change a refactor and the behavior-changing part must be separated or declined. DO NOT USE FOR ordinary feature or bug fixes not presented as refactoring; standalone upgrades after reclassification (use dotnet-upgrade); adding tests; or formatting-only work.","managedcode\u002Fdotnet-skills","managedcode","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F78253589?v=4","01M6DYDJR3EG8KB5G4PC65XCTT","Managed Code","01M6DYDJX0ZT432N04NYJW89DN",511,"MIT","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Fdotnet-skills\u002Fplugins\u002Fdotnet\u002Fskills\u002Fcsharp-refactoring\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000007","代码审查","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"csharp refactoring","csharp","refactoring","when","drift","invoke","branches","local","move","green","types","standalone","near","work","consolidate","code","dotnet","upgrade","generated","only","fix","2026-11-10 10:12:30",false,"---\nname: csharp-refactoring\ndescription: \"Safely refactors C#\u002F.NET code without changing behavior. USE FOR any request to refactor, rename, move, extract, inline, merge, consolidate, deduplicate, split, or modernize C# code, even a small extract, inline, or rename, or merging near-identical types; green builds miss drift in #if branches, generated partials, and reflection\u002Fconfig names. When a changed member is visible outside the assembly (PublicAPI.*.txt, InternalsVisibleTo, shipped package), also invoke dotnet-breaking-changes; local\u002Fprivate renames do not need it. Also use when a request calls a feature, bug fix, package\u002Fframework upgrade, or public nullability change a refactor and the behavior-changing part must be separated or declined. DO NOT USE FOR ordinary feature or bug fixes not presented as refactoring; standalone upgrades after reclassification (use dotnet-upgrade); adding tests; or formatting-only work.\"\nlicense: MIT\n---\n\n# C# Refactoring (behavior-preserving)\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 `dotnet-upgrade`. |\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 `dotnet-breaking-changes` skill. |\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, an **internal** symbol exposed to a friend\nassembly through `InternalsVisibleTo`, a **multi-targeted** project, or `partial`\u002Fgenerated code, some\nbreaks won't show up as a failing test. Before invoking `dotnet-breaking-changes`, apply its scope\nexclusions: skip it for local\u002Fprivate renames and for public-member renames in an executable whose\ncallers all live in that project. Otherwise invoke it before editing; it owns the compatibility\ndecisions, while this skill owns the structural steps. 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","# C# Refactoring (behavior-preserving)\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 `dotnet-upgrade`. |\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 `dotnet-breaking-changes` skill. |\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, an **internal** symbol exposed to a friend\nassembly through `InternalsVisibleTo`, a **multi-targeted** project, or `partial`\u002Fgenerated code, some\nbreaks won't show up as a failing test. Before invoking `dotnet-breaking-changes`, apply its scope\nexclusions: skip it for local\u002Fprivate renames and for public-member renames in an executable whose\ncallers all live in that project. Otherwise invoke it before editing; it owns the compatibility\ndecisions, while this skill owns the structural steps. 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",{"name":5,"license":15,"description":7},"main","6757c043b0250364c729a5799755c27397348bdc","external-sources\u002Fupstreams\u002Fdotnet-skills\u002Fplugins\u002Fdotnet\u002Fskills\u002Fcsharp-refactoring",41,"https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills","https:\u002F\u002Fskills.managed-code.com","https:\u002F\u002Fgithub.com\u002Fmanagedcode","https:\u002F\u002Fwww.managed-code.com","Open Source Community for .NET Developers: Reliable, Actively Maintained, and Community-Driven. Made in Ukraine 🇺🇦 with ❤️","2026-11-10 19:58:06",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add managedcode\u002Fdotnet-skills --skill csharp-refactoring",{"tool":66,"command":67},"bunx","bunx skills add managedcode\u002Fdotnet-skills --skill csharp-refactoring",{"tool":69,"command":70},"pnpm","pnpm dlx skills add managedcode\u002Fdotnet-skills --skill csharp-refactoring","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Fdotnet-skills\u002Fplugins\u002Fdotnet\u002Fskills\u002Fcsharp-refactoring\u002FSKILL.md",true,[74],{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Foperation-catalog.md","REFERENCE","参考文档",2875,"https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Fdotnet-skills\u002Fplugins\u002Fdotnet\u002Fskills\u002Fcsharp-refactoring\u002Freferences\u002Foperation-catalog.md",[81,115,140,171,181,207],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":95,"publishedAt":45},"01M6DYQE1Y9FHAQHEDTVFQ3447","xtwitter-scraper","Use XTwitterScraper when a .NET application needs typed access to Xquik's X automation REST API for tweet search, user lookup, posting workflows, extraction jobs, monitors, webhooks, or giveaway draws. USE FOR: integrating the XTwitterScraper NuGet package; reviewing Xquik API client usage; modeling API-key configuration, pagination, binary exports, raw responses, retries, and webhook\u002Fevent flows in .NET. DO NOT USE FOR: unrelated stacks; direct browser automation; generic social-media strategy; or code that does not call Xquik. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FLibraries\u002FXTwitterScraper\u002Fskills\u002Fxtwitter-scraper\u002FSKILL.md",[87,90],{"categoryNo":88,"categoryName":89,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":91,"categoryName":92,"taxonomyType":93,"taxonomyTypeDesc":94},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[96,97,98,99,39,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114],"xtwitter scraper","browser automation","workflows","run","browser","search","repository","api","Media","api client","access","edit","unrelated","webhooks","files","social","commands","modeling","webhook",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":127,"publishedAt":45},"01M6DYQ9S4PE1H6G8MCH9T21HR","sep","Use Sep for high-performance separated-value parsing and writing in .NET, including delimiter inference, explicit parser\u002Fwriter options, and low-allocation row\u002Fcolumn workflows. USE FOR: delimited data needs are performance-sensitive and allocation-aware; project needs explicit control over separator inference, escaping, trimming, and header behavior;. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FLibraries\u002FSep\u002Fskills\u002Fsep\u002FSKILL.md",[121,124],{"categoryNo":122,"categoryName":123,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":125,"categoryName":126,"taxonomyType":93,"taxonomyTypeDesc":94},"01JBSEEDCAT000000000000036","内容创作者",[117,128,129,98,130,99,102,131,132,133,107,134,108,110,135,136,137,138,112,139],"writing","performance","tasks","data","parsing","parser","context","do","writer","options","project","high-performance",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":45},"01M6DZS2DNEPXCGGF6SSCW6G5V","webgpu-threejs-tsl","Comprehensive guide for developing WebGPU-enabled Three.js applications using TSL (Three.js Shading Language). Covers WebGPU renderer setup, TSL syntax and node materials, compute shaders, post-processing effects, and WGSL integration. Use this skill when working with Three.js WebGPU, TSL shaders, node materials, or GPU compute in Three.js.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Fwebgpu-claude-skill\u002Fskills\u002Fwebgpu-threejs-tsl\u002FSKILL.md",[],[147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,27],"webgpu","threejs","webgpu threejs tsl","setup","shaders","gpu","integration","applications","js","node","syntax","guide","use","language","three","compute","post","processing","with","renderer","for","materials","wgsl","effects",{"skillNo":172,"name":173,"nameZh":6,"description":174,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":175,"categories":176,"keywords":177,"publishedAt":45},"01M6DZS0BQXW2B56A289XF1X76","roslynk","Use Roslynk for semantic inspection and edits of *.cs, *.razor and *.cshtml solution files.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Froslynk\u002Fskills\u002Froslynk\u002FSKILL.md",[],[173,159,110,178,179,167,180],"semantic","razor","inspection",{"skillNo":182,"name":183,"nameZh":6,"description":184,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":185,"categories":186,"keywords":187,"publishedAt":45},"01M6DZRW6MEJCVW80K3S4XV60K","system-text-json-net11","Imperative guidance for the System.Text.Json APIs added in .NET 11: the built-in `JsonNamingPolicy.PascalCase` naming policy, and the strongly-typed generic `JsonSerializerOptions.GetTypeInfo` and `JsonSerializerOptions.TryGetTypeInfo` metadata accessors (generic overloads that return a typed `JsonTypeInfo`). USE ONLY when the user is targeting net11.0 or later and needs PascalCase JSON property or dictionary-key names without writing a custom naming policy, a strongly-typed generic `JsonTypeInfo` instead of the non-generic `JsonTypeInfo`, or a no-throw way to probe whether a type's serialization metadata is resolved. DO NOT USE when the target is earlier than net11.0, the requested behavior uses an established pre-net11 naming policy, or the user explicitly selected another JSON library.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Fdotnet-skills\u002Fplugins\u002Fdotnet11\u002Fskills\u002Fsystem-text-json-net11\u002FSKILL.md",[],[188,189,190,191,128,192,193,194,195,196,197,159,43,198,199,200,135,201,202,203,204,167,205,206,27],"system","json","text","system text json net11","policy","metadata","library","serialization","behavior","user","probe","guidance","later","type","dictionary","naming","targeting","custom","generic",{"skillNo":208,"name":209,"nameZh":6,"description":210,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":211,"categories":212,"keywords":215,"publishedAt":45},"01M6DZRRJP3S662NFSG1RSPQQ7","process-api-net11","Provides guidance on the new System.Diagnostics.Process APIs introduced in .NET 11: Process.Run, Process.RunAndCaptureText, Process.StartAndForget, Process.ReadAllText\u002FBytes\u002FLines, KillOnParentExit, InheritedHandles, and StartDetached. USE FOR: starting, orchestrating, or capturing output from external processes in applications targeting net11.0 or later. DO NOT USE FOR: applications targeting .NET 10 or earlier, or basic pre-.NET 11 Process.Start usage without new APIs.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Fdotnet-skills\u002Fplugins\u002Fdotnet11\u002Fskills\u002Fprocess-api-net11\u002FSKILL.md",[213,214],{"categoryNo":88,"categoryName":89,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":91,"categoryName":92,"taxonomyType":93,"taxonomyTypeDesc":94},[103,216,217,218,99,219,154,188,159,199,200,135,220,221,222,223,204,167,224],"process","process api net11","diagnostics","start","basic","processes","output","usage","new"]