Articles in this section
Category / Section

Migrate Legacy Prompt Files to the Updated Platform

Published:

In Code Studio versions prior to 2.0.0, prompt files used the legacy .prompt format stored in the .codestudio/prompts/ directory. Starting from version 2.0.0, Code Studio requires prompts to be created in the new .prompt.md format, which includes YAML frontmatter and Markdown content.
Legacy prompt files will no longer appear in Chat, will not load, and will not function until they are migrated to the new structure.

Why Migration Is Needed

Legacy prompts may not work because:

  • In Code Studio v2.0.0+, the file naming convention has changed.
  • Prompts files will not work unless the file is renamed from .prompt to .prompt.md.
  • The prompt settings are also updated to recognize the new file format.

To restore full prompt functionality, the files must be migrated to the updated format.

Resolution Steps

Follow the steps below to migrate your legacy prompt files to the new structure.

1. Locate Your Legacy Prompt Files

Legacy workspace prompt files were stored in:

Workspace Directory

.codestudio/prompts/

File Extension

. prompt

These files must be converted to . prompt.md .

2. Open and Copy Existing Prompt Content

  1. Open each .prompt file in a text editor or in Code Studio.
  2. Copy the content from the prompt: section (the main instruction text).

3. Create a New Prompt File in Code Studio

Code Studio supports two types of prompt files:

  • Workspace prompts – stored per project
  • User prompts – available across all workspaces

To create a new prompt file:

  1. Open Code Studio.
  2. Go to the Chat view.
  3. Select the Configure Chat (gear icon).
  4. Navigate to Prompt Files → New prompt file.
  5. Choose Workspace or User.
  6. Enter the filename (no extension needed).

For detailed information on configuring prompt files, refer to the Custom Prompt Files guide.

4. Paste and Format Your Prompt Content

Your new prompt file must use the .prompt.md extension and include YAML frontmatter at the top.

Required steps:

  • Add — at the beginning and end of the YAML block.
  • Include fields such as:
    • name
    • description
    • agent (optional)
    • model (optional)
    • tools (optional)
    • argument-hint (optional)
  • Paste your existing prompt content below the YAML.
  • Use Markdown for headings, lists, emphasis, and formatting.

5. Verify YAML Frontmatter and Variables

Check the YAML frontmatter at the top of the prompt file:

  • Ensure it is wrapped between — lines.
  • Confirm proper indentation and valid YAML formatting.
  • Only use supported variables:

${workspaceFolder}

${workspaceFolderBasename}

${selection}

${selectedText}

${file}

${fileBasename}

${fileDirname}

${fileBasenameNoExtension}

${input:variableName}

${input:variableName:placeholder}

6. Test the Migrated Prompts

After saving the new .prompt.md file:

  • Open the new .prompt.md file in Code Studio.
  • Check the YAML frontmatter for syntax errors.
    migrated-prompt.png
  • In Chat, type / to verify the prompt appears in the list.
    models.png
  • Select the prompt and run it.
  • Ensure the expected agent, model, and tools load correctly.
Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Access denied
Access denied