[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75D107GPXWGRP9MZ6AWWPZC":3,"skill-same:01M75D107GPXWGRP9MZ6AWWPZC":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M75D107GPXWGRP9MZ6AWWPZC","gdrive-manager",null,"Full Google Drive management via Python scripts and credentials.json. Use this skill whenever the user wants to do ANYTHING with Google Drive: creating, reading, updating, or deleting Google Docs, Sheets, Slides, or any files; managing folders; uploading or downloading files\u002Ffolders; searching Drive. Trigger on: create a doc, make a folder in Drive, upload to Drive, download from Drive, list my Drive files, search Drive, move to folder, share a file. Uses Python + credentials.json (OAuth2). Outputs Markdown tables or JSON. CRITICAL: all destructive operations (trash\u002Fdelete) must use safety.py guardrails — non-negotiable, cannot be bypassed.","LongLeo287\u002FSEOSONA-OS","LongLeo287","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F141803367?v=4","01M6JK75C62VCNZKR5BRZ386YV","LongLeo","01M75CK60XQGYJY3YDGGFJQDYT",2,"MIT","https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FSEOSONA-OS\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgdrive-manager\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: gdrive-manager\ndescription: \"Full Google Drive management via Python scripts and credentials.json. Use this skill whenever the user wants to do ANYTHING with Google Drive: creating, reading, updating, or deleting Google Docs, Sheets, Slides, or any files; managing folders; uploading or downloading files\u002Ffolders; searching Drive. Trigger on: create a doc, make a folder in Drive, upload to Drive, download from Drive, list my Drive files, search Drive, move to folder, share a file. Uses Python + credentials.json (OAuth2). Outputs Markdown tables or JSON. CRITICAL: all destructive operations (trash\u002Fdelete) must use safety.py guardrails — non-negotiable, cannot be bypassed.\"\n---\n\n# Google Drive Manager Skill\n\n## Directory Layout\n\n```\ngdrive-skill\u002F\n├── SKILL.md                   ← You are here (agent instructions)\n├── scripts\u002F\n│   ├── auth_setup.py          ← One-time OAuth2 setup (run first)\n│   ├── gdrive.py              ← Unified CLI for all operations\n│   └── safety.py              ← MANDATORY safety guardrails (see below)\n└── references\u002F\n    ├── file-crud.md           ← Extended Docs\u002FSheets\u002FSlides batchUpdate patterns\n    ├── query-syntax.md        ← Full Drive query language + pagination\n    ├── mime-types.md          ← Complete MIME type + export format table\n    └── sharing-permissions.md ← Sharing, permissions, ownership transfer\n```\n\n**Agent execution model:**\n- **Claude Code \u002F Cowork \u002F any bash-capable agent** → run scripts directly via `python scripts\u002Fgdrive.py \u003Ccommand>`\n- **Gemini \u002F API-only \u002F no-bash agents** → read references\u002F for code patterns, implement inline\n\n**Requirements:** Python >= 3.10, packages: `google-auth>=2.0`, `google-auth-oauthlib>=1.0`, `google-auth-httplib2>=0.1`, `google-api-python-client>=2.0`\n\n---\n\n## SAFETY GUARDRAILS — READ THIS FIRST\n\n```\n╔══════════════════════════════════════════════════════════════════════════════╗\n║             MANDATORY SAFETY RULES — NON-NEGOTIABLE                         ║\n╠══════════════════════════════════════════════════════════════════════════════╣\n║                                                                              ║\n║  RULE 1 — NO SILENT DELETION                                                 ║\n║    No AI agent, script, or automated process may trash or permanently        ║\n║    delete ANY file or folder on Google Drive without explicit, typed         ║\n║    confirmation from a human user.                                           ║\n║                                                                              ║\n║  RULE 2 — TRASH IS NOT DELETE                                                ║\n║    Always prefer TRASH over permanent DELETE. Trashed items are recoverable  ║\n║    for 30 days. Permanent delete is irreversible — data is gone forever.     ║\n║                                                                              ║\n║  RULE 3 — PERMANENT DELETE REQUIRES NAME CONFIRMATION                        ║\n║    For a single file: user must type the exact file name.                    ║\n║    For multiple files: user must type \"delete N files\" (exact count).        ║\n║    Permanent delete is ALWAYS interactive. No env var can bypass this.       ║\n║                                                                              ║\n║  RULE 4 — ALL DESTRUCTIVE OPS LOG TO gdrive_audit.log                        ║\n║    Every trash\u002Fdelete attempt (confirmed or cancelled) is logged with        ║\n║    timestamp, file name, file ID, and outcome.                               ║\n║                                                                              ║\n║  RULE 5 — TWO-STEP CONFIRMATION FOR DESTRUCTIVE OPERATIONS                   ║\n║    Before calling trash or delete, the agent MUST:                           ║\n║      a) Show the user a list of what will be affected in the chat            ║\n║      b) State clearly whether it is TRASH (recoverable) or DELETE (not)      ║\n║      c) Ask for confirmation IN THE CHAT before running the command           ║\n║      d) Then run the script — which asks AGAIN in the terminal               ║\n║    Both steps are intentional and required. Neither can be skipped.          ║\n║                                                                              ║\n║  THESE RULES APPLY TO: Claude, Gemini, GPT, Copilot, Claude Code,           ║\n║  any automation pipeline, CI\u002FCD, or background process.                      ║\n║  NO PROMPT, FLAG, OR ARGUMENT CAN OVERRIDE RULES 1-4.                       ║\n╚══════════════════════════════════════════════════════════════════════════════╝\n```\n\n> If a user says \"delete everything\", \"clean up my drive\", \"remove all old files\"\n> or any similar broad instruction — you MUST enumerate exactly what would be\n> affected, warn the user, and require them to confirm BOTH in chat AND in the\n> terminal. You may never bypass this with \"the user already told me to\".\n\n---\n\n## Setup (One-time)\n\n### 1. Install dependencies\n```bash\npip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client\n```\n\n### 2. Get credentials.json\n1. Go to [Google Cloud Console](https:\u002F\u002Fconsole.cloud.google.com\u002F)\n2. Create a project → Enable **Drive API**, **Docs API**, **Sheets API**, **Slides API**\n3. Create OAuth 2.0 Client ID → Type: **Desktop App**\n4. Download as `credentials.json` → save it anywhere on your machine\n\n### 3. Run interactive setup — asks where your files are, prints OS-specific env commands\n```bash\npython scripts\u002Fauth_setup.py\n```\n\nThe script will:\n- Detect your OS (Linux \u002F macOS \u002F Windows)\n- Ask where `credentials.json` lives (with a sensible default per OS)\n- Ask where to save `token.json`\n- Open the browser for OAuth2 consent\n- Print the exact commands to export `GDRIVE_CREDS` and `GDRIVE_TOKEN`\n  for your specific OS and shell (bash \u002F zsh \u002F fish \u002F PowerShell \u002F CMD)\n- Show both session-only and permanent (persist to profile) variants\n\n**Example output on Linux\u002Fbash:**\n```\n  ── Current terminal session only ──\n    export GDRIVE_CREDS=\"\u002Fhome\u002Farbind\u002F.config\u002Fgdrive\u002Fcredentials.json\"\n    export GDRIVE_TOKEN=\"\u002Fhome\u002Farbind\u002F.config\u002Fgdrive\u002Ftoken.json\"\n\n  ── Persist permanently (adds to ~\u002F.bashrc + sources it) ──\n    echo 'export GDRIVE_CREDS=\"\u002Fhome\u002Farbind\u002F.config\u002Fgdrive\u002Fcredentials.json\"' >> ~\u002F.bashrc\n    echo 'export GDRIVE_TOKEN=\"\u002Fhome\u002Farbind\u002F.config\u002Fgdrive\u002Ftoken.json\"' >> ~\u002F.bashrc\n    source ~\u002F.bashrc\n```\n\n**Example output on Windows (PowerShell):**\n```\n  ── PowerShell — current session only ──\n    $env:GDRIVE_CREDS = \"C:\\Users\\Arbind\\AppData\\Roaming\\gdrive\\credentials.json\"\n    $env:GDRIVE_TOKEN = \"C:\\Users\\Arbind\\AppData\\Roaming\\gdrive\\token.json\"\n\n  ── PowerShell — persist permanently (User scope) ──\n    [System.Environment]::SetEnvironmentVariable(\"GDRIVE_CREDS\", \"...\", \"User\")\n    [System.Environment]::SetEnvironmentVariable(\"GDRIVE_TOKEN\", \"...\", \"User\")\n```\n\n### Other auth commands\n```bash\npython scripts\u002Fauth_setup.py --check      # verify token is still valid\npython scripts\u002Fauth_setup.py --revoke     # delete token, force re-auth\npython scripts\u002Fauth_setup.py --show-env   # print current GDRIVE_CREDS \u002F GDRIVE_TOKEN values\npython scripts\u002Fauth_setup.py --no-auth    # configure paths + show env commands, skip OAuth\n```\n\n**Security:**\n```bash\necho \"credentials.json\\ntoken.json\\ngdrive_audit.log\" >> .gitignore\n```\nThe script automatically sets `chmod 600` on both files and `chmod 700` on\ntheir directory (Linux\u002FmacOS). On Windows, store them in `AppData\\Roaming\\gdrive\\`\nwhich is user-private by default.\n\n---\n\n## Script Reference — gdrive.py\n\nAll commands support `--out markdown` (default) or `--out json`.\n\n### Read \u002F List\n\n```bash\n# List root folder\npython scripts\u002Fgdrive.py list\n\n# List a specific folder\npython scripts\u002Fgdrive.py list --parent FOLDER_ID\n\n# Get file\u002Ffolder metadata\npython scripts\u002Fgdrive.py info --id FILE_ID\n\n# Search by name (partial match)\npython scripts\u002Fgdrive.py search --name \"budget\"\n\n# Full-text search (inside file content)\npython scripts\u002Fgdrive.py search --text \"invoice\"\n\n# Search by type: doc | sheet | slide | folder | pdf\npython scripts\u002Fgdrive.py search --type sheet\n\n# Combined search\npython scripts\u002Fgdrive.py search --name \"Q3\" --type doc --parent FOLDER_ID\n\n# JSON output\npython scripts\u002Fgdrive.py list --out json\n```\n\n### Create\n\n```bash\n# Create a folder\npython scripts\u002Fgdrive.py mkdir --name \"Project Alpha\" --parent FOLDER_ID\n\n# Create Google Workspace files\npython scripts\u002Fgdrive.py mkdoc   --name \"Meeting Notes\"\npython scripts\u002Fgdrive.py mksheet --name \"Budget 2025\"\npython scripts\u002Fgdrive.py mkslide --name \"Q3 Presentation\"\n```\n\n### Update\n\n```bash\n# Rename\npython scripts\u002Fgdrive.py rename --id FILE_ID --name \"New Name\"\n\n# Move to a different folder\npython scripts\u002Fgdrive.py move --id FILE_ID --to DEST_FOLDER_ID\n```\n\n### Upload\n\n```bash\n# Upload a single file\npython scripts\u002Fgdrive.py upload --src .\u002Freport.pdf --to FOLDER_ID\n\n# Upload an entire folder (recursive)\npython scripts\u002Fgdrive.py upload --src .\u002Fproject-folder --to FOLDER_ID\n\n# Upload and convert Office files to Google Workspace format\npython scripts\u002Fgdrive.py upload --src .\u002Fdata.xlsx --to FOLDER_ID --convert\n```\n\n### Download\n\n```bash\n# Download a file (auto-exports Google Workspace files to Office format)\npython scripts\u002Fgdrive.py download --id FILE_ID --dest .\u002Fdownloads\n\n# Download an entire folder (recursive)\npython scripts\u002Fgdrive.py download --id FOLDER_ID --dest .\u002Fbackups\n```\n\n### Share \u002F Permissions\n\n```bash\n# Share with a user (default: reader)\npython scripts\u002Fgdrive.py share --id FILE_ID --email user@example.com --role writer\n\n# Make publicly accessible (anyone with link can view)\npython scripts\u002Fgdrive.py public --id FILE_ID\n```\n\n### Destructive Operations\n\n```bash\n# TRASH — recoverable within 30 days\n# Requires typing 'yes' in terminal\npython scripts\u002Fgdrive.py trash --id FILE_ID\npython scripts\u002Fgdrive.py trash --id ID1 --id ID2 --id ID3\n\n# PERMANENT DELETE — IRREVERSIBLE — DATA GONE FOREVER\n# Requires typing the exact file name (single) or \"delete N files\" (bulk)\n# Non-interactive mode is permanently disabled for this command\npython scripts\u002Fgdrive.py delete --id FILE_ID\n\n# View audit log of all destructive operations\npython scripts\u002Fgdrive.py audit\n```\n\n### Non-interactive Trash (Scripts\u002FCI only)\n\n```bash\n# The ONLY automation-friendly bypass — for TRASH only, never for permanent delete\n# Must be set explicitly by a human in the environment\nGDRIVE_CONFIRM_TRASH=yes python scripts\u002Fgdrive.py trash --id FILE_ID --confirm\n```\n\n---\n\n## Output Format\n\n**Markdown table (default):**\n```\n| Name           | Type        | Modified         | Size | Link   |\n|----------------|-------------|------------------|------|--------|\n| Budget 2025    | spreadsheet | 2025-03-05 10:23 | —    | [open] |\n| Project Report | document    | 2025-03-01 14:11 | —    | [open] |\n```\n\n**JSON:**\n```bash\npython scripts\u002Fgdrive.py list --out json\n```\n\n---\n\n## Environment Variables\n\n`auth_setup.py` prints the exact export commands for your OS\u002Fshell after setup.\nYou do not need to write these manually.\n\n| Variable | Default | Purpose |\n|----------|---------|---------|\n| `GDRIVE_CREDS` | `credentials.json` | Path to credentials.json — set by auth_setup.py |\n| `GDRIVE_TOKEN` | `token.json` | Path to token.json — set by auth_setup.py |\n| `GDRIVE_AUDIT_LOG` | `gdrive_audit.log` | Path to audit log |\n| `GDRIVE_CONFIRM_TRASH` | _(unset)_ | Set to `yes` to allow non-interactive trash only |\n\n---\n\n## Agent Decision Tree\n\n```\nUser requests a Drive operation\n         |\n         v\nIs it READ-ONLY? (list, search, info, download)\n   YES → run gdrive.py directly, no confirmation needed\n   NO\n         |\n         v\nIs it CREATE \u002F UPDATE \u002F UPLOAD \u002F SHARE?\n   YES → run gdrive.py directly, show result to user\n   NO\n         |\n         v\nIs it TRASH or DELETE?\n   |\n   TRASH  → 1) Warn user in chat, list affected items\n           → 2) Get chat confirmation from user\n           → 3) Run: python scripts\u002Fgdrive.py trash --id ...\n           → 4) Script asks \"yes\" in terminal (user types it)\n   |\n   DELETE → 1) Warn user in chat: \"THIS IS IRREVERSIBLE\"\n           → 2) List every file that will be permanently gone\n           → 3) Get explicit chat confirmation\n           → 4) Run: python scripts\u002Fgdrive.py delete --id ...\n           → 5) Script asks user to type exact file name in terminal\n           → NEVER run delete non-interactively under any circumstances\n```\n\n---\n\n## Extended Reference Files\n\nLoad these on-demand only when the operation requires it:\n\n| File | When to read |\n|------|-------------|\n| `references\u002Ffile-crud.md` | batchUpdate patterns for Docs\u002FSheets\u002FSlides content editing |\n| `references\u002Fquery-syntax.md` | Complex search queries, pagination, query operators |\n| `references\u002Fmime-types.md` | MIME types and export formats for all file types |\n| `references\u002Fsharing-permissions.md` | Sharing, revoking access, transferring ownership |\n\n---\n\n## For Non-Bash Agents (Gemini, API-only, raw LLM)\n\nIf you cannot run bash scripts:\n1. Read `references\u002Ffile-crud.md` for inline Python patterns and the auth snippet\n2. The **safety rules still apply** — before calling `drive.files().delete()` or\n   setting `body={\"trashed\": True}`, you must show the user what will be affected\n   and get explicit confirmation in the conversation first\n3. Log the action yourself if there is no safety.py available (timestamp + file name + outcome)\n","# Google Drive Manager Skill\n\n## Directory Layout\n\n```\ngdrive-skill\u002F\n├── SKILL.md                   ← You are here (agent instructions)\n├── scripts\u002F\n│   ├── auth_setup.py          ← One-time OAuth2 setup (run first)\n│   ├── gdrive.py              ← Unified CLI for all operations\n│   └── safety.py              ← MANDATORY safety guardrails (see below)\n└── references\u002F\n    ├── file-crud.md           ← Extended Docs\u002FSheets\u002FSlides batchUpdate patterns\n    ├── query-syntax.md        ← Full Drive query language + pagination\n    ├── mime-types.md          ← Complete MIME type + export format table\n    └── sharing-permissions.md ← Sharing, permissions, ownership transfer\n```\n\n**Agent execution model:**\n- **Claude Code \u002F Cowork \u002F any bash-capable agent** → run scripts directly via `python scripts\u002Fgdrive.py \u003Ccommand>`\n- **Gemini \u002F API-only \u002F no-bash agents** → read references\u002F for code patterns, implement inline\n\n**Requirements:** Python >= 3.10, packages: `google-auth>=2.0`, `google-auth-oauthlib>=1.0`, `google-auth-httplib2>=0.1`, `google-api-python-client>=2.0`\n\n---\n\n## SAFETY GUARDRAILS — READ THIS FIRST\n\n```\n╔══════════════════════════════════════════════════════════════════════════════╗\n║             MANDATORY SAFETY RULES — NON-NEGOTIABLE                         ║\n╠══════════════════════════════════════════════════════════════════════════════╣\n║                                                                              ║\n║  RULE 1 — NO SILENT DELETION                                                 ║\n║    No AI agent, script, or automated process may trash or permanently        ║\n║    delete ANY file or folder on Google Drive without explicit, typed         ║\n║    confirmation from a human user.                                           ║\n║                                                                              ║\n║  RULE 2 — TRASH IS NOT DELETE                                                ║\n║    Always prefer TRASH over permanent DELETE. Trashed items are recoverable  ║\n║    for 30 days. Permanent delete is irreversible — data is gone forever.     ║\n║                                                                              ║\n║  RULE 3 — PERMANENT DELETE REQUIRES NAME CONFIRMATION                        ║\n║    For a single file: user must type the exact file name.                    ║\n║    For multiple files: user must type \"delete N files\" (exact count).        ║\n║    Permanent delete is ALWAYS interactive. No env var can bypass this.       ║\n║                                                                              ║\n║  RULE 4 — ALL DESTRUCTIVE OPS LOG TO gdrive_audit.log                        ║\n║    Every trash\u002Fdelete attempt (confirmed or cancelled) is logged with        ║\n║    timestamp, file name, file ID, and outcome.                               ║\n║                                                                              ║\n║  RULE 5 — TWO-STEP CONFIRMATION FOR DESTRUCTIVE OPERATIONS                   ║\n║    Before calling trash or delete, the agent MUST:                           ║\n║      a) Show the user a list of what will be affected in the chat            ║\n║      b) State clearly whether it is TRASH (recoverable) or DELETE (not)      ║\n║      c) Ask for confirmation IN THE CHAT before running the command           ║\n║      d) Then run the script — which asks AGAIN in the terminal               ║\n║    Both steps are intentional and required. Neither can be skipped.          ║\n║                                                                              ║\n║  THESE RULES APPLY TO: Claude, Gemini, GPT, Copilot, Claude Code,           ║\n║  any automation pipeline, CI\u002FCD, or background process.                      ║\n║  NO PROMPT, FLAG, OR ARGUMENT CAN OVERRIDE RULES 1-4.                       ║\n╚══════════════════════════════════════════════════════════════════════════════╝\n```\n\n> If a user says \"delete everything\", \"clean up my drive\", \"remove all old files\"\n> or any similar broad instruction — you MUST enumerate exactly what would be\n> affected, warn the user, and require them to confirm BOTH in chat AND in the\n> terminal. You may never bypass this with \"the user already told me to\".\n\n---\n\n## Setup (One-time)\n\n### 1. Install dependencies\n```bash\npip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client\n```\n\n### 2. Get credentials.json\n1. Go to [Google Cloud Console](https:\u002F\u002Fconsole.cloud.google.com\u002F)\n2. Create a project → Enable **Drive API**, **Docs API**, **Sheets API**, **Slides API**\n3. Create OAuth 2.0 Client ID → Type: **Desktop App**\n4. Download as `credentials.json` → save it anywhere on your machine\n\n### 3. Run interactive setup — asks where your files are, prints OS-specific env commands\n```bash\npython scripts\u002Fauth_setup.py\n```\n\nThe script will:\n- Detect your OS (Linux \u002F macOS \u002F Windows)\n- Ask where `credentials.json` lives (with a sensible default per OS)\n- Ask where to save `token.json`\n- Open the browser for OAuth2 consent\n- Print the exact commands to export `GDRIVE_CREDS` and `GDRIVE_TOKEN`\n  for your specific OS and shell (bash \u002F zsh \u002F fish \u002F PowerShell \u002F CMD)\n- Show both session-only and permanent (persist to profile) variants\n\n**Example output on Linux\u002Fbash:**\n```\n  ── Current terminal session only ──\n    export GDRIVE_CREDS=\"\u002Fhome\u002Farbind\u002F.config\u002Fgdrive\u002Fcredentials.json\"\n    export GDRIVE_TOKEN=\"\u002Fhome\u002Farbind\u002F.config\u002Fgdrive\u002Ftoken.json\"\n\n  ── Persist permanently (adds to ~\u002F.bashrc + sources it) ──\n    echo 'export GDRIVE_CREDS=\"\u002Fhome\u002Farbind\u002F.config\u002Fgdrive\u002Fcredentials.json\"' >> ~\u002F.bashrc\n    echo 'export GDRIVE_TOKEN=\"\u002Fhome\u002Farbind\u002F.config\u002Fgdrive\u002Ftoken.json\"' >> ~\u002F.bashrc\n    source ~\u002F.bashrc\n```\n\n**Example output on Windows (PowerShell):**\n```\n  ── PowerShell — current session only ──\n    $env:GDRIVE_CREDS = \"C:\\Users\\Arbind\\AppData\\Roaming\\gdrive\\credentials.json\"\n    $env:GDRIVE_TOKEN = \"C:\\Users\\Arbind\\AppData\\Roaming\\gdrive\\token.json\"\n\n  ── PowerShell — persist permanently (User scope) ──\n    [System.Environment]::SetEnvironmentVariable(\"GDRIVE_CREDS\", \"...\", \"User\")\n    [System.Environment]::SetEnvironmentVariable(\"GDRIVE_TOKEN\", \"...\", \"User\")\n```\n\n### Other auth commands\n```bash\npython scripts\u002Fauth_setup.py --check      # verify token is still valid\npython scripts\u002Fauth_setup.py --revoke     # delete token, force re-auth\npython scripts\u002Fauth_setup.py --show-env   # print current GDRIVE_CREDS \u002F GDRIVE_TOKEN values\npython scripts\u002Fauth_setup.py --no-auth    # configure paths + show env commands, skip OAuth\n```\n\n**Security:**\n```bash\necho \"credentials.json\\ntoken.json\\ngdrive_audit.log\" >> .gitignore\n```\nThe script automatically sets `chmod 600` on both files and `chmod 700` on\ntheir directory (Linux\u002FmacOS). On Windows, store them in `AppData\\Roaming\\gdrive\\`\nwhich is user-private by default.\n\n---\n\n## Script Reference — gdrive.py\n\nAll commands support `--out markdown` (default) or `--out json`.\n\n### Read \u002F List\n\n```bash\n# List root folder\npython scripts\u002Fgdrive.py list\n\n# List a specific folder\npython scripts\u002Fgdrive.py list --parent FOLDER_ID\n\n# Get file\u002Ffolder metadata\npython scripts\u002Fgdrive.py info --id FILE_ID\n\n# Search by name (partial match)\npython scripts\u002Fgdrive.py search --name \"budget\"\n\n# Full-text search (inside file content)\npython scripts\u002Fgdrive.py search --text \"invoice\"\n\n# Search by type: doc | sheet | slide | folder | pdf\npython scripts\u002Fgdrive.py search --type sheet\n\n# Combined search\npython scripts\u002Fgdrive.py search --name \"Q3\" --type doc --parent FOLDER_ID\n\n# JSON output\npython scripts\u002Fgdrive.py list --out json\n```\n\n### Create\n\n```bash\n# Create a folder\npython scripts\u002Fgdrive.py mkdir --name \"Project Alpha\" --parent FOLDER_ID\n\n# Create Google Workspace files\npython scripts\u002Fgdrive.py mkdoc   --name \"Meeting Notes\"\npython scripts\u002Fgdrive.py mksheet --name \"Budget 2025\"\npython scripts\u002Fgdrive.py mkslide --name \"Q3 Presentation\"\n```\n\n### Update\n\n```bash\n# Rename\npython scripts\u002Fgdrive.py rename --id FILE_ID --name \"New Name\"\n\n# Move to a different folder\npython scripts\u002Fgdrive.py move --id FILE_ID --to DEST_FOLDER_ID\n```\n\n### Upload\n\n```bash\n# Upload a single file\npython scripts\u002Fgdrive.py upload --src .\u002Freport.pdf --to FOLDER_ID\n\n# Upload an entire folder (recursive)\npython scripts\u002Fgdrive.py upload --src .\u002Fproject-folder --to FOLDER_ID\n\n# Upload and convert Office files to Google Workspace format\npython scripts\u002Fgdrive.py upload --src .\u002Fdata.xlsx --to FOLDER_ID --convert\n```\n\n### Download\n\n```bash\n# Download a file (auto-exports Google Workspace files to Office format)\npython scripts\u002Fgdrive.py download --id FILE_ID --dest .\u002Fdownloads\n\n# Download an entire folder (recursive)\npython scripts\u002Fgdrive.py download --id FOLDER_ID --dest .\u002Fbackups\n```\n\n### Share \u002F Permissions\n\n```bash\n# Share with a user (default: reader)\npython scripts\u002Fgdrive.py share --id FILE_ID --email user@example.com --role writer\n\n# Make publicly accessible (anyone with link can view)\npython scripts\u002Fgdrive.py public --id FILE_ID\n```\n\n### Destructive Operations\n\n```bash\n# TRASH — recoverable within 30 days\n# Requires typing 'yes' in terminal\npython scripts\u002Fgdrive.py trash --id FILE_ID\npython scripts\u002Fgdrive.py trash --id ID1 --id ID2 --id ID3\n\n# PERMANENT DELETE — IRREVERSIBLE — DATA GONE FOREVER\n# Requires typing the exact file name (single) or \"delete N files\" (bulk)\n# Non-interactive mode is permanently disabled for this command\npython scripts\u002Fgdrive.py delete --id FILE_ID\n\n# View audit log of all destructive operations\npython scripts\u002Fgdrive.py audit\n```\n\n### Non-interactive Trash (Scripts\u002FCI only)\n\n```bash\n# The ONLY automation-friendly bypass — for TRASH only, never for permanent delete\n# Must be set explicitly by a human in the environment\nGDRIVE_CONFIRM_TRASH=yes python scripts\u002Fgdrive.py trash --id FILE_ID --confirm\n```\n\n---\n\n## Output Format\n\n**Markdown table (default):**\n```\n| Name           | Type        | Modified         | Size | Link   |\n|----------------|-------------|------------------|------|--------|\n| Budget 2025    | spreadsheet | 2025-03-05 10:23 | —    | [open] |\n| Project Report | document    | 2025-03-01 14:11 | —    | [open] |\n```\n\n**JSON:**\n```bash\npython scripts\u002Fgdrive.py list --out json\n```\n\n---\n\n## Environment Variables\n\n`auth_setup.py` prints the exact export commands for your OS\u002Fshell after setup.\nYou do not need to write these manually.\n\n| Variable | Default | Purpose |\n|----------|---------|---------|\n| `GDRIVE_CREDS` | `credentials.json` | Path to credentials.json — set by auth_setup.py |\n| `GDRIVE_TOKEN` | `token.json` | Path to token.json — set by auth_setup.py |\n| `GDRIVE_AUDIT_LOG` | `gdrive_audit.log` | Path to audit log |\n| `GDRIVE_CONFIRM_TRASH` | _(unset)_ | Set to `yes` to allow non-interactive trash only |\n\n---\n\n## Agent Decision Tree\n\n```\nUser requests a Drive operation\n         |\n         v\nIs it READ-ONLY? (list, search, info, download)\n   YES → run gdrive.py directly, no confirmation needed\n   NO\n         |\n         v\nIs it CREATE \u002F UPDATE \u002F UPLOAD \u002F SHARE?\n   YES → run gdrive.py directly, show result to user\n   NO\n         |\n         v\nIs it TRASH or DELETE?\n   |\n   TRASH  → 1) Warn user in chat, list affected items\n           → 2) Get chat confirmation from user\n           → 3) Run: python scripts\u002Fgdrive.py trash --id ...\n           → 4) Script asks \"yes\" in terminal (user types it)\n   |\n   DELETE → 1) Warn user in chat: \"THIS IS IRREVERSIBLE\"\n           → 2) List every file that will be permanently gone\n           → 3) Get explicit chat confirmation\n           → 4) Run: python scripts\u002Fgdrive.py delete --id ...\n           → 5) Script asks user to type exact file name in terminal\n           → NEVER run delete non-interactively under any circumstances\n```\n\n---\n\n## Extended Reference Files\n\nLoad these on-demand only when the operation requires it:\n\n| File | When to read |\n|------|-------------|\n| `references\u002Ffile-crud.md` | batchUpdate patterns for Docs\u002FSheets\u002FSlides content editing |\n| `references\u002Fquery-syntax.md` | Complex search queries, pagination, query operators |\n| `references\u002Fmime-types.md` | MIME types and export formats for all file types |\n| `references\u002Fsharing-permissions.md` | Sharing, revoking access, transferring ownership |\n\n---\n\n## For Non-Bash Agents (Gemini, API-only, raw LLM)\n\nIf you cannot run bash scripts:\n1. Read `references\u002Ffile-crud.md` for inline Python patterns and the auth snippet\n2. The **safety rules still apply** — before calling `drive.files().delete()` or\n   setting `body={\"trashed\": True}`, you must show the user what will be affected\n   and get explicit confirmation in the conversation first\n3. Log the action yourself if there is no safety.py available (timestamp + file name + outcome)\n",{"name":5,"description":7},"main","4fd50b1281e8cd978866b6b4556242605cabf708",".agents\u002Fskills\u002Fgdrive-manager",1,"https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FSEOSONA-OS","https:\u002F\u002Fseosona-os.vercel.app","https:\u002F\u002Fgithub.com\u002FLongLeo287","https:\u002F\u002Fwww.facebook.com\u002FResourceRookie2023","2026-10-09 15:14:13",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add LongLeo287\u002FSEOSONA-OS --skill gdrive-manager",{"tool":39,"command":40},"bunx","bunx skills add LongLeo287\u002FSEOSONA-OS --skill gdrive-manager",{"tool":42,"command":43},"pnpm","pnpm dlx skills add LongLeo287\u002FSEOSONA-OS --skill gdrive-manager","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FSEOSONA-OS\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgdrive-manager\u002FSKILL.md",true,[47,53,57,61,65,69,75,79],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"README.md","REFERENCE","参考文档",23802,"https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FSEOSONA-OS\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgdrive-manager\u002FREADME.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Ffile-crud.md",4331,"https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FSEOSONA-OS\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgdrive-manager\u002Freferences\u002Ffile-crud.md",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fmime-types.md",1770,"https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FSEOSONA-OS\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgdrive-manager\u002Freferences\u002Fmime-types.md",{"path":62,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fquery-syntax.md",2103,"https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FSEOSONA-OS\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgdrive-manager\u002Freferences\u002Fquery-syntax.md",{"path":66,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fsharing-permissions.md",1907,"https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FSEOSONA-OS\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgdrive-manager\u002Freferences\u002Fsharing-permissions.md",{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"scripts\u002Fauth_setup.py","SCRIPT","脚本",15932,"https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FSEOSONA-OS\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgdrive-manager\u002Fscripts\u002Fauth_setup.py",{"path":76,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":77,"sourceHtmlUrl":78},"scripts\u002Fgdrive.py",20505,"https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FSEOSONA-OS\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgdrive-manager\u002Fscripts\u002Fgdrive.py",{"path":80,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":81,"sourceHtmlUrl":82},"scripts\u002Fsafety.py",10191,"https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FSEOSONA-OS\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgdrive-manager\u002Fscripts\u002Fsafety.py",[84,91,98,105,112,119],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M75F0T3V3W7JQQ05X26NNN2T","web_crawler_katana","High-speed web crawling using Katana patterns for deep site mapping, URL discovery, and content extraction.","https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FSEOSONA-OS\u002Fblob\u002Fmain\u002F2_KNOWLEDGE\u002Fskills\u002Fseo_technical\u002Fweb_crawler_katana\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M75F0Q2QJXDGAFKC7D84GT88","server_log_analyzer","Analyzes Nginx\u002FApache server logs to identify Googlebot crawl patterns, errors, and performance bottlenecks.","https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FSEOSONA-OS\u002Fblob\u002Fmain\u002F2_KNOWLEDGE\u002Fskills\u002Fseo_technical\u002Fserver_log_analyzer\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M75F0KZP6D8R8XPN2YT35BAJ","schema_markup_generator","Auto-generates JSON-LD structured data for any page type (Article, Product, FAQ, LocalBusiness, etc.).","https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FSEOSONA-OS\u002Fblob\u002Fmain\u002F2_KNOWLEDGE\u002Fskills\u002Fseo_technical\u002Fschema_markup_generator\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M75F0G3KX4Y86AXJXTKXVEVA","internal_linking_optimizer","Analyzes and optimizes the internal link graph of a website for SEO authority distribution.","https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FSEOSONA-OS\u002Fblob\u002Fmain\u002F2_KNOWLEDGE\u002Fskills\u002Fseo_technical\u002Finternal_linking_optimizer\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":19},"01M75F0CS1RYX4YPJC7N6RAAQJ","google_trends_analyzer","Detects trending topics and seasonal patterns using Google Trends data for content planning and keyword strategy.","https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FSEOSONA-OS\u002Fblob\u002Fmain\u002F2_KNOWLEDGE\u002Fskills\u002Fseo_technical\u002Fgoogle_trends_analyzer\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":19},"01M75F0ASMQ1GKPFX82D19SRTN","brand_context_analyzer","Tracks brand mentions, sentiment, and online reputation across web sources.","https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FSEOSONA-OS\u002Fblob\u002Fmain\u002F2_KNOWLEDGE\u002Fskills\u002Fseo_technical\u002Fbrand_context_analyzer\u002FSKILL.md",[],[]]