Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add hxy91819/mason-skills --skill google-docsgit clone --depth 1 https://github.com/hxy91819/mason-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/hxy91819/mason-skills/google-docs)<a href="https://agentmods.dev/skills/hxy91819/mason-skills/google-docs"><img src="https://agentmods.dev/badge/skills/hxy91819/mason-skills/google-docs/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/hxy91819/mason-skills/google-docs"><img src="https://agentmods.dev/badge/skills/hxy91819/mason-skills/google-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00059 | $0.01133 |
| Opus 5.5 | $0.00024 | $0.00453 |
| Sonnet 5.5 | $0.00012 | $0.00227 |
| Haiku 4.5 | $0.00006 | $0.00113 |
Grade A, and why
google-docs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 16d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Google Docs 读写
两个 rclone 远端共用同一个自建 OAuth client:
| 远端 | 权限 | 用途 |
|---|---|---|
gdrive: |
drive.readonly |
读取(默认)。能看到分享给该账号的文件;失败时回退到公开导出链接 |
gdrive-rw: |
drive,documents,spreadsheets |
新建、修改、上传、删除;也能写入别人分享且给了编辑权限的文件 |
下文 scripts/ 指本 Skill 根目录下的脚本。
读取
scripts/gdoc_fetch.py '<链接或文件ID>' [--out /tmp/gdoc]
依赖 rclone 和 uv。输出每行一个本地文件路径,位于 <out>/<文件ID>/:
- 表格:
<名>.xlsx加每个页签一个<名>__<页签>.csv(公式取计算值,整数不带.0)。优先读 CSV。 - 文档:
<名>.md。 - 幻灯片:
<名>.pptx;普通 Drive 文件按原格式下载。
每次运行都重新拉取云端最新版本。读完即可删除下载目录。
失败时:
rclone 失败且公开链接返回登录页:文件没分享给已授权账号,请用户让对方分享给自己,或设为「知道链接的人可查看」。- 未配置远端:按「配置」一节处理。
写入
单元格、文档正文等结构化编辑用 scripts/gog.sh <gog 子命令>:它用 gdrive-rw: 的 refresh token 现换 access token 后执行 gog,不需要 gog 自己登录(启动时提示 Using direct access token 属正常)。远端可用 GOG_RCLONE_REMOTE 覆盖。子命令用 gog <服务> --help 查。常用:
scripts/gog.sh sheets create '<标题>' -j # 新建表格,返回 spreadsheetId
scripts/gog.sh sheets update <id> 'Sheet1!A1:B2' --values-json '[["name","qty"],["apple",3]]'
scripts/gog.sh sheets append <id> 'Sheet1!A:B' --values-json '[["pear",5]]'
scripts/gog.sh sheets get <id> 'Sheet1!A1:D20' -j
scripts/gog.sh docs create '<标题>' -j # 新建文档
scripts/gog.sh docs write <id> --file note.md --markdown --replace # 覆盖正文;--append 追加
scripts/gog.sh docs cat <id>
scripts/gog.sh drive ls -j / drive search '<关键词>' -j / drive delete <id> --force
整份文件上传用 rclone。把本地 csv/xlsx/docx 转成谷歌原生格式时,--drive-import-formats 和 --drive-export-formats 要给同一格式,否则报 can't convert ... different export filetype:
rclone copy report.xlsx gdrive-rw:<目录> --drive-import-formats xlsx --drive-export-formats xlsx
删除进回收站(gog drive delete、rclone delete 均如此),30 天内可在 Drive 网页恢复。
- token 失效 /
invalid_grant:按「重新授权」处理。
配置
- 在另一台机器启用(已有配好的机器可复制授权):读 references/new-machine.md。
- 打通新的谷歌账号、从零自建 OAuth client,或给账号开通写入(
gdrive-rw:):读 references/new-account.md。
What ships with it
6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 16d ago First seen · 74 lines · 59 tokens per session scan A d835e9009e04
google-docs is a skill published in the GitHub repository hxy91819/mason-skills (3 stars, last pushed yesterday), licensed MIT. It adds 59 tokens to every session and 1,133 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-09.
Other skills, from other repositories
google-workspace
Gmail, Calendar, Drive, Docs, Sheets via gws CLI or Python.
gog
Google Workspace CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs.
feishu
Work with Feishu or Lark bots, docs, sheets, bitables, approval flows, and OpenAPI/MCP setup without hardcoding credentials.
gog-workspace
Use the gog CLI for Google Workspace tasks across Gmail, Calendar, Drive, Docs, Sheets, Contacts, and related services. Use when the user asks to check email, search Gmail, inspect calendar events, find Drive files, read Docs or Sheets, or manage Google Workspace data through gog.
wecomcli-sheet
A tool for managing WeCom online spreadsheets, including spreadsheet files, data, and subtables. WeCom is an enterprise collaboration platform.
googleworkspace
Manage Google Drive, Gmail, Calendar, Sheets, Docs, and Chat via the gws CLI.