Index of every page on this site: llms.txt
All skills
shibayu36 avatar

/gws-docs-to-markdown

@688663b
Run it yourself

Generate a Markdown file from a Google Docs URL and extract embedded images as local files. Use for requests like "read this Google Doc" or "load this document." Runs a Bash script to generate the Markdown and image files, then reads them with the Read tool.

Use this Skill: https://skilld.dev/gh/shibayu36/agent-skills/gws-docs-to-markdown

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈70 tokens for metadata: the name and description. ≈311 when used: this file.

Description uses 3.5% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈281 characters, or 3.5%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Google Docs to Markdown

Given a Google Docs URL, generate a lightweight Markdown file and image files.

Usage

${SKILL_DIR}/scripts/read_gdoc.sh "GOOGLE_DOCS_URL_OR_DOC_ID" "OUTPUT_DIR"
  • GOOGLE_DOCS_URL_OR_DOC_ID (required): Google Docs URL (e.g. https://docs.google.com/document/d/DOC_ID/edit) or DOC_ID
  • OUTPUT_DIR (required): Output directory (e.g. tmp/)

Workflow

  1. Run the script.
  2. The path to the generated Markdown file is printed to stdout.
  3. Read that path with the Read tool.
  4. To inspect images, use the Read tool on files under {OUTPUT_DIR}/images_{DOC_ID_FIRST_8_CHARS}/ (Claude is multimodal, so it can render images).

How it works

  1. Export the Google Docs as Markdown via gws drive files export.
  2. Detect base64-embedded images in the exported Markdown.
  3. Decode base64 and save them as PNG files under {OUTPUT_DIR}/images_{DOC_ID_FIRST_8_CHARS}/.
  4. Replace image references in the Markdown with local file paths.
  5. Output the cleaned Markdown to {OUTPUT_DIR}/.

Notes

  • gws CLI authentication is required (must be set up in advance).
  • The Google Docs API export has a 10 MB limit.
  • Google normalizes exported images to PNG (GIF/JPG uploads are returned as PNG).

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill converts Google Docs to Markdown and extracts images. It is vulnerable to indirect prompt injection if the source document contains malicious instructions, though it includes input validation to prevent command injection.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: MEDIUM · 1 issue

Signed by skilld at 688663b. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 7 months ago

README badge

README badge for shibayu36/agent-skills/gws-docs-to-markdown