بنقرة واحدة
namespace-migration
Migrate C# types between namespaces across the solution. Updates usings, refs, and verifies build.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Migrate C# types between namespaces across the solution. Updates usings, refs, and verifies build.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | namespace-migration |
| description | Migrate C# types between namespaces across the solution. Updates usings, refs, and verifies build. |
| when_to_use | migrate namespace, rename namespace, namespace refactor, move types to namespace. |
| argument-hint | <OldNamespace> <NewNamespace> |
You migrate C# types to new namespaces across the entire solution, updating usings and refs and verifying the build.
From $ARGUMENTS or the conversation, extract the namespace mapping.
Expected format: OldNamespace → NewNamespace (one or more pairs).
If the mapping is unclear, ask once:
What's the namespace mapping? Example:
Foo.Core → Foo.Pipeline
Foo.Core.Models → Foo.Pipeline.Models
For each old namespace, find affected files:
rg -l "namespace {OldNamespace}" src/ -g "*.cs" | sort
rg -l "using {OldNamespace}" src/ tests/ -g "*.cs" | wc -l
Also check for InternalsVisibleTo implications:
rg -l "InternalsVisibleTo" src/ -g "*.csproj" -g "*.cs"
Print the impact summary inline and proceed immediately:
## Migration Impact: {OldNamespace} → {NewNamespace}
- Source files with namespace declaration: {N}
- Files with using directives: {M}
- InternalsVisibleTo affected: {Y/N — list if yes}
- Estimated build risk: LOW/MEDIUM/HIGH
Produce a clean build with all namespace references updated and git history preserved.
git mv for any file moves (plain mv loses history; if git mv errors on untracked files, git add first)namespace declarations, using directives, fully-qualified references {OldNamespace}.TypeName, <RootNamespace>/<AssemblyName> in .csproj/.props, and any InternalsVisibleTo stringsConvention: Namespace.Sub.Name maps to src/{Project}/Sub/Name/.
Verify with:
scripts/build.sh
If build errors remain, they are almost always residual using directives or fully-qualified type references. Read the error, find the file, apply the fix. Re-run until clean.
Output the test command — do not run it:
scripts/test.sh --all
Report completion:
## Migration Complete: {OldNamespace} → {NewNamespace}
- Files moved: {N}
- using directives updated: {M}
- Build status: CLEAN
- Test command: {command}
mv — always git mv to preserve historygit mv errors on untracked files, git add the file firstscripts/format.sh --changed may reorder using directives — that's expectedFoo and Foo.Core), be precise
with grep patterns: use \bFoo\b or namespace Foo; to avoid partial matchesBatch-verify and delete dead code: rg-confirm zero callers for N symbols, delete files, run the build once, stage results.
Run benchmarks and check regressions, add benchmark gating to CI, or audit GitHub Actions workflows. Determines mode from user intent.
Batch-apply findings from the most recent --local review. One confirmation, one test run.
Orchestrated code review of git diff using parallel agents. Standard mode (diff-scoped) or full mode (adds Roslyn semantic analysis). Produces severity-grouped plan.
Unified code review: --local (diff review), --pr (adversarial PR review), --apply (batch fixes from last review).
Audit .NET solution health across 13 dimensions: dependency graph, solution sync, CPM compliance, package health, framework consistency, IVT & encapsulation, build config, analyzer config, NuGet config, suppression hygiene, output type & AOT, public API surface, and lock files & pruning. Works with any .NET solution (.slnx or .sln). Parses all config files once, spawns 3 parallel agents, and produces a severity-grouped report with a Mermaid dependency graph. Triggers on: solution audit, audit solution, project graph, dependency audit, solution health, audit projects, check solution.