/qfs:qfs-gdrivefrom qfs
Use when a task needs to read, write, or organize Google Drive through qfs — list and navigate My Drive and Shared Drives, download a file's bytes, upload, create folders, read Google-native docs, copy, and trash items via the /drive path and its pipe-SQL queries. Covers connecting a Google account (shared with Gmail) and the folder/file/blob surface.
Ships in qfs. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Your whole Drive becomes a set of queryable paths. Folders are directories, files are blobs, and one pipe-SQL language lists, searches, downloads, uploads, organizes, and trashes — the same verbs you already use on a mailbox, a database, or a folder of files.
Show me what's in My Drive — every file with its type, size, and last-modified time:
/drive/my
|> select name, mime_type, size, modified_time
name mime_type size modified_time
Reports application/vnd.google-apps.folder — 2026-06-30
q3-plan.md text/markdown 4.2 KB 2026-06-28
budget.xlsx application/vnd.openxmlformats-… 18 KB 2026-06-24
… 20 rows
That read runs the instant you connect an account. Uploading is just as direct — one statement writes a file, and previews before it touches anything:
upsert into /drive/my/Reports/q3.pdf
values ('…bytes…')
PREVIEW: 1 effect(s)
#0 UPSERT -> drive:/drive/my/Reports/q3.pdf [affected 1]
total affected: 1
::: tip Reads run now; writes preview
Every read returns rows immediately. Every write (upsert, insert, remove, call)
previews by default and changes nothing — add --commit to apply it, --commit-irreversible for
the ones that can't be undone (trashing). Paste any recipe below and safely watch what it would do
first.
:::
Drive isn't reachable until you connect a Google account to a path — and it shares Gmail's account, so it's often already done. See Setup. After that every recipe on this page works verbatim.
::: tip Prerequisites — an operator, an account, a mount
Reaching a cloud service takes three one-time steps: a signed-in operator (qfs init —
The operator identity), an authorized account (qfs account add …), and a
mount binding that account to a path (qfs connect …). The steps below assume the first two.
:::
Drive can use the same Google account consent as Gmail — a single authorization can serve Drive, Gmail, and Google Analytics. If you already followed the Gmail cookbook Setup, the happy path is one command:
qfs connect /drive --driver gdrive --account [email protected] # mount Drive at /drive
The rest of this section explains the details.
If you have not authorized a Google account yet, do the Google-account steps in the
Gmail cookbook Setup first (qfs init,
cat credentials.json | qfs app add google <app>, qfs account add google --app <app>), but enable
the Drive API for your Google Cloud project. Then mount the path:
qfs connect /drive --driver gdrive --account [email protected]
qfs connect --list now lists the mount, and qfs describe /drive shows the schema and verbs.
::: info The mount path is yours — and so is the account it carries
/work/drive works just as well as /drive — mount with
qfs connect /work/drive --driver gdrive --account [email protected] and every /drive/… recipe below
simply becomes /work/drive/….
:::
If a read reports connect a Google account to read Drive, you are past addressing (the path resolved) but the cloud bind gate has no signed-in operator or recorded consent yet — revisit the Gmail Setup steps 1–3.
Once connected, /drive is your Google Drive as a blob namespace mapped onto a filesystem shape:
| Drive thing | qfs path | it is a… |
|---|---|---|
| the root | /drive | lists the two corpora, my and shared |
| My Drive | /drive/my, /drive/my/<folder> | directory of files |
| a Shared Drive | /drive/shared/<DriveName> | directory of files |
| a file | /drive/my/<path> | a blob (its bytes are the content column) |
File columns: name, mime_type, size, modified_time, md5, is_google_doc, and — on a
single-file read — content (the bytes). Run qfs describe /drive/my for the exact schema and verbs
of any node. Blob verbs are the same everywhere: SELECT to list/read, UPSERT to write, REMOVE
to trash. (In the interactive shell the familiar ls/cp/mv/rm are shorthand
for these same verbs.)
?, and other reserved charactersReal Drive names carry spaces, ?, #, &, parentheses. Quote the segment to address such a
file directly — inside quotes every character is literal:
/drive/my/Reports/'Q3 budget (final)?.xlsx'
Escape a quote in a name by doubling it ('it''s here.txt'). Quoting also turns off globbing, which
is what makes a ? addressable at all: /drive/my/'report?.pdf' is the one file whose name
contains a ?, while unquoted /drive/my/report?.pdf is still a glob pattern. A / can never
appear inside a quoted segment — the separator is structural.
Prefer this single-file spelling over a where name == … filter when you mean one specific file:
it says exactly what you mean, and it is the safer form for irreversible verbs like remove.
Drive also stores a name in whatever Unicode normalization form the uploading client used (macOS
uploads decomposed/NFD), so a name pasted from a listing may not be byte-identical to the stored
one. qfs absorbs that difference — a path resolves to a canonically equivalent name — so you can
paste a listed name and have it work. If a folder genuinely holds both spellings of one name, the
address is refused as ambiguous_target rather than guessing.
List the two corpora at the root:
/drive
|> select name
List My Drive (or any folder) with details:
/drive/my
|> select name, mime_type, size, modified_time
List a Shared Drive by name:
/drive/shared/Engineering
|> select name, mime_type, size
Find files by name:
/drive/my
|> where name LIKE '%q3%'
|> select name, mime_type, size
Download a file — a single-file read resolves the path to its id and carries the bytes in a
content column alongside the metadata:
/drive/my/Reports/q3.pdf
|> select name, mime_type, size, md5, content
A Google-native doc (Docs/Sheets/Slides) reports is_google_doc and exports to a concrete
office/text format on read; its metadata lists what it is:
/drive/my/Notes
|> select name, mime_type, is_google_doc
Filter on a boolean column with a boolean literal — == true / == false (any case) reads
directly, no LIKE workaround needed:
/drive/my/Notes
|> where is_google_doc == true
|> select name, mime_type
Writes preview by default — they change nothing until you --commit.
Upload a file (an UPSERT — retry-safe, re-running converges instead of duplicating):
upsert into /drive/my/Reports/q3.pdf
values ('…bytes…')
PREVIEW: 1 effect(s)
#0 UPSERT -> drive:/drive/my/Reports/q3.pdf [affected 1]
total affected: 1
For a local file, prefer the interactive shell cp path so qfs materializes the local bytes at the
commit boundary instead of forcing a large escaped string literal into a one-shot query:
printf 'cp /local/home/me/report.md /drive/my/Reports/report.md\nCOMMIT\n' | qfs
The COMMIT line routes through the same live apply registry as qfs run --commit; if Drive does
not create or replace the destination, the shell reports a commit failure instead of a successful
in-memory preview.
UPSERT replaces; INSERT is create-only. An UPSERT (and the shell cp, which desugars to
UPSERT) onto a path that already holds a file replaces its content — retry-safe, and what you
want when re-running a copy. When you copy a file whose identity you inferred (e.g. "the latest
Slack file") and must not clobber an existing same-named file, use INSERT instead: it refuses
with target_exists if the name is already taken, so a wrong target fails closed rather than
overwriting.
insert into /drive/my/Reports/report.pdf
values ('…bytes…')
Drive names are not unique; a path that matches more than one file is refused as ambiguous_target
— address the one you mean by its id (/drive/id:<file-id>).
Create a folder (gdrive-ftp mkdir) — a folder is an INSERT with the folder MIME type and no
bytes:
insert into /drive/my/Reports
values (name, mime_type) ('Q3', 'application/vnd.google-apps.folder')
Trash a file (irreversible — a gate):
remove /drive/my
where name == 'old-draft.pdf'
PREVIEW: 1 effect(s)
#0 REMOVE -> drive:/drive/my [affected ?] (!)
(!) irreversible: 1 node(s) [#0]
total affected: ?
The (!) marks the irreversible gate: a one-shot needs --commit --commit-irreversible to apply it.
The where name == … trashes only the matching child under the addressed folder — a name that
matches nothing refuses (not_found), and two same-named children refuse as ambiguous_target.
When you know the file, prefer addressing it directly — quote the segment if the name carries
spaces or ?:
remove /drive/my/'Q3 budget (final)?.xlsx'
A folder is never trashed through a name path (fail-closed: a folder-path remove is refused
so a filter mishap can never widen to the folder's whole subtree). To deliberately trash a folder
with its subtree, address it explicitly by id: remove /drive/id:<folder-id> (the id is the id
column of any listing row).
Rename a file (gdrive-ftp mv) — an UPDATE setting the new name:
update /drive/my/Reports/q3.pdf
set name = 'q3-final.pdf'
Copy a file (a server-side drive.copy — the cp apply) — the piped path is the source, and
parent_path names the destination folder as a path (resolved to its id for you), with name
the copy's name. A copy creates, so it is reversible — no irreversible gate:
/drive/my/Reports/q3.pdf
|> call drive.copy(parent_path => '/drive/my/Archive', name => 'q3-backup.pdf')
PREVIEW: 1 effect(s)
#0 CALL -> drive:/drive/my/Reports/q3.pdf [affected ?]
total affected: ?
Add --commit to apply it. (When you already hold a raw destination folder id — say from a listing
— pass parent_id => '<id>' instead of parent_path.)
::: tip Attach a Drive file to an email Downloading a Drive file and attaching it to a Gmail draft in one statement is the cross-service attach-and-send recipe. :::
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub qmu/qfs --plugin qfs14 skills in this plugin
/qfsUse when the user asks to use QFS or its connected services. Discover the live connections and available paths before reading or writing through the qfs CLI; covers pipe-SQL, preview, and commit. For Slack channel discovery and threads, also read qfs-slack./qfs-automationUse when a task needs the qfs SERVER side — scheduled jobs, triggers, HTTP endpoints, and cached views created with CREATE bindings over queries you already write./qfs-chatworkUse when a task needs Chatwork through qfs — installing and querying the DECLARED /chatwork driver (rooms, a room's latest messages, a room's unread messages, room file listings, file download, and file upload) written in the query language itself, and posting a message to a room. Covers installing the chatwork.qfs declaration, connecting it to a stored Chatwork API token, reading the latest messages versus the unread-only ones, posting a message via ENCODE form, downloading a file's bytes via the FOLLOW stage, and uploading via ENCODE multipart.Other plugins' skills for the same job