gdoc-sync

gdoc-sync is a skill for Claude Code from shaharsha/claude-skills. It costs 123 tokens per session (2,167 once invoked), scanned A, original, MIT.

A tool that copies a Markdown file into an existing Google Doc, Google's online word processor, and repairs parts that imports often break. It can also resize large images and set right-to-left text direction for Hebrew or Arabic.

In plain words
What is it for?
Use it to publish plans and other Markdown documents to Google Docs while preserving working links, readable images, and right-to-left formatting.
Why use it?
It removes the manual work of fixing broken heading links, links to other documents, oversized images, and text direction after importing Markdown.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the documents-and-decks plugin — 7 skills shipped together , and of shaharsha-skills

Good fit Use it to publish plans and other Markdown documents to Google Docs while preserving working links, readable images, and right-to-left formatting.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shaharsha/claude-skills/gdoc-sync
Install

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.

Any agent
npx skills add shaharsha/claude-skills --skill gdoc-sync
Clone the repo
git clone --depth 1 https://github.com/shaharsha/claude-skills

Made for: Claude Code.

Or install documents-and-decks, the plugin that ships this one along with the rest of its 7 skills.

Wrote 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.

agentmods badge for gdoc-sync

README.md
[![agentmods](https://agentmods.dev/badge/skills/shaharsha/claude-skills/gdoc-sync/github.svg)](https://agentmods.dev/skills/shaharsha/claude-skills/gdoc-sync)
Your own site
<a href="https://agentmods.dev/skills/shaharsha/claude-skills/gdoc-sync"><img src="https://agentmods.dev/badge/skills/shaharsha/claude-skills/gdoc-sync/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.

agentmods 80×15 button for gdoc-sync

Your own site · 80×15
<a href="https://agentmods.dev/skills/shaharsha/claude-skills/gdoc-sync"><img src="https://agentmods.dev/badge/skills/shaharsha/claude-skills/gdoc-sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 123 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,167 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00123 $0.02167
Opus 5 $0.00062 $0.01084
Sonnet 5 $0.00025 $0.00433
Haiku 4.5 $0.00012 $0.00217

Measured 12d ago against content hash 2e65a7f245d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

gdoc-sync scanned grade A with 1 finding 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 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/sync-gdoc.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- No other deps — uses Python's `urllib` stdlib for HTTP.
skills/gdoc-sync/SKILL.md · 125 lines

How it starts

The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.

gdoc-sync

Pushes a local Markdown file into an existing Google Doc via the Drive + Docs APIs, then patches things Google's native import gets wrong: in-doc anchor links, cross-doc references to sibling Docs, and oversized images. Optional final pass applies RTL to every body paragraph for Hebrew/Arabic docs.

The script is a single Python file (scripts/sync-gdoc.py) with no install step beyond the Google auth library. It authenticates via a service-account JSON (recommended) or gcloud ADC (fallback).

Quick start

scripts/sync-gdoc.py <markdown-file> --doc-id <FILE_ID> --sa-key <service-account.json> \
  [--rtl] [--no-links] [--max-image-width 300] \
  [--cross-doc-map "other.md=OTHER_DOC_ID" ...]

End-to-end example (Hebrew doc, service account auth, with a sibling Doc):

scripts/sync-gdoc.py plan.md \
  --doc-id 1lSspmI7TXXxVPjX8mLRa8LZEPkhE2rNDYJ_fFDU-BEE \
  --sa-key ~/Downloads/sa-key.json \
  --rtl \
  --cross-doc-map "spec.md=1AbCdEf...ZyXw"

Output:

[1/5] Pushed markdown: plan.md (84,468 bytes)
[2/5] Fixed 35 in-doc anchor links
[3/5] Fixed 18 cross-doc links
[4/5] Resized 2 oversized images (max width 300.0pt)
[5/5] Applied RTL across doc (1..52026)
Done. https://docs.google.com/document/d/1lSspmI7.../edit

What it does (five-step pipeline)

Step What Why
1. Push PATCH markdown to Drive via /upload/drive/v3/files/{id} with Content-Type: text/markdown Google converts natively — paragraphs, headings, tables, code blocks, inline images all land correctly
2. Fix in-doc anchors Walks the Docs structure, builds a section-number → headingId map from heading paragraphs, rewrites every text run whose link.url starts with # to use link.headingId instead Google's markdown import turns [text](#slug) into a URL link pointing at literal #slug (broken). This step makes cross-references clickable natively.
3. Fix cross-doc links For each --cross-doc-map "name=DOC_ID", fetches the target Doc's headings, builds a slug + section-number map, then rewrites every text run whose link URL contains name into a deep-link https://docs.google.com/document/d/DOC_ID/edit#heading=h.xxx. Falls back to slug match → section-number-from-anchor → section-number-from-link-text → top-of-Doc Markdown source like [see §5.3 in plan](other-plan.md#53-foo) imports as a literal URL pointing at the local filename. This step turns those into proper deep-links into the sibling Doc.
4. Resize images Finds inline images wider than --max-image-width, deletes and re-inserts with explicit objectSize preserving aspect ratio Google's import sets inline image dimensions to the source image's native size (often 1000+ pt wide — blows past the page margins)
5. RTL (optional) batchUpdate with updateParagraphStyle setting direction: RIGHT_TO_LEFT across the full body range Neither Google's import nor its UI sets paragraph direction for Hebrew/Arabic; without this, every paragraph renders LTR by default

Read the full file on GitHub · 125 lines

Files

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.

Changes

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.

  1. 12d ago First seen · 125 lines · 123 tokens per session scan A 2e65a7f245d4

Subscribe to this mod's changes

gdoc-sync is a skill published in the GitHub repository shaharsha/claude-skills (5 stars, last pushed 14d ago), licensed MIT. It adds 123 tokens to every session and 2,167 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

baoyu-youtube-transcript

A tool for downloading the written captions, subtitles, chapter information, speaker labels, and cover image from a YouTube video using its URL or ID.

JimLiu/baoyu-skills · 107 tokens

orbit-notion

Open Orbit briefing skill — selected by the Orbit pipeline when Notion is the user's only connected connector, or when the user explicitly scopes their daily digest to Notion. Pulls the past 24 hours of document edits, comments, mentions, and database row changes from the user's authenticated Notion connection and…

nexu-io/open-design · 117 tokens

instrument-data-to-allotrope

Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full…

anthropics/knowledge-work-plugins · 123 tokens

feishu

Work with Feishu or Lark bots, docs, sheets, bitables, approval flows, and OpenAPI/MCP setup without hardcoding credentials.

Hmbown/CodeWhale · 33 tokens

read

Reads URLs and PDFs by fetching source content, defaulting to concise summaries for plain read requests and clean Markdown when asked to convert, save, quote, cite, or feed downstream work. Use when users ask in any language to read, fetch, check, summarize, quote, cite, convert, or save a URL or PDF. Not for local…

tw93/Waza · 78 tokens

overleaf-sync

A two-way connection between a local paper folder and Overleaf, a web-based LaTeX editor for writing research papers. It lets you move changes between the local files and the shared Overleaf project.

wanshuiyin/Auto-claude-code-research-in-sleep · 97 tokens