Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Namespace Migration

ASecurity

Migrate C# types between namespaces across the solution. Updates usings, refs, and verifies build.

2 stars
0 votes
0 copies
0 views
Added 10/6/2026
devopsc#bashgit

Security Analysis

A100/100

Scanned 10/6/2026

$npx -y skills add e128/dotnet-reference --skill namespace-migration --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Namespace Migration?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Namespace Migration
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/e128-namespace-migration/badge)](https://www.skillsdirectory.com/skills/e128-namespace-migration)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
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>"
---

# Namespace Migration

You migrate C# types to new namespaces across the entire solution, updating usings and refs and verifying the build.

## Step 1: Build the mapping table

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
```

## Step 2: Audit impact

For each old namespace, find affected files:

```bash
rg -l "namespace {OldNamespace}" src/ -g "*.cs" | sort
rg -l "using {OldNamespace}" src/ tests/ -g "*.cs" | wc -l
```

Also check for `InternalsVisibleTo` implications:
```bash
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
```

## Step 3: Apply migration

Produce a clean build with all namespace references updated and git history preserved.

- Use `git mv` for any file moves (plain `mv` loses history; if `git mv` errors on untracked files, `git add` first)
- Use Edit tool for namespace declarations and using directives (not sed/awk — can corrupt encoding)
- Update every occurrence: `namespace` declarations, `using` directives, fully-qualified references `{OldNamespace}.TypeName`, `<RootNamespace>`/`<AssemblyName>` in `.csproj`/`.props`, and any `InternalsVisibleTo` strings

Convention: `Namespace.Sub.Name` maps to `src/{Project}/Sub/Name/`.

Verify with:
```bash
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}
```

## Notes

- **Never use `mv` — always `git mv`** to preserve history
- If `git mv` errors on untracked files, `git add` the file first
- After a large migration, `scripts/format.sh --changed` may reorder using directives — that's expected
- InternalsVisibleTo uses assembly names, not namespace names — check both
- If the old namespace is a prefix of another (e.g. `Foo` and `Foo.Core`), be precise
  with grep patterns: use `\bFoo\b` or `namespace Foo;` to avoid partial matches

Attribution

e128e128
View sourceSee grades on GitHubMore from e128 →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Terraform Module Library

Build reusable Terraform modules for AWS, Azure, and GCP infrastructure following infrastructure-as-code best practices. Use when creating infrastructure modules, standardizing cloud provisioning, or implementing reusable IaC components.

401991 votes

sematext-otel

Wire a service's OpenTelemetry output to Sematext Cloud. Walks through region, App-type, instrumentation flow (managed OTLP endpoint vs Sematext Agent), and signal selection (traces/metrics/logs), then produces the exact env-var block and points at a runnable reference example in this repo. Invoke when instrumenting a new app for Sematext.

01 votes

Deployment Patterns

Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications. Use when setting up deployment infrastructure or planning releases.

2699140 votes

Babysit

Watch a pull request or review cycle until it is ready to merge. Use when asked to babysit, monitor, or keep checking PR comments, reviews, and CI until all actionable issues are resolved.

971540 votes

V7 Roster

Interact with the Paperclip control plane API for task coordination and governance. Use when checking assignments, updating issue status, posting comments, delegating work, managing routines, or calling Paperclip API endpoints.

953190 votes
View all in devops →