agentleFS
drinkspillerdrinkspiller/skills/gdocs_tab_writer/SKILL.md

gdocs-tab-writer

Skill1 starsChanged 6 days agoUnlicenseView on GitHub

Write structured content to a specific tab in a Google Doc using the gdocs batch CLI. Use when asked to write, append, or update content in a Google Doc tab, paste content into a doc, or populate an empty doc tab with formatted content.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write structured, formatted content to a specific tab in a Google Doc.

    line 12
  2. Very specific:

    Every object MUST have an "op" field.

    line 34
  3. Very specific:

    All ops support optional styling: bold, italic, font_family, font_size, text_color, alignment, paragraph_bg_color.

    line 93

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

gdocs-tab-writer

Write structured, formatted content to a specific tab in a Google Doc.

Why This Skill Exists

Most gdocs write commands (write, import-md --update) do NOT support the --tab flag. The only reliable way to write to a specific tab is:

GDOCS=/google/bin/releases/gemini-agents-gdocs/gdocs
$GDOCS batch DOC_ID -f batch.json --tab TAB_ID

Quick Reference

Step 1: Find the tab ID

$GDOCS list-tabs DOC_ID

Step 2: Build a batch JSON file

Every object MUST have an "op" field. The "level" field on headings MUST be a string, not a number.

[
  {"op": "heading", "text": "My Title", "level": "1"},
  {"op": "append", "text": "\nSome body text.\n"},
  {"op": "heading", "text": "Section", "level": "2"},
  {"op": "append", "text": "\nMore content here.\n"},
  {"op": "bullet-list", "text": "First point"},
  {"op": "bullet-list", "text": "Second point"},
  {"op": "numbered-list", "text": "Step one"},
  {"op": "numbered-list", "text": "Step two"},
  {"op": "insert-table", "table_data": [["Col A", "Col B"], ["val1", "val2"]], "table_header_bg_color": "#e8f0fe", "table_header_bold": true}
]

Step 3: Execute the batch

$GDOCS batch DOC_ID -f /path/to/batch.json --tab TAB_ID

To replace all existing content in the tab:

$GDOCS batch DOC_ID -f /path/to/batch.json --tab TAB_ID --replace-all

Gotchas (Things That Do NOT Work)

ApproachWhy It Fails
`import-md --update DOC_ID --tab--tab flag not supported
: TAB_ID` : :
`write DOC_ID --file f.md --tab--tab flag not supported
: TAB_ID` : :
append DOC_ID "text" --tab TAB_IDWorks but text is an inline arg — too
: : short for large content :
codemind replace_paragraph MCPCan't find markdown comment markers
: tool : (invisible in Docs) :
Batch JSON with "level": 1Parser error — must be "level": "1"
: (number) : (string) :
Batch JSON without "op" fieldunknown batch op "" error

Available Ops

OpRequired FieldsDescription
headingtext, levelHeading (level "1"-"6", "TITLE",
: : : "SUBTITLE") :
appendtextAppend styled text paragraph
bullet-listtextBullet list item
numbered-listtextNumbered list item
insert-tabletable_dataTable with optional styling
horizontal-rule—Visual separator
rich-textrunsMulti-style paragraph
linktext, urlHyperlinked text

All ops support optional styling: bold, italic, font_family, font_size, text_color, alignment, paragraph_bg_color.

Full Workflow Example

GDOCS=/google/bin/releases/gemini-agents-gdocs/gdocs
DOC_ID="1GwoW3rTCg0_tuW5VWK7bKUJ0o3s5M7pqYWF7Yb4flZw"

# 1. List tabs to find the target
$GDOCS list-tabs $DOC_ID

# 2. Save batch JSON to a scratch file
# (use write_to_file to create /path/to/batch.json)

# 3. Write to the tab
$GDOCS batch $DOC_ID -f /path/to/batch.json --tab t.8mtzp4dajt86

# 4. Verify
$GDOCS read $DOC_ID --tab t.8mtzp4dajt86

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.