Files
misc-productivity-tools-OPEN/google-doc-md-conversion-skill
T

145 lines
2.6 KiB
Plaintext
Raw Normal View History

2026-05-02 19:35:41 +00:00
Skill: Google Doc (.md export) → Clean Markdown
2026-05-02 13:57:20 -06:00
# What This Skill Does
2026-05-02 19:35:41 +00:00
This skill takes a Google Docs–exported .md file and converts it into a clean, production-quality Markdown document by:
Preserving 100% of original content
Cleaning Google Docs artifacts
Rebuilding a functional clickable Table of Contents
Normalizing headers for consistent anchor linking
This is a lossless transformation — no summarization, no rewriting, no omission.
2026-05-02 13:57:20 -06:00
## Core Rules (STRICT)
2026-05-02 19:35:41 +00:00
DO NOT modify content
No summarizing
No rewording
No restructuring
No deleting content (except artifacts explicitly listed below)
ONLY perform these transformations
Clean TOC
Clean headers
Remove Google Docs artifacts
Normalize anchors
Preserve everything else exactly
Paragraphs
Lists
Formatting (bold, italics, etc.)
Links
Code blocks
2026-05-02 13:57:20 -06:00
## Input
2026-05-02 19:35:41 +00:00
Markdown file exported from Google Docs (.md)
Typically includes:
Broken TOC
Anchor tags like {#...}
Page numbers in TOC
Messy header anchors
2026-05-02 13:57:20 -06:00
## Output
2026-05-02 19:35:41 +00:00
Clean .md file
Proper Markdown TOC with working links
Clean headers (no embedded anchors)
Fully preserved document content
2026-05-02 13:57:20 -06:00
## Transformation Steps
2026-05-02 19:35:41 +00:00
1. Extract and Identify TOC
Locate the TOC section (usually near top)
Remove:
Page numbers
Duplicate entries
Google-style anchor links
2026-05-02 13:57:20 -06:00
2026-05-02 19:35:41 +00:00
2. Rebuild TOC (Markdown-native)
Convert TOC into:
## Table of Contents
- [Section Name](#section-name)
- [Subsection](#subsection)
Anchor Rules
Lowercase
Replace spaces with -
Remove punctuation:
? : + & , . ( )
Collapse multiple dashes
Example:
"What is the purpose of the iNDX CO+"
→ #what-is-the-purpose-of-the-indx-co
2026-05-02 13:57:20 -06:00
2026-05-02 19:35:41 +00:00
3. Clean Headers
Convert headers like:
## Section Title {#section-title}
→
## Section Title
Rules:
Remove {#...} completely
Keep header text EXACTLY
Preserve header levels (#, ##, ###)
2026-05-02 13:57:20 -06:00
2026-05-02 19:35:41 +00:00
4. Remove Google Docs Artifacts
Remove:
{#...} anchor tags
TOC page numbers
Empty anchor headers
Inline anchor junk
DO NOT remove:
Real links
Content text
Lists or formatting
2026-05-02 13:57:20 -06:00
2026-05-02 19:35:41 +00:00
5. Preserve Everything Else
Do NOT touch:
Paragraph wording
Lists or numbering
Code blocks
Links
Formatting (bold, italics)
2026-05-02 13:57:20 -06:00
2026-05-02 19:35:41 +00:00
6. Images Handling
If image appears as:
[![][image1]](...)
Keep as-is.
If base64 blob appears:
[data:image/png;base64,...]
Leave intact unless explicitly told to remove.
2026-05-02 13:57:20 -06:00
## Output Format
2026-05-02 19:35:41 +00:00
Return full .md document
Include rebuilt TOC at top
Ensure all TOC links work with headers
2026-05-02 13:57:20 -06:00
## Validation Checklist
2026-05-02 19:35:41 +00:00
Before returning:
No {#...} remains
TOC has no page numbers
All TOC links match headers
Headers are unchanged except anchor removal
No content removed or rewritten
Document renders cleanly in Markdown viewer