Agent skill

Chart To Drive

by ai-analyst-lab in ai-analyst-lab/ai-analyst

Standardized workflow for uploading local chart PNGs to Google Drive and making them available for insertion into Google Docs and Slides.

MITAuto-check passedDocuments & Office

Install Chart To Drive

skills CLI
$ npx skills add ai-analyst-lab/ai-analyst --skill chart-to-drive -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ai-analyst-lab/ai-analyst chart-to-drive --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ai-analyst-lab/ai-analyst.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/chart-to-drive .claude/skills/chart-to-drive && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
chart-to-drive
GitHub stars
304
Token cost
~1.4k tokens
SKILL.md length
545 words
Files
1
Skills in repo
43
Repo updated
First seen
Licence
MIT

At a glance

Standardized workflow for uploading local chart PNGs to Google Drive and making them available for insertion into Google Docs and Slides.

  • Works in 3 steps: Collect chart files → Upload each chart to Drive directly → Build the URL map
  • You need to insert charts into Google Docs
  • SKILL.md covers Purpose, When to Apply, Workflow and URL Format Reference, plus 2 more sections
  • Reaches drive.google.com

What it does

Chart To Drive is an agent skill from ai-analyst-lab/ai-analyst. Standardized workflow for uploading local chart PNGs to Google Drive and making them available for insertion into Google Docs and Slides. Use this skill whenever you need to insert charts into Google Docs or Google Slides, when the google-doc-creator or google-slides-creator agents need chart URLs, when building presentations or reports with embedded visualizations, when user asks to "upload charts", "add images to the doc", "put charts in slides", "make charts available for Google", or any time you have chart…

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Documents & Office, covering Cloud office suites and Slides and decks. It works with Google Docs, Google Slides, Google Workspace and Google Drive. The repository describes itself as: AI Product Analyst — Claude Code-powered data analysis toolkit. The licence is MIT.

When your agent uses it

  • You need to insert charts into Google Docs
  • The google-doc-creator
  • Google-slides-creator agents need chart URLs
  • Building presentations

Example prompts

  • “upload charts”
  • “add images to the doc”
  • “put charts in slides”
  • “/chart-to-drive”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Collect chart files
  2. Upload each chart to Drive directly
  3. Build the URL map

What it can do on your machine

Read from SKILL.md and the folder at commit 52c0744. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • drive.google.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Chart To Drive loads about 1.4k tokens when it runs. Until then it costs about 254 tokens; SKILL.md has 545 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~254
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ai-analyst-lab/ai-analyst at commit 52c0744, republished under its MIT licence (© ai-analyst-lab). 545 words, ~1,393 tokens.

Download SKILL.mdSave it as .claude/skills/chart-to-drive/SKILL.md (or your agent's skills folder).
name
chart-to-drive
description
Standardized workflow for uploading local chart PNGs to Google Drive and making them available for insertion into Google Docs and Slides. Use this skill whenever you need to insert charts into Google Docs or Google Slides, when the google-doc-creator or google-slides-creator agents need chart URLs, when building presentations or reports with embedded visualizations, when user asks to "upload charts", "add images to the doc", "put charts in slides", "make charts available for Google", or any time you have chart PNG files that need to be referenced in Google Workspace documents. One standard flow for upload, permissions, and URL construction, with no public file hosts involved. Always use this skill before calling insert_doc_image or createImage APIs — those require public Drive URLs, which this skill produces. Also use when you see errors like "image URL not accessible" or "permission denied" during doc/slide creation — those usually mean charts weren't properly uploaded to Drive first.

Skill: Chart-to-Drive Uploader

Purpose

Standardized workflow for uploading local chart PNGs to Google Drive and making them available for insertion into Google Docs and Slides. One standard flow for upload, permissions, and URL construction, with no public file hosts involved.

When to Apply

Automatically whenever:

  • Chart PNGs need to be inserted into Google Docs or Google Slides
  • The google-doc-creator or google-slides-creator agent needs chart URLs
  • User asks to "upload charts" or "add images to the doc/slides"
  • User encounters "permission denied" or "image URL not accessible" errors when building Google Workspace documents — this usually means charts weren't uploaded to Drive first

When NOT to use this skill:

  • For single-image uploads where you just need one Drive URL (use mcp__google-docs__upload_image_to_drive directly)
  • When building Google Docs via the python-docx → upload workflow (that embeds images in the .docx file, no Drive URLs needed)

Workflow

Step 1: Collect chart files

Identify all chart PNGs that need uploading. Standard location: outputs/charts/.

python
import os
chart_dir = "outputs/charts"
charts = [(f, os.path.join(chart_dir, f)) for f in sorted(os.listdir(chart_dir)) if f.endswith('.png')]
Step 2: Upload each chart to Drive directly

Use the Google Docs MCP upload_image_to_drive tool with the LOCAL file path. It uploads straight to the user's Drive and sets just enough link access for the Docs/Slides APIs to fetch the image. No public file host is involved at any point; never route charts through one (the analysis may contain confidential numbers).

for each (filename, filepath) in charts:
    mcp__google-docs__upload_image_to_drive(image_path=filepath)
    # Returns the Drive file ID; record it in the chart map

If that tool is unavailable, upload with the Drive API from Python using local credentials (files().create with MediaFileUpload), then set reader link access.

Optional: Create a "{dataset_name} - Charts" folder first and pass its ID as the parent so uploads stay organized.

Step 3: Build the URL map

Return a mapping of chart filename to both URL formats:

python
chart_map = {
    "01_height_crossover.png": {
        "drive_id": "1abc...",
        "drive_url": "https://drive.google.com/uc?id=1abc...&export=download"
    },
    ...
}

For Google Docs: Use drive_url (permanent, works with insert_doc_image) For Google Slides: Use drive_url (permanent, works with createImage)


URL Format Reference

TargetURL FormatNotes
Google Docs insert_doc_imagehttps://drive.google.com/uc?id={ID}&export=downloadMust be public
Google Slides createImagehttps://drive.google.com/uc?id={ID}&export=downloadMust be public
Direct Drive viewhttps://drive.google.com/file/d/{ID}/viewNot for API insertion

Show full SKILL.md (225 more words)Show less

Rules

  1. Drive only, always. Never upload charts to public file hosts (tmpfiles, imgur, postimages, or similar); the user's Drive is the only image host.

  2. Set public permissions immediately. Google Docs/Slides API cannot access private Drive files. The MCP upload_image_to_drive tool automatically sets public access — no additional permission call needed.

  3. Batch uploads in a single Python script. Don't make separate Bash calls per chart — one script handles all uploads efficiently.

  4. Print the chart map. Always output the full filename → drive_id mapping so subsequent agents can reference charts by name.

  5. Check for existing uploads. Before re-uploading, search Drive for files with the same name in the expected folder. If you find existing files with matching names uploaded in the last 24 hours, reuse those Drive IDs instead of creating duplicates. Only re-upload if the file is missing or very old.


Error Recovery

If the MCP upload tool fails or is missing:

  • Upload with the Drive API from Python using local credentials (files().create + MediaFileUpload), then set reader link access.
  • If no Drive access works at all: stop, keep the charts local, tell the user which files need manual upload. Never fall back to a public file host.

If a Drive upload returns "permission denied" or "authentication failed":

  • Verify Google Workspace MCP authentication status
  • Run mcp__google-docs__authorize_google_docs() to re-authenticate
  • Retry the upload after successful auth

© ai-analyst-lab, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/chart-to-drive of ai-analyst-lab/ai-analyst.

Open the folder on GitHubat commit 52c0744

Compare with similar skills

Chart To Drive next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Chart To Drive compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Chart To Drive this skillai-analyst-lab/ai-analyst304—~1.4kAutomated safety check: PassMIT
Google Docs, Sheets and Slides Editingasgeirtj/system_prompts_leaks69k—~3.7kAutomated safety check: WarnCC0-1.0
Google Workspaceespennilsen/pi122—~3.4kAutomated safety check: PassMIT
Google Workspace Opsaffaan-m/ECC276k2 repos~684Automated safety check: PassMIT
Google Drive Sheetsyc-software/qm15k—~2.3kAutomated safety check: PassMIT
Recipe Create Presentationgoogleworkspace/cli31k—~201Automated safety check: PassApache-2.0

Similar skills

  • Google Docs, Sheets and Slides Editing

    asgeirtj/system_prompts_leaks

    Guidance for creating and editing Google Docs, Sheets and Slides through connectors, with per-app API rules and helper scripts for positions, ranges and slide layout.

    69k GitHub stars~3.7k tokensUpdated today
    Documents & OfficeAuto-check: warnings
  • Google Workspace

    espennilsen/pi

    Manage Google Workspace via the gws CLI — Drive, Gmail, Sheets, Docs, Slides, People, Chat, Meet, Forms, and cross-service workflows.

    122 GitHub stars~3.4k tokensUpdated 18 days ago
    Documents & OfficeAuto-check passed
  • Operate across Google Drive, Docs, Sheets, and Slides as one workflow surface for plans, trackers, decks, and shared documents.

    276k GitHub starsUsed in 2 repos~684 tokens
    Documents & OfficeAuto-check passed
  • Google Drive Sheets

    yc-software/qm

    Find, read, export, edit, and manage the user's Google Drive, Docs, Sheets, and Slides through per-user OAuth.

    15k GitHub stars~2.3k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Recipe Create Presentation

    googleworkspace/cli

    Create a new Google Slides presentation and add initial slides.

    31k GitHub stars~201 tokensUpdated 3 days ago
    Documents & OfficeAuto-check passed
  • Gws Slides

    JetBrains/skills

    Official

    Google Slides: Read and write presentations. An agent skill from JetBrains/skills.

    366 GitHub starsUsed in 2 repos~444 tokens
    Documents & OfficeAuto-check passed

More from ai-analyst-lab/ai-analyst

All 43 skills in this repo
  • Always Compare

    ai-analyst-lab/ai-analyst

    Never present a metric or number in isolation; anchor every number to a comparison (prior period, benchmark, or another segment) or state that none is available.

    304 GitHub stars~1.4k tokensUpdated 9 days ago
    Auto-check passed
  • Archaeology

    ai-analyst-lab/ai-analyst

    Retrieve proven SQL patterns, table cheatsheets, and join patterns from .knowledge/query-archaeology/ so past work gets reused.

    304 GitHub stars~1.3k tokensUpdated 9 days ago
    Auto-check passed
  • Archive Analysis

    ai-analyst-lab/ai-analyst

    Save completed analyses to the knowledge system's analysis archive for future reference.

    304 GitHub stars~2.7k tokensUpdated 9 days ago
    Auto-check passed
  • Auth Preflight

    ai-analyst-lab/ai-analyst

    Verify Google Workspace MCP authentication at the start of any session that needs Google APIs (Docs, Slides, Drive).

    304 GitHub stars~3.1k tokensUpdated 9 days ago
    Auto-check passed
  • Causal

    ai-analyst-lab/ai-analyst

    Causal inference toolkit for when experiments are not possible: estimate treatment effects from observational data with assumption checks and mandatory caveats.

    304 GitHub stars~1.8k tokensUpdated 9 days ago
    Auto-check passed
  • Codex Review

    ai-analyst-lab/ai-analyst

    Independently validate the current analysis with a second model (OpenAI Codex).

    304 GitHub stars~3k tokensUpdated 9 days ago
    Auto-check passed

Questions about Chart To Drive

What does Chart To Drive do?

Standardized workflow for uploading local chart PNGs to Google Drive and making them available for insertion into Google Docs and Slides. Chart To Drive is an agent skill from ai-analyst-lab/ai-analyst. Standardized workflow for uploading local chart PNGs to Google Drive and making them available for insertion into Google Docs and Slides.

When should I use Chart To Drive?

Chart To Drive fits situations like: you need to insert charts into Google Docs; the google-doc-creator; google-slides-creator agents need chart URLs; building presentations.

How do I install Chart To Drive in Claude Code?

Run `npx skills add ai-analyst-lab/ai-analyst --skill chart-to-drive -a claude-code`. Or copy the skill folder (.claude/skills/chart-to-drive in ai-analyst-lab/ai-analyst) into .claude/skills/chart-to-drive in your project. Claude Code loads it when a task matches its description.

How do I install Chart To Drive in Codex?

Run `npx skills add ai-analyst-lab/ai-analyst --skill chart-to-drive -a codex`. Or copy the skill folder (.claude/skills/chart-to-drive in ai-analyst-lab/ai-analyst) into .agents/skills/chart-to-drive in your project. Codex loads it when a task matches its description.

Can I use Chart To Drive in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ai-analyst-lab/ai-analyst --skill chart-to-drive -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/chart-to-drive, .gemini/skills/chart-to-drive, .github/skills/chart-to-drive and .opencode/skills/chart-to-drive in your project.

What does Chart To Drive need to run?

SKILL.md names no scripts, command-line tools or credentials: Chart To Drive is instructions for the agent only. Our summary lists: Python 3.

Does Chart To Drive access the network?

SKILL.md names 1 domain. In commands or code: drive.google.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Chart To Drive safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Chart To Drive use?

Chart To Drive is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Chart To Drive use?

About 1.4k tokens (SKILL.md is roughly 5.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Chart To Drive?

Skills that share tags, products or a category with Chart To Drive: Google Docs, Sheets and Slides Editing (asgeirtj/system_prompts_leaks, 69k stars), Google Workspace (espennilsen/pi, 122 stars), Google Workspace Ops (affaan-m/ECC, 276k stars) and Google Drive Sheets (yc-software/qm, 15k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Chart To Drive?

ai-analyst-lab (a GitHub organization) maintains it in ai-analyst-lab/ai-analyst, which has 304 GitHub stars. The repository holds 43 skills in this directory. The repository was last updated on September 30, 2026.

Source: ai-analyst-lab/ai-analyst on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.