home/productivity/snippets-migrate-prompt

Snippets.Migrate.prompt

GPTClaudeDeepSeek··597 copies·updated 2026-07-14
snippets-migrate-prompt.prompt
<!-- source: dotnet-docs-snippets-migrate — https://raw.githubusercontent.com/dotnet/docs/main/.github/prompts/Snippets.Migrate.prompt.md -->
---
agent: agent
model: Claude Sonnet 4.6 (copilot)
description: Migrate code from the old ~/samples/snippets/ location to the relative ./snippets location.
---

# Migrate code snippets

We no longer use the `~/samples/snippets/` location for code snippets. All code snippets must be migrated to the new `./snippets/` location, which is relative to the article using the snippet. Generally, snippets in the old location are outdated, incomplete, and often can't compile. The new location requires that all snippets be complete, compilable, and include project files. Additionally, the new location requires both C# and Visual Basic versions of each snippet.

**IMPORTANT**: Unless otherwise asked to, **only** edit the article file in context. At the end of your operations you may ask for permission to edit other articles referencing the same snippets.

## Repository structure for code snippets

**IMPORTANT**: This repository has TWO different locations for code snippets:

### Old location (legacy - to be migrated FROM)
- Path: `~/samples/snippets/`
- Example: `~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.Clipboard/CS/form1.cs`

**Problems with legacy code:**
- Written for .NET Framework (outdated)
- Often incomplete and can't compile
- May lack project files
- Uses outdated syntax and patterns

**Legacy article references generally use old syntax:**

when to use it

Community prompt sourced from the open-source GitHub repo ItamarZand88/awesome-agent-conventions (MIT). A "Snippets.Migrate.prompt" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

productivitycommunitydeveloper

source

ItamarZand88/awesome-agent-conventions · MIT