一键导入
google-docs
Use when creating, importing, formatting, editing, exporting, or quality-checking Google Docs from agent-generated markdown or local files.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when creating, importing, formatting, editing, exporting, or quality-checking Google Docs from agent-generated markdown or local files.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when you have a HARD, open-ended, high-stakes problem worth throwing multiple AI models at and pulling the best solution out — architecture decisions, strategy design, thorny debugging, research synthesis, "what am I missing", tool/system design. This is the SOLVE counterpart to multi-review (which critiques an existing artifact). It fans the problem out to a role-differentiated panel of model families (proposer layer), then the caller acts as aggregator and builds a NEW best-of-breed answer via a component ledger — not an average, not a cut-and-paste splice. Also encodes WHEN NOT to use a panel (most problems), routing to a single strong model or the commodity openrouter/fusion instead. Accumulates a persistent model-task-fit knowledge base so future runs pick the right models for the right roles.
Use to govern your own autonomy, deciding when to act on your own versus ask for approval, and earning more freedom over time the way a new employee earns trust through training and repetition. Group your capabilities into skill buckets, classify every action as a reversible (two-way) or irreversible (one-way) door, hold a trust level per bucket (L1 supervised, L2 guardrailed, L3 autonomous), and keep an honest markdown ledger of your decisions that you read back to promote or demote yourself. Load when setting up your autonomy rules or when a consequential act-vs-ask decision comes up.
On-demand real-time web and X (Twitter) search via xAI's Grok. Reach for this when the user explicitly wants Grok to search, or asks for real-time / breaking / X-Twitter-native results that a general web search misses. Not the default web search — a named tool you invoke deliberately.
Use when a Hermes MEMORY.md or USER.md file is too large, bloated, stale, or over the recommended cap and you need to reduce prompt footprint without losing important facts. Applies a lossless memory diet: compress, relocate to SOUL.md/USER.md/AGENTS.md/context files, offload long-tail facts to the memory provider, convert reusable procedures into skills, then drop only stale or duplicate material. Includes dry-run, diff, and review gates before any write.
Use when creating, populating, formatting, importing, exporting, or quality-checking Google Sheets from CSV, JSON arrays, or computed tabular data.
Use when creating, importing, exporting, or quality-checking Google Slides decks via markdown-to-PPTX conversion and Drive import.
| name | google-docs |
| description | Use when creating, importing, formatting, editing, exporting, or quality-checking Google Docs from agent-generated markdown or local files. |
| version | 1.0.0 |
| author | Hermes Agent |
| license | MIT |
| platforms | ["macos","linux"] |
| metadata | {"hermes":{"tags":["google","docs","drive","markdown","formatting","productivity"],"related_skills":["google-sheets","google-slides"]}} |
Use this skill when the requested artifact is a Google Doc, especially when the source material is agent-generated Markdown and the user cares about formatting.
The tested best default is Drive import of Markdown as a native Google Doc:
text/markdown and target MIME
application/vnd.google-apps.document.text/markdown or text/plain.This outperformed the older pandoc -> docx -> Google Doc path in testing: direct
Markdown import preserved headings, bold, italic, links, native tables, inline code, and
fenced code blocks more faithfully.
gog CLI (steipete/gogcli) installed and authorized: run gog auth login once in
the operating-system user's real $HOME. The bundled scripts/gworkspace.py reuses
gog's stored OAuth refresh token, so no separate Google Cloud setup is needed.python3 on PATH (the helper is stdlib-only — no pip install required).pandoc only if you use the docx path below (brew install pandoc on macOS).--refresh-token-file /
--client-secret-file, then GOOGLE_REFRESH_TOKEN / GOOGLE_CLIENT_ID /
GOOGLE_CLIENT_SECRET env vars, then gog's stored token. If lookup fails it exits
with {"error": "missing_credentials"} — see Common Pitfalls for the manual escape
hatch.Run commands from the skill directory so
scripts/gworkspace.pyresolves relative to$PWD, or use the full pathskills/google-docs/scripts/gworkspace.pyfrom the repo root.
$HOME shadowing: some agent runtimes rewrite
$HOMEto a sandbox path where gog's auth doesn't exist. If credential lookup fails in that environment, pointHOMEat the real OS user home before invoking the helper.
gog, raw API, or browser for Docs.Do not use this for Sheets or Slides; load google-sheets or google-slides
instead.
Use Drive convert-on-upload with Markdown:
python3 scripts/gworkspace.py upload report.md \
--as doc \
--name "Quarterly Report" \
--parent FOLDER_ID
FOLDER_ID is optional; omit --parent to create in My Drive root. To target a
specific folder, copy the ID from its Drive URL
(https://drive.google.com/drive/folders/<FOLDER_ID>), list folders with
gog drive ls --json, or create one with
python3 scripts/gworkspace.py mkdir "Reports".
Why this is the default:
gog OAuth refresh token..md or .docx file.If gog docs write --help exists on the machine, prefer newer gog for editing an
existing Doc:
# This path requires a newer gog with docs editing commands.
gog docs write --help >/dev/null 2>&1 || { echo "gog docs write not available; use Drive import instead"; exit 1; }
gog docs create "Draft Title" --parent FOLDER_ID --json
gog docs write DOC_ID --markdown --text "$(cat report.md)" --append --json
Newer upstream gog versions include Docs editing primitives such as
docs write --markdown, docs format, docs insert-table, and raw Docs inspection.
Local v0.9.0 did not expose these commands during the 2026-06-23 test, so do not
assume they exist. Check help first.
Use pandoc -> docx -> Google Doc only when the source document needs Word-specific
features or the Markdown import path fails:
pandoc report.md -o report.docx
python3 scripts/gworkspace.py upload report.docx --as doc --name "Quarterly Report"
This path preserved headings, lists, tables, links, and basic text styling in testing, but degraded fenced code blocks compared with direct Markdown import.
Use the browser only for:
Do not use the browser as the primary document creation backend. It is slower, less repeatable, and more fragile than Drive import or Docs API calls.
Write the source Markdown like a real source document, not like chat output.
Good source (outer fence shown with ~~~ so the inner ``` code block renders
correctly):
# Quarterly Business Review
## Executive Summary
Revenue increased **18%** quarter-over-quarter.
## Metrics
| Metric | Q1 | Q2 |
| ------ | ----: | ----: |
| MRR | $420k | $496k |
```python
def churn_rate(lost, start):
return round(lost / start * 100, 2)
```
After creation, verify the Doc is native and formatting survived:
python3 scripts/gworkspace.py meta DOC_ID
python3 scripts/gworkspace.py export DOC_ID --mime text/markdown --out /tmp/doc-roundtrip.md
Check that:
mimeType is application/vnd.google-apps.document.webViewLink opens as a Google Docs URL.If exact visual polish matters, open the link in the browser and inspect the first page, heading hierarchy, tables, and code blocks.
Prefer a two-step pattern:
Options in order:
gog docs write/format/find-replace if present.documents.batchUpdate for precise paragraph/text/table/image
operations.Do not rewrite a human-edited Doc wholesale unless the user explicitly asks. Export first, preserve structure, then apply a minimal diff.
The bundled helper also exposes Drive operations the skills reference:
python3 scripts/gworkspace.py mkdir "Reports" # create a folder, returns its ID
python3 scripts/gworkspace.py meta DOC_ID # metadata + webViewLink
python3 scripts/gworkspace.py token # mint an access token for raw Docs API calls
python3 scripts/gworkspace.py share DOC_ID --email a@b.com --role reader # share — IRREVERSIBLE
share sends a real, externally-visible grant. Treat it like sending an email:
confirm the recipient and role with the user first, and never share without explicit
approval. --notify additionally emails the recipient.
For raw Docs API work (documents.batchUpdate), mint a token with gworkspace.py token
and call the REST endpoint directly.
share is
irreversible — confirm recipient + role first.Using old local gog Docs commands for formatting. Local gog v0.9.0 created
title-only Docs and did not support docs write --markdown during testing. Check
gog docs --help before relying on editing commands.
Uploading Markdown without conversion. gog drive upload report.md creates a
Drive file containing Markdown, not a native Google Doc. Use Drive API target MIME
application/vnd.google-apps.document, or a newer gog conversion flag if available.
Wrong source MIME. Markdown import needs source MIME text/markdown; guessing as
plain text can fail or degrade formatting.
Assuming docx is better. In testing, direct Markdown import preserved code fences
and inline code better than pandoc -> docx -> Google Doc.
Skipping verification. A successful upload is not enough. Confirm native Google Doc MIME type and round-trip export.
Credential lookup fails (missing_credentials). If the helper can't find gog's
token, pass credentials explicitly: export gog's refresh token to a 0600 file with
gog auth tokens export <account> --output /tmp/tok.json --force, then run the
helper with
--refresh-token-file /tmp/tok.json --client-secret-file <gog credentials.json>. The
helper refuses credential files that are group/world-readable or not owned by you —
chmod 600 them. These flags work before or after the subcommand. For a gog named
client or a non-default gog home, use --gog-client <name> / --gog-home <dir> (or
the GOG_CLIENT / GOG_HOME env vars).
export returns 403. Drive's export endpoint only works on Google-native files.
If you accidentally uploaded a raw file (used --as raw), meta will show a
non-Google MIME type; re-upload with the correct --as target.
mkdir -p /tmp/gdoc-build
cat > /tmp/gdoc-build/report.md <<'MD'
# Report Title
## Summary
Write the report here.
MD
python3 scripts/gworkspace.py upload /tmp/gdoc-build/report.md --as doc --name "Report Title"
Return the resulting webViewLink to the user.