google-drive-sheets
Skill này làm gì
Cho phép trợ lý làm việc với các tệp Google Drive, Docs, Sheets và Slides. Dành cho người lưu tài liệu công việc trên Google và muốn được hỗ trợ đọc hoặc sửa chúng.
Khi nào nên dùng
- ✓Khi bạn yêu cầu trợ lý tìm một tệp trong Google Drive.
- ✓Khi bạn muốn trợ lý đọc hoặc chỉnh sửa một Google Doc, Sheet hoặc bộ slide.
- ✓Khi một tệp không mở được và bạn cần giúp về cài đặt chia sẻ.
Liên kết skill
https://github.com/yc-software/qm/blob/main/skills-seed/google-drive-sheets/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tìm bảng tính ngân sách của tôi trong Google Drive và tóm tắt tổng số trên tab đầu tiên.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Trợ lý dùng quyền truy cập Google đã kết nối của bạn để làm việc với Drive, Docs, Sheets và Slides. Nó chỉ đọc hoặc thay đổi các tệp mà tài khoản của bạn truy cập được.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Google Drive / Docs / Sheets / Slides
Use this skill when the user asks about Drive files, Google Docs, Google Sheets, Google Slides, sharing/access problems, or reading/editing any of that content.
This is an OAuth connector. The resolved user's Google OAuth token already lives on your computer as an environment variable, one per Google API host (the way a logged-in CLI's cached credential would):
$VAULT_TOKEN_WWW_GOOGLEAPIS_COM— forwww.googleapis.com(Drive)$VAULT_TOKEN_SHEETS_GOOGLEAPIS_COM— forsheets.googleapis.com(Sheets)$VAULT_TOKEN_DOCS_GOOGLEAPIS_COM— fordocs.googleapis.com(Docs)$VAULT_TOKEN_SLIDES_GOOGLEAPIS_COM— forslides.googleapis.com(Slides)
These all carry the same Google token (one OAuth grant spans every Google API), so
if a host-specific var is empty (e.g. an older connection made before that host was
added), $VAULT_TOKEN_WWW_GOOGLEAPIS_COM works as the bearer for any Google API host.
Call the Google APIs directly over https:// with curl and pass the matching token
as a bearer header (-H "Authorization: Bearer $VAULT_TOKEN_..."). Do not ask the user
for a token, log it, or use another principal's credential or a service fallback.
If the variable is empty or the API returns 401/403 or a file is inaccessible, tell the user which Google account/principal needs access and whether they should connect Google or share the file with that account.
Find files
Search Drive by name, owner, MIME type, or recency:
curl -sS --get 'https://www.googleapis.com/drive/v3/files' \
-H "Authorization: Bearer $VAULT_TOKEN_WWW_GOOGLEAPIS_COM" \
--data-urlencode "q=name contains 'deadline' and trashed=false" \
--data-urlencode 'fields=nextPageToken,files(id,name,mimeType,webViewLink,owners(emailAddress,displayName),modifiedTime)' \
--data-urlencode 'corpora=allDrives' \
--data-urlencode 'includeItemsFromAllDrives=true' \
--data-urlencode 'supportsAllDrives=true' \
--data-urlencode 'pageSize=100'
The three allDrives params matter: without them the API searches only "My Drive",
and files living in shared drives — most team docs — are invisible, so you'd wrongly
report a file doesn't exist. If the response has a nextPageToken, keep fetching with
pageToken= before concluding anything is missing.
For a specific file, fetch metadata first:
curl -sS 'https://www.googleapis.com/drive/v3/files/FILE_ID?supportsAllDrives=true&fields=id,name,mimeType,webViewLink,owners(emailAddress,displayName),capabilities' \
-H "Authorization: Bearer $VAULT_TOKEN_WWW_GOOGLEAPIS_COM"
Add supportsAllDrives=true to every per-file call (get, download, PATCH, DELETE) —
without it, operations on shared-drive files 404.
Read files
For uploaded files, download media:
curl -sS 'https://www.googleapis.com/drive/v3/files/FILE_ID?alt=media' \
-H "Authorization: Bearer $VAULT_TOKEN_WWW_GOOGLEAPIS_COM" \
-o inbox/drive-file.bin
For Google Docs/Sheets/Slides, export to a useful format:
curl -sS --get 'https://www.googleapis.com/drive/v3/files/FILE_ID/export' \
-H "Authorization: Bearer $VAULT_TOKEN_WWW_GOOGLEAPIS_COM" \
--data-urlencode 'mimeType=text/plain'
Keep source file ids and links in your answer so claims can be traced.
Read Sheets
Read values from a named range:
curl -sS 'https://sheets.googleapis.com/v4/spreadsheets/SPREADSHEET_ID/values/Sheet1!A1:Z100' \
-H "Authorization: Bearer $VAULT_TOKEN_SHEETS_GOOGLEAPIS_COM"
For workbook structure:
curl -sS 'https://sheets.googleapis.com/v4/spreadsheets/SPREADSHEET_ID?includeGridData=false' \
-H "Authorization: Bearer $VAULT_TOKEN_SHEETS_GOOGLEAPIS_COM"
Writes require approval
Creating, moving, sharing, or editing Drive/Sheets content is a write. Prepare the exact change, summarize the target file/range, and ask for approval before running it.
After approval, update values:
curl -sS -X PUT 'https://sheets.googleapis.com/v4/spreadsheets/SPREADSHEET_ID/values/Sheet1!A1:B2?valueInputOption=USER_ENTERED' \
-H "Authorization: Bearer $VAULT_TOKEN_SHEETS_GOOGLEAPIS_COM" \
-H 'content-type: application/json' \
--data @values.json
Always report the file id/link and the modified range.
Persist a file to Drive (upload)
You can save a file you produced (a report, an export, a generated artifact) into the user's Drive. This is a write — summarize what you're uploading and where, and get approval first.
After
Câu hỏi thường gặp
Nếu trợ lý không mở được một tệp thì sao?
Nó cho bạn biết tài khoản Google nào cần quyền truy cập. Sau đó bạn có thể nhờ chủ sở hữu chia sẻ tệp cho tài khoản đó.
Nó có chỉnh sửa tài liệu được chia sẻ không?
Có, nếu tài khoản của bạn có quyền chỉnh sửa. Nếu không, trợ lý sẽ nói rằng tệp không truy cập được.
Nó có cần mật khẩu Google của tôi không?
Không. Nó dùng quyền bạn đã cấp khi kết nối Google.
Chi tiết
Mô tả gốc của tác giả
Find, read, export, edit, and manage the user's Google Drive, Docs, Sheets, and Slides through per-user OAuth.
repo: yc-software/qm
Độ phổ biến
- Sao GitHub
- 16k
- Vị trí xếp hạng
- #10893
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
deploy-qm
16kTriển khai gói QM lên Fly.io, AWS hoặc Render, rồi thiết lập quản trị viên, connector và tùy chọn Slack, theo một danh sách kiểm tra triển khai đầy đủ.
onboarding
16kHướng dẫn người dùng mới kết nối tài khoản, chia sẻ cách họ làm việc, chọn giọng nói và thiết lập trợ giúp đầu tiên, trong một cuộc trò chuyện ngắn.
admin
16kCho phép quản trị viên tổ chức đã xác minh xem hoặc thay đổi cài đặt toàn tổ chức và các phạm vi khác từ chat, xác nhận từng thay đổi trước khi thực hiện.
browse
16kĐiều khiển trình duyệt tàng hình từ dòng lệnh để thao tác trên web như đăng nhập hoặc điền form, giữ đăng nhập riêng cho từng người.
Skill tương tự
feishu-doc
394kGiúp agent của bạn đọc, tạo và sửa tài liệu đám mây Feishu, gồm văn bản, hình ảnh và bảng, bằng công cụ tài liệu.
feishu-drive
394kCho phép agent của bạn duyệt, sắp xếp và bình luận các file trong một thư mục đám mây Feishu đã được chia sẻ với bot.
feishu-perm
394kGiúp agent của bạn kiểm tra và thay đổi ai có quyền truy cập một file Feishu, chọn quyền nhỏ nhất đáp ứng yêu cầu của bạn.