
A straightforward recipe for creating nested Google Drive folder hierarchies and organizing existing files into them. You'll use this when migrating messy Drive storage or setting up project structures. It walks through creating parent folders, adding subfolders with proper parent relationships, moving files between locations, and verifying the final structure with list commands. The recipe handles the typical parent ID juggling that makes Drive organization tedious when done manually. Works well for batch organization tasks, though you'll still need to identify which files go where based on your own logic.
$ npx -y skills add googleworkspace/cli --skill recipe-organize-drive-folder --agent claude-codeInstalls into .claude/skills of the current project.
PREREQUISITE: Load the following skills to execute this recipe:
gws-drive
Create a Google Drive folder structure and move files into the right locations.
gws drive files create --json '{"name": "Q2 Project", "mimeType": "application/vnd.google-apps.folder"}'gws drive files create --json '{"name": "Documents", "mimeType": "application/vnd.google-apps.folder", "parents": ["PARENT_FOLDER_ID"]}'gws drive files update --params '{"fileId": "FILE_ID", "addParents": "FOLDER_ID", "removeParents": "OLD_PARENT_ID"}'gws drive files list --params '{"q": "FOLDER_ID in parents"}' --format tableSponsors