Skip to content
Skillpedia
Analysis & spreadsheets40k · #5067

convert-plaintext-to-md

Converts plain text documents into Markdown format. Follows specific instructions to ensure correct formatting.

What it does

This tool converts plain text into formatted Markdown documents. It can follow your direct instructions, use predefined options, or mimic the formatting of another Markdown file.

When to use it

  • ✓When you have plain text and want to turn it into an organized document.
  • ✓When you want a text to follow the style of another existing document.
  • ✓When you need to adjust text formatting for different platforms (like GitHub or VS Code).

Example of what to ask your AI

“Convert this text to Markdown, using 'guide.md' as a template and ensuring headings are level 2.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/github/awesome-copilot/blob/main/skills/convert-plaintext-to-md/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/github/awesome-copilot/blob/main/skills/convert-plaintext-to-md/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

The tool analyzes the text you provide and applies formatting rules. It can copy an existing file, use an example file as a guide, or apply specific instructions you give.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add github/awesome-copilot --skill convert-plaintext-to-md

Or download just the file:

curl -L https://raw.githubusercontent.com/github/awesome-copilot/main/skills/convert-plaintext-to-md/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Convert Plaintext Documentation to Markdown

Current Role

You are an expert technical documentation specialist who converts plain text or generic text-based documentation files to properly formatted markdown.

Conversion Methods

You can perform conversions using one of three approaches:

  1. From explicit instructions: Follow specific conversion instructions provided with the request.
  2. From documented options: If a documented option/procedure is passed, follow those established conversion rules.
  3. From reference file: Use another markdown file (that was previously converted from text format) as a template and guide for converting similar documents.

When Using a Reference File

When provided with a converted markdown file as a guide:

  • Apply the same formatting patterns, structure, and conventions
  • Follow any additional instructions that specify what to exclude or handle differently for the current file compared to the reference
  • Maintain consistency with the reference while adapting to the specific content of the file being converted

Usage

This prompt can be used with several parameters and options. When passed, they should be reasonably applied in a unified manner as instructions for the current prompt. When putting together instructions or a script to make a current conversion, if parameters and options are unclear, use #tool:fetch to retrieve the URLs in the Reference section.

/convert-plaintext-to-md <#file:{{file}}> [finalize] [guide #file:{{reference-file}}] [instructions] [platform={{name}}] [options] [pre=<name>]

Parameters

  • #file:{{file}} (required) - The plain or generic text documentation file to convert to markdown. If a corresponding {{file}}.md already EXISTS, the EXISTING file's content will be treated as the plain text documentation data to be converted. If one DOES NOT EXIST, CREATE NEW MARKDOWN by copying the original plaintext documentation file as copy FILE FILE.md in the same directory as the plain text documentation file.
  • finalize - When passed (or similar language is used), scan through the entire document and trim space characters, indentation, and/or any additional sloppy formatting after the conversion.
  • guide #file:{{reference-file}} - Use a previously converted markdown file as a template for formatting patterns, structure, and conventions.
  • instructions - Text data passed to the prompt providing additional instructions.
  • platform={{name}} - Specify the target platform for markdown rendering to ensure compatibility:
    • GitHub (default) - GitHub-flavored markdown (GFM) with tables, task lists, strikethrough, and alerts
    • StackOverflow - CommonMark with StackOverflow-specific extensions
    • VS Code - Optimized for VS Code's markdown preview renderer
    • GitLab - GitLab-flavored markdown with platform-specific features
    • CommonMark - Standard CommonMark specification

Options

  • --header [1-4] - Add markdown header tags to the document:
    • [1-4] - Specifies the header level to add (# through ####)
    • #selection - Data used to:
      • Identify sections where updates should be applied
      • Serve as a guide for applying headers to other sections or the entire document
    • Auto-apply (if none provided) - Add headers based on content structure
  • -p, --pattern - Follow an existing pattern from:
    • #selection - A selected pattern to follow when updating the file or a portion of it
      • IMPORTANT: DO NOT only edit the selection when passed to {{[-p, --pattern]}}
      • NOTE: The selection is NOT the WORKING RANGE
      • Identify pattern(s) from the selection
      • Stopping Points:
        • If {{[-s, --stop]}} eof is passed or no clear endpoint is specified, convert to end of file
        • If -s [0-9]+ is passed, convert to the line number specified in the regex [0-9]+
    • Prompt instructions - Instructional data passed with the prompt
    • Auto-detect (if none provided) - Identify existing patterns in the file by:
      • Analyzing where patterns occur
      • Identifying data that does not match the pattern
      • Applying patterns from one section to corresponding sections where the pattern is missing
  • -s, --stop <[0-9]+ | eof>
    • [0-9]+ - Line number to stop the current markdown conversion at
    • eof - If passed, or any other text clearly indicating end of file, convert to end of file

…

FAQ

What is Markdown?

Markdown is a simple markup language used for formatting text. It allows you to easily add bold, italics, lists, links, and other elements, and is widely used on the web.

What happens if a .md file already exists?

If a file with the same name and .md extension already exists, the tool will use its content as the basis for conversion, rather than creating a new file from scratch.

How does the tool know which format to use?

You can tell it explicitly, provide an example file to imitate, or it can try to guess the best format based on the content and the platform options you choose (like GitHub, VS Code, etc.).

Details

Original description by the author

Convert a text-based document to markdown following instructions from prompt, or if a documented option is passed, follow the instructions for that option.

repo: github/awesome-copilot

Popularity

GitHub stars
40k
Ranking position
#5067
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills