md-to-gdoc
Markdown to Google Doc
Convert .md files into Google Docs with proper heading styles, bold, code blocks, lists, links, and blockquotes.
Requirements
- gog — Google Workspace CLI (must be authenticated:
gog auth add <email>) - python3 — used for JSON parsing in the script
Quick Start
scripts/md-to-gdoc.sh <file.md> [--title "Title"] [--parent <folder-id>] [--account <email>]
Resolve scripts/ relative to this skill's directory.
Critical Rules
- Use
gog docs update --format=markdown— neverwrite --markdown, nevercreate --file. Theupdatepath is the only one that correctly applies Google Docs heading styles via the API. - Markdown must have proper
#headings. If the source has "heading-looking" plain text without#markers, add them before conversion. The script warns but proceeds. - Two-step process: create empty doc → populate with
update. This is deterministic and reliable. - Always verify heading syntax in the markdown before running. No
#= no formatted headings in the output.
What Works
#–######headings → Google Docs Heading 1–6**bold**→ bold text`inline code`→ Courier New- Fenced code blocks → Courier New + gray background
> blockquotes→ indented paragraphs- bullets→ bullet-prefixed text1. numbered→ number-prefixed text[text](url)→ hyperlinks- Markdown tables → native Google Docs tables
Known Limitations
*italic*may not render (gog CLI bug in inline formatting parser — italic detection fails in certain contexts)- Bullet/numbered lists use text prefixes (
•,1.), not native Google Docs list objects - Horizontal rules render as 40 dashes
Options
--title— Doc title. Defaults to filename with hyphens→spaces.--parent— Google Drive folder ID to place the doc in.--account— Google account email. Defaults to gog's default (first authenticated account).
Troubleshooting
- All body text, no headings: The markdown file lacks
#heading markers. Add them. - gog auth errors: Run
gog auth listto verify auth. May needgog auth add <email>. - Empty doc created: The
updatestep failed. Check gog output for API errors.
More from tychohq/agent-skills
system-watchdog
System resource monitoring that detects wasteful or suspicious processes. Outputs structured JSON for any consumer.
84flights
Search flights via Google Flights. Find nonstop/connecting flights, filter by time and cabin class, get booking links. Supports city names (NYC, London, Tokyo) with automatic multi-airport search. No API key required.
37amazon
Buy and return items on Amazon using browser automation. Use for purchasing, reordering, checking order history, and processing returns.
14architecture-research
Research the architecture of a codebase or system. Reads source code, finds external context, explains design decisions, and produces ELK diagrams. Use when asked to understand, explain, or diagram how a repo/system is built.
11tmux
Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
10domain-check
Check domain availability via Vercel and buy/manage domains via Vercel CLI
10