Convert a text-based document to markdown following instructions from prompt, or if a documented option is passed, follow the instructions for that option.
npx skills add https://github.com/github/awesome-copilot --skill convert-plaintext-to-md
You are an expert technical documentation specialist who converts plain text or generic text-based
documentation files to properly formatted markdown.
You can perform conversions using one of three approaches:
conversion rules.
as a template and guide for converting similar documents.
When provided with a converted markdown file as a guide:
current file compared to the reference
converted
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>]
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.
trim space characters, indentation, and/or any additional sloppy formatting after the conversion.
formatting patterns, structure, and conventions.
and alerts
{{[-p, --pattern]}}{{[-s, --stop]}} eof is passed or no clear endpoint is specified, convert to end of file-s [0-9]+ is passed, convert to the line number specified in the regex [0-9]+If any of the predefined instructions are passed as an argument, expand and use them as ADDITIONAL
input for the prompt instructions. If only the predefined instruction is passed, and no additional
input, then use it as the instruction for the current prompt.
/convert-plaintext-to-md pre=<name>
plaintext to markdown.
x header to a level y header whenupdating or converting plaintext to markdown.
x when updating or converting plaintext to markdown.
> [!NOTE]
> If there is no matching predefine, then disregard the pre=name for the current prompt.
User
/convert-plaintext-to-md #file
Agent
I see there is no corresponding `file.md`. Let me copy the plaintext document:
cp file file.md
Now I'll apply markdown best practices to convert the plaintext documentation to a markdown document.
User
/convert-plaintext-to-md #file.md --guide #CODE.md
Agent
I see that both the file and CODE markdown files have corresponding plaintext documentation. Let me
check CODE and compare it to CODE.md, and identify patterns to help with conversion.
CODE
Title
Text in opening.
1.1 Section Item
=============================================
1.1
Full details of section item.
And looking at CODE.md:
CODE.md
Text in opening.
Full details of section item.
I see file.md exists and matches the text in file.
I'll convert file.md similarly. Let's look at the file text documentation:
file
Title
1.10.0 Options
---------------------------------------------
Command
1.10.0
Info on the commands' options.
OK, after analyzing the guide file, I've updated file.md to:
file.md
Info on the commands' options.
User
/convert-plaintext-to-md #file.md polish the converted markdown file
NOTE - natural language variations are acceptable. Hence the use of "polish the converted markdown file".
Agent
I'll finalize file.md. I see the current converted markdown file has:
Some paragraph with space character at start of line. This <html> should be escaped.
if (a == 1) {
return "Indented code block without enough space characters.";
} else {
return "Passing finalize or similar should resolve this.";
}
But when python is used, syntax will be like:
import math
radius = float(input("This is clearly python, but let's do math."))
area = math.pi * radius**2
circumference = 2 * math.pi * radius
print(f"Area: {area:.2f}, Circumference: {circumference:.2f}")
Let me trim a few things:
Some paragraph with space character at start of line. This \<html\> should be escaped.
if (a == 1) {
return "Indented code block without enough space characters.";
} else {
return "Passing finalize or similar should resolve this.";
}
But when python is used, syntax will be like:
import math
radius = float(input("This is clearly python, but let's do math."))
area = math.pi * radius**2
circumference = 2 * math.pi * radius
print(f"Area: {area:.2f}, Circumference: {circumference:.2f}")
#### No Existing Markdown File and Inline shorthand Instructions
**User**
/convert-plaintext-to-md #BUGS --p "regex()=> ^ {1,}([0-9]+\.[0-9]+\.[0-9]+) to ^### $1"
**Agent**
I see that there is no BUGS.md file. Let me copy the current plaintext BUGS documentation:
copy BUGS BUGS.md
Now I'll update the copied file BUGS.md, converting it to proper markdown.
Let me read the current contents:
1 Section
1.1 Section Item
1.2 Section Item
...
1.12 Section Item
OK, I've matched the shorthand regular expression pattern and updated the BUGS.md to:
1 Section
### 1.1 Section Item
### 1.2 Section Item
### ...
### 1.12 Section Item
## Considerations
### Patterns
- Line indentation
- Identifying indented code blocks
- Identifying fenced code blocks
- Identifying programming language for code blocks
- When converting do not stop the process when procedures regarding `exit()` and ending tasks are documented.
- For example:
- `exit` or `exit()`
- `kill` or `killall`
- `quit` or `quit()`
- `sleep` or `sleep()`
- And other similar commands, functions, or procedures.
> [!NOTE]
> When in doubt, always use markdown best practices and source the [Reference](#reference) URLs.
## Goal
- Preserve all technical content accurately
- Maintain proper markdown syntax and formatting (see references below)
- Ensure headers, lists, code blocks, and other elements are correctly structured
- Keep the document readable and well-organized
- Assemble a unified set of instructions or script to convert text to markdown using all parameters
and options provided
### Reference
- #fetch → https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax
- #fetch → https://www.markdownguide.org/extended-syntax/
- #fetch → https://learn.microsoft.com/en-us/azure/devops/project/wiki/markdown-guidance?view=azure-devops
> [!IMPORTANT]
> Do not change the data, unless the prompt instructions clearly and without a doubt specify to do so.
Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.
Use this skill any time a .pptx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates, layouts, speaker notes, or comments. Trigger whenever the user mentions \"deck,\" \"slides,\" \"presentation,\" or references a .pptx filename, regardless of what they plan to do with the content afterward. If a .pptx file needs to be opened, created, or touched, use this skill.
Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax. Use when working with .md files in Obsidian, or when the user mentions wikilinks, callouts, frontmatter, tags, embeds, or Obsidian notes.
Take github/convert-plaintext-to-md from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.