← 返回 Skills 市场
sebastiangansca

Google Docs Formatter

作者 Sebastian Gansca · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
7
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install google-docs-formatter
功能描述
Instruction-only workflow for formatting, editing, and creating Google Docs using the existing gog skill/CLI. Use when a user asks to format a Google Doc, co...
使用说明 (SKILL.md)

Google Docs Formatter

Use this skill to format or update Google Docs through the existing gog skill/CLI. This skill is instruction-only: do not introduce new API clients, scripts, dependencies, or credential flows.

Core rule

Rely on gog for all Google Docs and Drive operations. If the gog skill is not loaded and command details are needed, load the gog skill first.

Prefer Google Docs-native workflows over DOCX conversion. Avoid third-party proxy services unless the user explicitly requests them.

Safety and approval

Before any write operation, state the target document and intended change, then get explicit user approval unless the user has already clearly approved that exact change.

Always ask before:

  • gog docs clear
  • replacing the full document body
  • large multi-section replacements
  • deleting text ranges
  • changing a shared/work document whose ownership or audience is unclear

Safe to do without extra approval when already working on the user-approved doc:

  • inspect metadata/structure
  • export/read content
  • prepare Markdown locally
  • run dry-run style checks if supported

Standard workflow

  1. Identify the target doc.

    • Accept a Google Docs URL or document ID.
    • Extract the ID from URLs like https://docs.google.com/document/d/\x3CDOC_ID>/....
  2. Inspect before editing.

    gog docs info \x3CDOC_ID> --json
    gog docs structure \x3CDOC_ID>
    gog docs export \x3CDOC_ID> --format md --out /tmp/doc.md
    
  3. Decide the edit strategy.

    • New document from Markdown: use gog docs create --file.
    • Replace a known placeholder or section: use gog docs find-replace --format markdown.
    • Small textual fix: use gog docs edit or gog docs sed.
    • Append content: use gog docs write --append or gog docs insert.
    • Full rewrite: only after explicit approval; prefer creating a copy first.
  4. Prepare content as Markdown.

    • Use Markdown headings, bullets, numbered lists, tables, bold/italic, and links.
    • Keep semantic structure simple; Google Docs conversion is more reliable with clean Markdown.
    • For images, use supported Markdown image syntax only if gog docs create / find-replace --format markdown supports the source.
  5. Apply the change with gog.

  6. Verify after editing.

    gog docs structure \x3CDOC_ID>
    gog docs export \x3CDOC_ID> --format md --out /tmp/doc-after.md
    

    Compare the exported Markdown or structure against the intended result.

  7. Report concisely.

    • What changed
    • Any limitations observed
    • Link or doc ID if useful

Common operations

Create a formatted Google Doc from Markdown

Prepare a local Markdown file, then:

gog docs create "Document title" --file /path/to/content.md

Use this instead of Markdown → DOCX → Drive upload unless the user specifically needs DOCX behavior.

Replace a placeholder with formatted Markdown

Best when the document contains a marker such as {{SECTION_DRAFT}}.

gog docs find-replace \x3CDOC_ID> '{{SECTION_DRAFT}}' --content-file /path/to/section.md --format markdown --first

Prefer --first when replacing a unique placeholder to avoid accidental repeated changes.

Replace an existing section

If possible, first ask the user to add or approve stable markers around the section:

\x3C!-- START: SECTION_NAME -->
old content
\x3C!-- END: SECTION_NAME -->

Then replace the bounded content with gog docs find-replace --format markdown using a prepared Markdown file.

If there are no stable markers, use gog docs structure to identify paragraphs and proceed carefully. Do not guess destructive ranges.

Small text edits

gog docs edit \x3CDOC_ID> "old text" "new text" --match-case

For regex-style replacements:

gog docs sed \x3CDOC_ID> 's/old pattern/new text/g'

Use regex edits only when the match is unambiguous.

Append content

gog docs write \x3CDOC_ID> --file /path/to/content.md --append

If Markdown formatting is required, prefer placeholder replacement with --format markdown when available.

Full document rewrite

Only after explicit approval. Prefer making a copy first:

gog docs copy \x3CDOC_ID> "Backup before rewrite"
gog docs clear \x3CDOC_ID>
gog docs write \x3CDOC_ID> --file /path/to/content.md

Tell the user if the write path preserves only text rather than rich Markdown formatting; use create --file or find-replace --format markdown for rich Markdown conversion.

Formatting guidance

Use simple, robust Markdown:

# Title

## Section

Short paragraph.

- Bullet one
- Bullet two

| Column A | Column B |
| --- | --- |
| Value A | Value B |

**Bold** and *italic* text.

Avoid fragile formatting unless tested:

  • deeply nested lists
  • complex merged tables
  • unusual HTML
  • custom fonts/colors not expressible through Markdown

For advanced visual formatting not supported by gog, explain the limitation and propose the nearest gog-supported alternative.

When to stop and ask

Ask the user before proceeding if:

  • the document ID is ambiguous
  • the requested formatting requires capabilities not exposed by gog
  • the edit would delete or overwrite substantial content
  • the exported/inspected structure does not match expectations
  • gog reports auth/scope errors

Do not install other Google Docs skills just to complete formatting. This skill is meant to compose with gog, not replace it.

安全使用建议
Before installing or using this skill, make sure you trust the separate gog tool, verify the Google account it uses, and carefully approve the exact document and change before any write operation. For sensitive documents, consider deleting temporary Markdown exports and any backup copies created during the workflow.
功能分析
Type: OpenClaw Skill Name: google-docs-formatter Version: 1.0.0 The 'google-docs-formatter' skill is an instruction-only workflow (SKILL.md) designed to guide an AI agent in using an external CLI tool ('gog') for Google Docs management. It contains no executable code, scripts, or hidden payloads, and explicitly includes safety instructions requiring user approval before performing destructive or major write operations.
能力评估
Purpose & Capability
The stated purpose matches the documented capability: formatting, creating, exporting, replacing, appending, clearing, and copying Google Docs through gog. These are high-impact document actions, but they are disclosed and purpose-aligned.
Instruction Scope
The instructions include clear guardrails: identify the target document, inspect before editing, get explicit approval before write operations, ask before destructive changes, and stop when the document or requested edit is ambiguous.
Install Mechanism
There is no install spec and no code in this skill, but it depends on an existing gog skill/CLI that is not included or version-pinned in the reviewed artifacts.
Credentials
The workflow exports Google Doc content to local Markdown files under /tmp for inspection and verification. This is proportionate for formatting work, but those local copies may contain sensitive document content.
Persistence & Privilege
The skill does not define background persistence or autonomous workers, but its actions inherit the Google Docs/Drive privileges of the existing gog setup and may create document copies/backups in Drive.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install google-docs-formatter
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /google-docs-formatter 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial instruction-only workflow for formatting, editing, and creating Google Docs with gog CLI.
元数据
Slug google-docs-formatter
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Google Docs Formatter 是什么?

Instruction-only workflow for formatting, editing, and creating Google Docs using the existing gog skill/CLI. Use when a user asks to format a Google Doc, co... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 7 次。

如何安装 Google Docs Formatter?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install google-docs-formatter」即可一键安装,无需额外配置。

Google Docs Formatter 是免费的吗?

是的,Google Docs Formatter 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Google Docs Formatter 支持哪些平台?

Google Docs Formatter 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Google Docs Formatter?

由 Sebastian Gansca(@sebastiangansca)开发并维护,当前版本 v1.0.0。

💬 留言讨论