docs-convert-gdoc-md
Skill4 starsChanged 4 months agoApache-2.0View on GitHub
Read a Google Docs document, Google Slides presentation, or Google Sheets spreadsheet and output as Markdown or CSV. Use this skill when asked to read, fetch, import, or convert a Google Doc, Google Slides, or Google Sheets URL.
- Installs packages
In this repository53 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- action-commentsSkill
- article-extractorSkill
- docs-orchestratorSkill
- docs-review-content-qualitySkill
- docs-review-modular-docsSkill
- docs-review-securitySkill
- docs-review-styleSkill
- docs-review-technicalSkill
- docs-ticket-readinessSkill
- docs-workflow-code-analysisSkill
- docs-workflow-create-jiraSkill
- docs-workflow-create-merge-requestSkill
- docs-workflow-jira-readySkill
- docs-workflow-pipeline-diagnosticsSkill
- docs-workflow-planningSkill
- docs-workflow-pr-analysisSkill
- docs-workflow-quality-gateSkill
- docs-workflow-requirementsSkill
- docs-workflow-scope-req-auditSkill
- docs-workflow-security-reviewSkill
- docs-workflow-startSkill
- docs-workflow-style-reviewSkill
- docs-workflow-tech-reviewSkill
- docs-workflow-writingSkill
- git-pr-readerSkill
- ibm-sg-audience-and-mediumSkill
- ibm-sg-language-and-grammarSkill
- ibm-sg-legal-informationSkill
- ibm-sg-numbers-and-measurementSkill
- ibm-sg-punctuationSkill
- ibm-sg-referencesSkill
- ibm-sg-structure-and-formatSkill
- ibm-sg-technical-elementsSkill
- jira-readerSkill
- jira-writerSkill
- learn-codeSkill
- lint-with-valeSkill
- mdita-writeSkill
- query-codeSkill
- redhat-docs-tocSkill
- rh-ssg-accessibilitySkill
- rh-ssg-formattingSkill
- rh-ssg-grammar-and-languageSkill
- rh-ssg-gui-and-linksSkill
- rh-ssg-legal-and-supportSkill
- rh-ssg-release-notesSkill
- rh-ssg-structureSkill
- rh-ssg-technical-examplesSkill
- rn-known-issuesSkill
- understand-pull-requestSkill
- validate-plugin-prereqsSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
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
- Distinctive: line 27
Run the conversion script with the URL as the argument.
- Distinctive: line 28
Read the output file and present the content to the user.
- Distinctive: line 34
Always quote the URL and output file arguments:
- Very specific: line 44
If no output file is specified, it defaults to <id>.md or <id>.csv.
- Very specific: line 48
Use --comments to pull comment threads from the document and insert them as Markdown footnotes:
- Distinctive: line 64
403: No permission. The user needs access to the document.
≈ “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.
Files
Convert Google Docs, Slides, or Sheets
Export Google content using gcloud CLI or Google Application Default Credentials for authentication:
- Google Docs → Markdown (
.md) - Google Slides → Markdown (
.md) via PPTX with slide titles, bullet points, tables, and speaker notes - Google Sheets → CSV (
.csv)
Prerequisites
- The Red Hat Docs Agent Tools marketplace is installed
- Authentication — one of:
gcloudCLI installed and authenticated viagcloud auth login --enable-gdrive-access- Google Application Default Credentials (ADC) — set
GOOGLE_APPLICATION_CREDENTIALSto a service-account JSON path, rungcloud auth application-default login, or use attached workload/metadata credentials
python-pptxis installed for Slides export (python3 -m pip install python-pptx)
Instructions
- The user provides a Google Docs, Slides, or Sheets URL.
- Run the conversion script with the URL as the argument.
- Read the output file and present the content to the user.
Run the script
The script is at ${CLAUDE_SKILL_DIR}/scripts/gdoc2md.py.
Always quote the URL and output file arguments:
uv run --script ${CLAUDE_SKILL_DIR}/scripts/gdoc2md.py [--comments] [--include-resolved] "<url>" ["<output_file>"]- The script auto-detects the URL type:
/document/d/→ Google Docs → Markdown/presentation/d/→ Google Slides → Markdown (via PPTX)/spreadsheets/d/→ Google Sheets → CSV
- If no output file is specified, it defaults to
<id>.mdor<id>.csv.
Include Google Docs comments
Use --comments to pull comment threads from the document and insert them as Markdown footnotes:
uv run --script ${CLAUDE_SKILL_DIR}/scripts/gdoc2md.py --comments "<google-doc-url>"- Each comment with a highlighted text anchor becomes a footnote reference placed after the quoted text in the Markdown body.
- Comments without an anchor appear as footnotes at the end.
- Reply threads are included under the parent comment.
- By default, resolved comment threads are excluded. Add
--include-resolvedto include them. - The
--commentsflag only applies to Google Docs. The script ignores it for Slides and Sheets.
Error handling
- 401: Authentication expired or invalid. Tell the user to run
gcloud auth login --enable-gdrive-access. - Credential errors: Malformed JSON, missing ADC, or refresh failures are caught and reported. Verify the credentials are configured per Prerequisites.
- 403: No permission. The user needs access to the document.
- 404: Wrong URL or the document doesn't exist.
- No authentication method available: Neither
gcloudnor ADC is configured. Tell the user to set up one of the methods described in Prerequisites. - ImportError:
python-pptxnot installed. Tell the user to runpython3 -m pip install python-pptx.
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
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.

