跳到正文
Skillpedia
PDF、Word 与幻灯片16k · #10889

dropbox

它能做什么

让助手查找并处理你 Dropbox 中的文件和文件夹。适合把文档保存在 Dropbox 中、并希望获得相关帮助的人。

适用场景

  • ✓当你要求助手在 Dropbox 中查找某个文件或文件夹时。
  • ✓当你希望助手阅读或下载存放在 Dropbox 中的文档时。
  • ✓当你需要将 Dropbox 中的文件上传或分享给他人时。

技能链接

https://github.com/yc-software/qm/blob/main/skills-seed/dropbox/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/yc-software/qm/blob/main/skills-seed/dropbox/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我在 Dropbox 中找到最新的合同,并告诉我它的内容。”

每周 5 个新技能,1 分钟读完。

工作原理

助手会使用你已连接的 Dropbox 访问权限,列出、搜索、阅读、上传或分享文件。它只会使用你关联的账户进行操作。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Dropbox

Use this skill when the user asks about their Dropbox files or folders — listing, searching, reading/downloading, uploading, or sharing.

This is an OAuth connector. The resolved user's Dropbox token already lives on your computer as an environment variable, one per Dropbox API host (the way a logged-in CLI's cached credential would):

  • $VAULT_TOKEN_API_DROPBOXAPI_COM — for api.dropboxapi.com (RPC: list, search, share, move, delete)
  • $VAULT_TOKEN_CONTENT_DROPBOXAPI_COM — for content.dropboxapi.com (download, upload)

Both carry the same Dropbox token (one OAuth grant spans every host), so if a host-specific var is empty, $VAULT_TOKEN_API_DROPBOXAPI_COM works as the bearer for any Dropbox host. Pass it as -H "Authorization: Bearer $VAULT_TOKEN_..." on every call; nothing on the network path adds it for you. Never ask the user for a token, log it, or use another principal's credential or a service fallback.

If $VAULT_TOKEN_API_DROPBOXAPI_COM is empty: per-user connector tokens are injected only in a direct DM with the user (their personal scope) — in a channel or group they're absent by design, even for a fully-connected user. So don't tell a channel user to reconnect; ask them to DM you to run this. Only if it's empty inside a DM does it mean they haven't connected Dropbox — then point them to the Connectors page.

On 400 Invalid authorization value: the header was missing or empty, so Dropbox never checked the token. Fix your command (echo ${#VAULT_TOKEN_API_DROPBOXAPI_COM} shows the variable is set) and retry; this says nothing about the user's connection. Before telling a user Dropbox is broken, confirm with users/get_current_account below.

On 401 (invalid_access_token, expired_access_token): the token was sent and rejected → have them reconnect — unless the error body's .tag is missing_scope, in which case the app lacks a permission; name the required_scope it returns (the connected app grants account_info.read, files.metadata.read, files.content.read/write, sharing.read/write).

First: pick the right namespace (team vs personal)

This is the step that makes team and shared folders visible. By default the Dropbox API only lists the user's personal (home) namespace — for a Business member that root is often nearly empty. The team folders they see in the Dropbox web UI live in the team namespace, and the API only shows them when you set the Dropbox-API-Path-Root header.

Resolve the account's namespaces once, then reuse the root_namespace_id for the rest of the session — it doesn't change. This endpoint takes no arguments: send no request body and no Content-Type (adding Content-Type: application/json with an empty body returns a 400):

curl -sS -X POST 'https://api.dropboxapi.com/2/users/get_current_account' \
  -H "Authorization: Bearer $VAULT_TOKEN_API_DROPBOXAPI_COM"

Read root_info from the response. If root_info[".tag"] is team, use its root_namespace_id to see everything (team folders + the member's own files); if it is user (individual account), the default root is fine and no header is needed.

When you have a root_namespace_id, add this header to every files/sharing call so your view matches the web UI (substitute the id):

-H 'Dropbox-API-Path-Root: {".tag":"root","root":"ROOT_NAMESPACE_ID"}'

Prefer referencing items by id ("id:...", returned by list/search) over path strings — ids are stable across namespaces and avoid path-escaping issues.

List a folder

path is "" for the root of the active namespace, or a folder path/id:

curl -sS -X POST 'https://api.dropboxapi.com/2/files/list_folder' \
  -H "Authorization: Bearer $VAULT_TOKEN_API_DROPBOXAPI_COM" \
  -H 'Dropbox-API-Path-Root: {".tag":"root","root":"ROOT_NAMESPACE_ID"}' \
  -H 'Content-Type: application/json' \
  --data '{"path":"","recursive":false}'

For an ls -R-style or find-across-a-tree request, set "recursive":true to stream the whole subtree in one paginated pass instead of walking folder by folder.

If the response has "has_more":true, page with the returned cursor:

curl -sS -X POST 'https://api.dropboxapi.com/2/files/list_folder/continue' \
  -H "Authorization: Bearer $VAULT_TOKEN_API_DROPBOXAPI_COM" \
  -H 'Content-Type: application/json' \
  --data '{"cursor":"CURSOR"}'

Search

curl -sS -X POST 'https://api.dropboxapi.com/2/files/search_v2' \
  -H "Author
常见问题

如果助手说我的 Dropbox 未连接怎么办?

请先从连接器页面连接 Dropbox,之后助手才能访问你的文件。

它能访问团队或共享文件夹吗?

可以。该技能涵盖团队和共享文件夹,前提是你的账户有权访问它们。

为什么它会要求我使用私信?

Dropbox 的访问仅在与助手的私信中可用,因此请在私信中提出请求,而不是在共享频道中。

详情

作者的原始描述

Browse, search, read, upload, and share the user's Dropbox — including team/shared folders — through per-user OAuth.

repo: yc-software/qm

热度

GitHub 星标
16k
排名
#10889
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能