Google Doc Format
/install google-doc-format
Google Doc Format Skill
Create professionally formatted Google Docs from markdown using gog docs create --file. The key insight: markdown tables and formatting render properly as native Google Docs elements when passed through the --file flag.
Core Method
Always use gog docs create with --file to import markdown. Never use gog docs write or gog docs insert for full documents — those don't parse markdown tables.
gog docs create "Doc Title" --file source.md --parent "FOLDER_ID" --pageless --force --no-input
Flags:
--file— Import markdown file (required for proper table rendering)--parent— Google Drive folder ID--pageless— Use pageless layout (recommended for reports/audits)--force— Skip confirmations
Markdown → Google Docs Mapping
| Markdown | Google Docs Element |
|---|---|
# Heading 1 |
HEADING_1 |
## Heading 2 |
HEADING_2 |
### Heading 3 |
HEADING_3 |
**bold text** |
Bold text |
*italic text* |
Italic text |
- item or * item |
Bullet list |
1. item |
Numbered list |
| col1 | col2 | |
Native TABLE element |
[link text](url) |
Clickable hyperlink |
--- |
Horizontal rule |
> blockquote |
Indented text |
Table Formatting Rules
Markdown pipe tables render as native Google Docs tables — this is the main value of this skill. Tables are the element most likely to break when creating docs any other way.
Correct format:
| # | Document | Link |
|---|----------|------|
| 01 | Technical SEO Audit | [Open doc](https://docs.google.com/document/d/DOC_ID/edit) |
| 02 | On-Page SEO Audit | [Open doc](https://docs.google.com/document/d/DOC_ID/edit) |
What NOT to do:
- ❌ Tab-separated values (no
between columns) - ❌ Plain text pretending to be a table
- ❌ Using
gog docs writewith raw text (doesn't parse markdown) - ❌ Putting tables inside code blocks (won't render as tables)
Document Templates
Master Index / Link Index Doc
# Project Name — Deliverables Master Index
*Last updated: DATE*
---
## 📋 Section Name
### Subsection
| # | Document | Link |
|---|----------|------|
| 01 | Document Name | [Open doc](https://docs.google.com/document/d/DOC_ID/edit) |
| 02 | Document Name | [Open doc](https://docs.google.com/document/d/DOC_ID/edit) |
---
## 🎨 Another Section
### Subsection
| # | Document | Link |
|---|----------|------|
| 01 | Document Name | [Open doc](https://docs.google.com/document/d/DOC_ID/edit) |
---
## 📂 Folder Structure
- **Root:** Folder Name
- **Subfolder**
- Document 1
- Document 2
Audit/Report Doc
# Report Title: Descriptive Subtitle
**URL:** /page-slug/
**Target Keywords:** keyword1, keyword2, keyword3
**Meta Title:** SEO Title (60 chars)
**Meta Description:** Meta description (155 chars)
---
## Section Heading
Body paragraph with **bold key terms** and normal text.
### Subsection
| Metric | 2024 | 2023 | Change |
|--------|------|------|--------|
| Value 1 | 232 | 274 | -15% |
**Key takeaway:** Summary sentence after the table.
### Another Subsection
- **Bold label** — Description text
- **Bold label** — Description text
Workflow
- Write markdown to temp file —
cat > /tmp/doc_name.md \x3C\x3C 'EOF' - Create doc —
gog docs create "Title" --file /tmp/doc_name.md --parent FOLDER_ID --pageless --force --no-input - Verify structure —
gog docs structure DOC_ID --no-input | grep -i table - Verify content —
gog docs cat DOC_ID --no-input | head -20
Verification Checklist
After creating, verify:
-
gog docs structureshows TABLE elements (not just NORMAL_TEXT with pipe characters) - Table row counts match expected dimensions (e.g.,
[table 6x3]) - Links are clickable:
[Open doc](url)renders as hyperlinks - Heading hierarchy is correct (H1 > H2 > H3)
- Bold text renders (check structure output for inline formatting)
Replacing an Existing Doc
To replace a badly formatted doc:
- Create new doc with
--fileflag - Verify formatting on the new doc
- Rename new doc to match old name:
gog drive rename NEW_ID "Original Name" --force --no-input - Delete old doc:
gog drive delete OLD_ID --force --no-input - Move new doc to correct folder if needed:
gog drive move NEW_ID --parent FOLDER_ID --force --no-input
Common Issues
| Problem | Cause | Fix |
|---|---|---|
| Tables show as pipe-separated text | Used gog docs write instead of --file |
Recreate with gog docs create --file |
| Links not clickable | Used plain URLs, not markdown link syntax | Use [text](url) format |
| No headings | Used underline-style headings | Use # prefix headings |
| Missing bold | Used HTML \x3Cb> tags |
Use **text** markdown |
| Rate limit (429) | Too many API calls in short time | Add sleep 3 between operations |
Rate Limiting
Google Docs API has per-minute write quotas. When creating multiple docs:
- Add
sleep 3between create operations - If you get 429 errors, wait 60 seconds and retry
- For large batches (5+ docs), add
sleep 5between each
Getting Doc IDs for Link Tables
To build a link index:
- List folder contents:
gog drive ls --parent FOLDER_ID --json --no-input - Extract IDs and names with:
python3 -c "import json,sys; data=json.load(sys.stdin); [print(f'{f[\"name\"]} | {f[\"id\"]}') for f in data.get('files',[])]" - Build Google Doc URLs:
https://docs.google.com/document/d/DOC_ID/edit
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install google-doc-format - 安装完成后,直接呼叫该 Skill 的名称或使用
/google-doc-format触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Google Doc Format 是什么?
Convert markdown files into cleanly formatted Google Docs with native tables, headings, bold, lists, and clickable links using gog docs create --file. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 80 次。
如何安装 Google Doc Format?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install google-doc-format」即可一键安装,无需额外配置。
Google Doc Format 是免费的吗?
是的,Google Doc Format 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Google Doc Format 支持哪些平台?
Google Doc Format 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Google Doc Format?
由 brandrainmakerai(@brandrainmakerai)开发并维护,当前版本 v1.0.0。