# Report To Google Doc

Narrow conversion skill.

- Repository: https://github.com/XiaomiMiMo/MiMo-Code (13741 stars)
- Category: Documents
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add XiaomiMiMo/MiMo-Code --skill report-to-google-doc -g -a claude-code -y`
Codex: `npx skills add XiaomiMiMo/MiMo-Code --skill report-to-google-doc -g -a codex -y`
Cursor: `npx skills add XiaomiMiMo/MiMo-Code --skill report-to-google-doc -g -a cursor -y`
Gemini CLI: `npx skills add XiaomiMiMo/MiMo-Code --skill report-to-google-doc -g -a gemini-cli -y`

## Description

Narrow conversion skill. Invoke only when the user explicitly asks to convert an existing local or blob-hosted HTML analytics report into a Google Doc, DOCX, or shareable document.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Report To Google Doc

Use this skill only when the user explicitly needs a shareable Google Drive document from an existing HTML analytics report. The source must be an HTML report: a local file, a downloaded blob-hosted report, or a report produced by `$build-report`
HTML mode or an equivalent local portable report source.

The expected path is HTML -> DOCX -> Drive upload. It is acceptable for Drive to host the upload as a DOCX-backed viewer file rather than a native Google Docs MIME type. Do not use the old Google Docs batch-update request path.

## Workflow

1. Resolve the HTML report.

   Use an absolute local path. If the user provides a remote report, retrieve it first and pass the local HTML file to the helper. If the file is a sign-in page, redirect page, or tiny stub, stop and obtain the real report.

2. Run the bundled helper.

   ```bash
   python3 <REPORT_TO_GOOGLE_DOC_SKILL_DIR>/scripts/report_to_google_doc_plan.py \
     /absolute/path/to/report.html \
     --out-dir /tmp/report_to_google_doc_plan
   ```

   Omit `--render-workers` on the normal path. Only pass a worker count after benchmarking the same report family locally. If dependencies are missing,
   use a local virtual environment with `beautifulsoup4`, `pillow`, and `python-docx`; `cairosvg` or headless Playwright are optional renderers.

3. Inspect helper outputs.

   Required outputs:

   - `skeleton.txt`: source text with stable placeholders
   - `manifest.json`: parsed headings, tables, callouts, lists, styles, links,
     and rendered visual inventory
   - `preflight_checks.json`: source, width, DOCX, and rendered-image checks
   - `report.docx`: generated local Word document
   - `docx_upload_plan.json`: compact upload instructions
   - `placeholder_queries.json`: source mapping debug labels

   Do not upload until `preflight_checks.json` has `status: "passed"` with zero errors. Warnings must either be fixed or called out in the handoff.

4. Upload the DOCX.

The rest: https://github.com/XiaomiMiMo/MiMo-Code/blob/HEAD/packages/cli/src/skill/builtin/.bundle/data-analytics/workflows/build-report/report-to-google-doc/SKILL.md
