one-drive-automation – skill Agent & Tự động hóa cho agent AI
Tự động hóa quản lý file OneDrive, tìm kiếm, tải lên, tải xuống, chia sẻ, phân quyền và thao tác thư mục qua Rube MCP (Composio). Luôn tìm công cụ trước để lấy schema hiện tại.
Cài skill one-drive-automation bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/one-drive-automation-b34da.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /one-drive-automation – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/one-drive-automation-b34da.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $one-drive-automation – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/one-drive-automation-b34da.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /one-drive-automation – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/one-drive-automation-b34da.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /one-drive-automation – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
OneDrive Automation via Rube MCP
Automate OneDrive operations including file upload/download, search, folder management, sharing links, permissions management, and drive browsing through Composio's OneDrive toolkit.
Prerequisites
- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
- Active OneDrive connection via
RUBE_MANAGE_CONNECTIONSwith toolkitone_drive - Always call
RUBE_SEARCH_TOOLSfirst to get current tool schemas
Setup
Get Rube MCP: Add https://rube.app/mcp as an MCP server in your client configuration. Authenticate the MCP client/server and authorize the Microsoft connection; an endpoint alone does not grant access.
1. Verify Rube MCP is available by confirming RUBE_SEARCH_TOOLS responds
2. Call RUBE_MANAGE_CONNECTIONS with toolkit one_drive
3. If connection is not ACTIVE, follow the returned auth link to complete Microsoft OAuth
4. Confirm connection status shows ACTIVE before running any workflows
Core Workflows
1. Search and Browse Files
When to use: User wants to find files or browse folder contents in OneDrive
Tool sequence:
1. ONE_DRIVE_GET_DRIVE - Verify drive access and get drive details [Prerequisite]
2. ONE_DRIVE_SEARCH_ITEMS - Keyword search across filenames, metadata, and content [Required]
3. ONE_DRIVE_ONEDRIVE_LIST_ITEMS - List all items in the root of a drive [Optional]
4. ONE_DRIVE_GET_ITEM - Get detailed metadata for a specific item, expand children [Optional]
5. ONE_DRIVE_ONEDRIVE_FIND_FILE - Find a specific file by exact name in a folder [Optional]
6. ONE_DRIVE_ONEDRIVE_FIND_FOLDER - Find a specific folder by name [Optional]
7. ONE_DRIVE_LIST_DRIVES - List all accessible drives [Optional]
Key parameters:
q: Search query (plain keywords only, NOT KQL syntax)search_scope:"root"(folder hierarchy) or"drive"(includes shared items)top: Max items per page (default 200)skip_token: Pagination token from@odata.nextLinkselect: Comma-separated fields to return (e.g.,"id,name,webUrl,size")orderby: Sort order (e.g.,"name asc","name desc")item_id: Item ID forGET_ITEMexpand_relations: Array like["children"]or["thumbnails"]forGET_ITEMuser_id:"me"(default) or specific user ID/email
Pitfalls:
ONE_DRIVE_SEARCH_ITEMSdoes NOT support KQL operators (folder:,file:,filetype:,path:); these are treated as literal text- Wildcard characters (
*,?) are NOT supported and are auto-removed; use file extension keywords instead (e.g.,"pdf"not"*.pdf") ONE_DRIVE_ONEDRIVE_LIST_ITEMSreturns only root-level contents; use recursiveONE_DRIVE_GET_ITEMwithexpand_relations: ["children"]for deeper levels- Large folders paginate; always follow
skip_token/@odata.nextLinkuntil exhausted - Some drive ID formats may return "ObjectHandle is Invalid" errors due to Microsoft Graph API limitations
2. Upload and Download Files
When to use: User wants to upload files to OneDrive or download files from it
Tool sequence:
1. ONE_DRIVE_ONEDRIVE_FIND_FOLDER - Locate the target folder [Prerequisite]
2. ONE_DRIVE_ONEDRIVE_UPLOAD_FILE - Upload a file to a specified folder [Required for upload]
3. ONE_DRIVE_DOWNLOAD_FILE - Download a file by item ID [Required for download]
4. ONE_DRIVE_GET_ITEM - Get file details before download [Optional]
Key parameters:
file: FileUploadable object withs3key,mimetype, andnamefor uploadsfolder: Destination path (e.g.,"/Documents/Reports") or folder ID for uploadsitem_id: File's unique identifier for downloadsfile_name: Desired filename with extension for downloadsdrive_id: Specific drive ID (for SharePoint or OneDrive for Business)user_id:"me"(default) or specific user identifier
Pitfalls:
- Inspect the live upload schema and conflict behavior; do not assume uploads cannot overwrite
- Verify upload size limits and resumable-session support before large uploads
drive_idoverridesuser_idwhen both are provided- Item IDs vary by platform: OneDrive for Business uses
01...prefix, OneDrive Personal usesHASH!NUMBERformat - Item IDs are case-sensitive; use exactly as returned from API
3. Share Files and Manage Permissions
When to use: User wants to share files/folders or manage who has access
Tool sequence:
1. ONE_DRIVE_ONEDRIVE_FIND_FILE or ONE_DRIVE_ONEDRIVE_FIND_FOLDER - Locate the item [Prerequisite]
2. ONE_DRIVE_GET_ITEM_PERMISSIONS - Check current permissions [Prerequisite]
3. ONE_DRIVE_INVITE_USER_TO_DRIVE_ITEM - Grant access to specific users [Required]
4. ONE_DRIVE_CREATE_LINK - Create a shareable link [Optional]
5. ONE_DRIVE_UPDATE_DRIVE_ITEM_METADATA - Update item metadata [Optional]
Key parameters:
item_id: The file or folder to sharerecipients: Array of objects withemailorobject_idroles: Array with"read"or"write"send_invitation:trueto send notification email,falsefor silent permission grantrequire_sign_in:trueto require authentication to accessmessage: Custom message for invitation (max 2000 characters)expiration_date_time: ISO 8601 date for permission expiryretain_inherited_permissions:true(default) to keep existing inherited permissions
Pitfalls:
- Using wrong
item_idwithINVITE_USER_TO_DRIVE_ITEMchanges permissions on unintended items; always verify first - Write or higher roles are impactful; get explicit user confirmation before granting
GET_ITEM_PERMISSIONSreturns inherited and owner entries; do not assume response only reflects recent changespermissionscannot be expanded viaONE_DRIVE_GET_ITEM; use the separate permissions endpoint- At least one of
require_sign_inorsend_invitationmust betrue
4. Manage Folders (Create, Move, Delete, Copy)
When to use: User wants to create, move, rename, delete, or copy files and folders
Tool sequence:
1. ONE_DRIVE_ONEDRIVE_FIND_FOLDER - Locate source and destination folders [Prerequisite]
2. ONE_DRIVE_ONEDRIVE_CREATE_FOLDER - Create a new folder [Required for create]
3. ONE_DRIVE_MOVE_ITEM - Move a file or folder to a new location [Required for move]
4. ONE_DRIVE_COPY_ITEM - Copy a file or folder (async operation) [Required for copy]
5. ONE_DRIVE_DELETE_ITEM - Move item to recycle bin [Required for delete]
6. ONE_DRIVE_UPDATE_DRIVE_ITEM_METADATA - Rename or update item properties [Optional]
Key parameters:
name: Folder name for creation or new name for rename/copyparent_folder: Path (e.g.,"/Documents/Reports") or folder ID for creationitemId: Item to moveparentReference: Object withid(destination folder ID) for moves:{"id": "folder_id"}item_id: Item to copy or deleteparent_reference: Object withidand optionaldriveIdfor copy destination@microsoft.graph.conflictBehavior:"fail","replace", or"rename"for copiesif_match: ETag for optimistic concurrency on deletes
Pitfalls:
ONE_DRIVE_MOVE_ITEMdoes NOT support cross-drive moves; useONE_DRIVE_COPY_ITEMfor cross-drive transfersparentReferencefor moves requires folder ID (not folder name); resolve withONEDRIVE_FIND_FOLDERfirstONE_DRIVE_COPY_ITEMis asynchronous; response provides a URL to monitor progressONE_DRIVE_DELETE_ITEMmoves to recycle bin, not permanent deletion- Folder creation auto-renames on conflict (e.g., "New Folder" becomes "New Folder 1")
- Provide either
nameorparent_reference(or both) forONE_DRIVE_COPY_ITEM
5. Track Changes and Drive Information
When to use: User wants to monitor changes or get drive/quota information
Tool sequence:
1. ONE_DRIVE_GET_DRIVE - Get drive properties and metadata [Required]
2. ONE_DRIVE_GET_QUOTA - Check storage quota (total, used, remaining) [Optional]
3. ONE_DRIVE_LIST_SITE_DRIVE_ITEMS_DELTA - Track changes in SharePoint site drives [Optional]
4. ONE_DRIVE_GET_ITEM_VERSIONS - Get version history of a file [Optional]
Key parameters:
drive_id: Drive identifier (or"me"for personal drive)site_id: SharePoint site identifier for delta trackingtoken: Delta token ("latest"for current state, URL for next page, or timestamp)item_id: File ID for version history
Pitfalls:
- This historical connector exposes site-drive delta via
ONE_DRIVE_LIST_SITE_DRIVE_ITEMS_DELTA - Token
"latest"returns current delta token without items (useful as starting point) - Deep or large drives can take several minutes to crawl; use batching and resume logic
Common Patterns
ID Resolution
- User: Use
"me"for authenticated user or specific user email/GUID - Item ID from find: Use
ONE_DRIVE_ONEDRIVE_FIND_FILEorONE_DRIVE_ONEDRIVE_FIND_FOLDERto get item IDs - Item ID from search: Extract from
ONE_DRIVE_SEARCH_ITEMSresults - Drive ID: Use
ONE_DRIVE_LIST_DRIVESor
… (nội dung đầy đủ có trong gói tải về)
Skill liên quan
- open-dynamic-workflows – Lập kế hoạch, điều phối và xác minh đối nghịch các agent lập trình AI chạy song song…
- openclaw-local-mac-mini – Cài đặt OpenClaw cục bộ và vận hành ổn định trên Mac mini cho các quy trình agent cục bộ…
- optim-agent – Hướng dẫn agent tối ưu tham số cho hệ thống có thể cấu hình, với mục tiêu đo lường được…
- orca-replay – Trả lời các câu hỏi về một lần chạy agent trước đó dựa trên bản ghi của lần chạy đó thay…
- orchestrate – Điều phối các subagent tập trung cho công việc lớn, giữ phạm vi phụ trách không chồng…
- os-scripting – Quy trình xử lý sự cố shell và script hệ điều hành cho Linux, macOS và Windows. Bao gồm…
- outlook-automation – Tự động hóa các tác vụ Outlook qua Rube MCP (Composio): email, lịch, danh bạ, thư mục…
- outlook-calendar-automation – Tự động hóa tác vụ Outlook Calendar qua Rube MCP (Composio): tạo sự kiện, quản lý người…