Install
$ agentstack add skill-mattmodecode-claude-skills-gdrive-bulk-download ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
gdrive-bulk-download
Bulk-download Google Docs, Google Slides decks, and existing PDF/DOCX/PPTX files stored in Google Drive, using gstack's headless browser ($B) so it works with restricted/managed accounts that can't install Claude's Drive connector or browser extensions.
Inputs
- A list of URLs, either pasted directly in the prompt (one per line, in
any order, surrounding text ignored) or referenced as a file path (one URL per line; blank lines and #-comments ignored).
- Optional output directory argument. Defaults to
~/Downloads.
Procedure
1. Collect URLs
Parse every https://docs.google.com/... or https://drive.google.com/... URL out of the prompt text, or read them from the referenced file (one per line, skip blank lines and lines starting with #).
2. Verify authentication
B=~/.claude/skills/gstack/browse/dist/browse
$B goto https://drive.google.com
$B text
Check the page text/title for signs of a logged-in session (account name, "My Drive", etc.) rather than a Google sign-in form. If not authenticated:
- Run
$B connectthen$B goto https://drive.google.comand
$B handoff "log into the restricted Google account" so the user can complete login/MFA manually, then $B resume.
/setup-browser-cookiesis generally unreliable for restricted/managed
accounts — observed failure mode: Google auth cookies (SID, HSID, SAPISID, etc.) get scoped to a country-TLD domain (e.g. .google.ca) that doesn't carry over to drive.google.com/docs.google.com. Prefer /connect-chrome + manual login for these accounts; only suggest cookie import for accounts known to work with it.
Do not proceed to downloads until an authenticated session is confirmed.
3. Classify and resolve each URL
For each input URL, extract the file ID (the segment after /d/) and resolve a download URL:
| Pattern | Resolved type | Download URL | |---|---|---| | docs.google.com/document/d/{ID} | Google Doc | https://docs.google.com/document/d/{ID}/export?format=pdf | | docs.google.com/presentation/d/{ID} | Google Slides | https://docs.google.com/presentation/d/{ID}/export/pdf | | docs.google.com/spreadsheets/d/{ID} | Google Sheet | unsupported — skip, record in manifest, do not download | | drive.google.com/file/d/{ID} (or open?id={ID}) | Drive file (PDF/DOCX/PPTX) | https://drive.google.com/uc?export=download&id={ID} | | Any other direct .pdf/.docx/.pptx URL | Direct file | use as-is |
Anything that doesn't match one of these is also unsupported.
4. Determine a filename
For Docs/Slides/Drive files, navigate to the original (view) URL and read the title:
$B goto ""
$B js "document.title"
Strip trailing suffixes like - Google Docs, - Google Slides, - Google Drive. Sanitize the remaining title for filesystem safety (replace / \ : * ? " | and control characters with -, collapse whitespace, trim). Append the correct extension:
- Docs/Slides →
.pdf - Drive file → keep its real extension (
.pdf/.docx/.pptx, inferred
from the original URL/filename or Content-Disposition)
If a title can't be determined, fall back to the file ID as the filename.
5. Create the output directory
mkdir -p "/"
` defaults to ~/Downloads`. Use one timestamp for the whole run — don't create a new folder per file.
6. Download each resolved file
$B download "" "/" --navigate
--navigate handles Drive's redirect/confirmation chains for larger files. If a download fails, record the error and continue with the rest — one failure must not abort the batch.
7. Write the manifest
Write /manifest.json as a JSON array, one entry per input URL:
{
"source_url": "...",
"resolved_type": "google_doc | google_slides | drive_file | unsupported",
"output_filename": "..." ,
"format": "pdf | docx | pptx | null",
"status": "ok | unsupported | error",
"error": "..."
}
8. Report to the user
Summarize: total processed, counts of ok / unsupported / error, the batch directory path, and the filenames downloaded. For any auth-shaped errors (redirected to a Google login page, 403s), suggest re-running /connect-chrome (or /setup-browser-cookies, for accounts known to work with it) and retrying just the failed URLs.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: MattModeCode
- Source: MattModeCode/claude-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.