← Back to Skills Marketplace
tonglinmu

Google Drive Setup

by TonglinMu · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ⚠ suspicious
100
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install google-drive-setup
Description
Configure Google Drive mount on Linux via rclone + gog OAuth. Use when user wants to mount Google Drive as local filesystem, set up auto-mount on boot, or co...
README (SKILL.md)

Google Drive Setup

Mount Google Drive as a local filesystem using rclone, with OAuth via gog CLI.

Prerequisites

  • gog CLI installed and authenticated (see gog skill)
  • rclone installed
  • fuse / fusermount available

Step 1: Get OAuth Credentials from gog

gog already has a valid refresh token. Export it:

export GOG_KEYRING_PASSWORD=\x3Cyour-password>
gog auth tokens export \[email protected]> --out /tmp/gog_token.json --overwrite

Extract the refresh_token, client_id, and client_secret from:

  • /tmp/gog_token.json → refresh_token
  • ~/.config/gogcli/credentials.json → client_id, client_secret

Step 2: Configure rclone

Write ~/.config/rclone/rclone.conf:

[GoogleDrive]
type = drive
client_id = \x3Cclient_id>
client_secret = \x3Cclient_secret>
scope = drive
token = {"access_token":"","token_type":"Bearer","refresh_token":"\x3Crefresh_token>","expiry":"2026-01-01T00:00:00Z"}
team_drive =

Manually refresh the access token (rclone will auto-refresh thereafter):

curl -s -X POST https://oauth2.googleapis.com/token \
  -d client_id=\x3Cclient_id> \
  -d client_secret=\x3Cclient_secret> \
  -d refresh_token=\x3Crefresh_token> \
  -d grant_type=refresh_token

Update rclone.conf with the returned access_token and real expiry time.

Verify: rclone lsd GoogleDrive:

Step 3: Mount to Filesystem

mkdir -p /mnt/gdrive
rclone mount GoogleDrive: /mnt/gdrive \
  --daemon \
  --vfs-cache-mode full \
  --vfs-cache-max-size 2G \
  --dir-cache-time 72h \
  --allow-other

Step 4: Auto-mount on Boot (systemd)

Create /etc/systemd/system/rclone-gdrive.service:

[Unit]
Description=rclone mount Google Drive
After=network-online.target
Wants=network-online.target

[Service]
Type=notify
ExecStart=/usr/bin/rclone mount GoogleDrive: /mnt/gdrive --vfs-cache-mode full --vfs-cache-max-size 2G --dir-cache-time 72h --allow-other
ExecStop=/bin/fusermount -u /mnt/gdrive
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

Enable:

systemctl daemon-reload
systemctl enable rclone-gdrive
systemctl start rclone-gdrive

Troubleshooting

  • "empty token found": rclone config has no valid token. Re-do Step 2.
  • "token expired and no refresh token": refresh_token missing from rclone.conf.
  • "Object does not exist at path /": gog keyring backend issue. Switch to file: gog auth keyring file and set GOG_KEYRING_PASSWORD.
  • "access_denied" / "developer hasn't given you access": Add user as test user in Google Cloud Console → OAuth consent screen.
  • OAuth app type must be "Desktop app": Web-type credentials redirect_uri won't work for remote servers. Use Desktop type.
Usage Guidance
Before installing or running this skill: (1) Understand it will read sensitive local files (gog credentials, refresh token) and write them into ~/.config/rclone/rclone.conf — treat those files like secrets. (2) The script writes a systemd unit under /etc and runs systemctl enable/start, so you must run it with root (or via sudo) and it will persist across reboots. (3) The metadata fails to declare required binaries and the GOG_KEYRING_PASSWORD env var — verify you have gog, rclone, and fuse installed and that you trust the gog CLI and the source of this script. (4) If you prefer tighter control, run the steps manually (inspect the token export, rclone.conf contents, and systemd file) rather than executing the script as-is. (5) Ask the publisher to update metadata to list required binaries/env and to document privilege requirements; if you cannot verify the origin or trust the gog credentials, do not run the script on a production machine.
Capability Analysis
Type: OpenClaw Skill Name: google-drive-setup Version: 1.1.0 The skill automates Google Drive mounting by extracting OAuth tokens from the gog CLI and creating a systemd service. It performs high-risk actions including handling sensitive refresh tokens in a temporary file (/tmp/gog_token.json), writing to system-level directories (/etc/systemd/system/), and requiring the GOG_KEYRING_PASSWORD environment variable. While these behaviors are aligned with the stated purpose, the handling of secrets and the broad permissions required for system-level persistence via rclone-gdrive.service meet the threshold for suspicious classification.
Capability Tags
requires-oauth-token
Capability Assessment
Purpose & Capability
The skill's stated purpose is to configure a Google Drive mount via rclone and gog. The SKILL.md and script require the gog CLI, rclone, fuse/fusermount, and access to gog-stored credentials, but the package metadata lists no required binaries or environment variables. That mismatch (requirements used vs. declared) is an incoherence: someone installing this skill would legitimately need gog, rclone, and fuse and should be told so.
Instruction Scope
Instructions and the script explicitly export tokens from gog, read ~/.config/gogcli/credentials.json, write ~/.config/rclone/rclone.conf containing client_secret and refresh_token, call Google's token endpoint, and create/enable a systemd service under /etc/systemd/system. These actions are within the stated purpose but involve sensitive secrets and system-level changes. The SKILL.md and metadata do not clearly state that root/sudo is required to write /etc/systemd/system and run systemctl, and they instruct exporting token material to /tmp — a potential local exposure risk.
Install Mechanism
This is instruction-only with a bundled script; there is no network download of third-party code, no obscure URLs, and no package installation performed automatically. That keeps install risk low. The provided script will run local commands and edit system files when executed — which is expected for the feature but requires user attention.
Credentials
The skill uses and requires sensitive credentials (gog refresh_token, Google client_id/client_secret, possibly GOG_KEYRING_PASSWORD). Those are necessary for the task, but metadata did not declare any required env vars (it should have called out GOG_KEYRING_PASSWORD) and the SKILL.md references files/env that are not reflected in requires.env. The number and sensitivity of secrets is appropriate for the purpose, but the omission in metadata reduces transparency.
Persistence & Privilege
The script writes a systemd unit to /etc/systemd/system, enables and starts it (systemctl enable/start). Those are legitimate for auto-mounting but require root privileges and permanently modify system configuration. The skill does not declare or warn about elevated privileges; users should be aware this will change system state and run on boot.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install google-drive-setup
  3. After installation, invoke the skill by name or use /google-drive-setup
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.0
Removed sync section, focused on mount setup only
v1.0.0
Initial release: OAuth via gog, rclone mount, systemd auto-mount, cron sync
Metadata
Slug google-drive-setup
Version 1.1.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is Google Drive Setup?

Configure Google Drive mount on Linux via rclone + gog OAuth. Use when user wants to mount Google Drive as local filesystem, set up auto-mount on boot, or co... It is an AI Agent Skill for Claude Code / OpenClaw, with 100 downloads so far.

How do I install Google Drive Setup?

Run "/install google-drive-setup" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Google Drive Setup free?

Yes, Google Drive Setup is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Google Drive Setup support?

Google Drive Setup is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Google Drive Setup?

It is built and maintained by TonglinMu (@tonglinmu); the current version is v1.1.0.

💬 Comments