Antigravity-awesome-skills one-drive-automation
Automate OneDrive file management, search, uploads, downloads, sharing, permissions, and folder operations via Rube MCP (Composio). Always search tools first for current schemas.
git clone https://github.com/sickn33/antigravity-awesome-skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/sickn33/antigravity-awesome-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/plugins/antigravity-awesome-skills-claude/skills/one-drive-automation" ~/.claude/skills/sickn33-antigravity-awesome-skills-one-drive-automation && rm -rf "$T"
plugins/antigravity-awesome-skills-claude/skills/one-drive-automation/SKILL.mdOneDrive 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
with toolkitRUBE_MANAGE_CONNECTIONSone_drive - Always call
first to get current tool schemasRUBE_SEARCH_TOOLS
Setup
Get Rube MCP: Add
https://rube.app/mcp as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
- Verify Rube MCP is available by confirming
respondsRUBE_SEARCH_TOOLS - Call
with toolkitRUBE_MANAGE_CONNECTIONSone_drive - If connection is not ACTIVE, follow the returned auth link to complete Microsoft OAuth
- 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:
- Verify drive access and get drive details [Prerequisite]ONE_DRIVE_GET_DRIVE
- Keyword search across filenames, metadata, and content [Required]ONE_DRIVE_SEARCH_ITEMS
- List all items in the root of a drive [Optional]ONE_DRIVE_ONEDRIVE_LIST_ITEMS
- Get detailed metadata for a specific item, expand children [Optional]ONE_DRIVE_GET_ITEM
- Find a specific file by exact name in a folder [Optional]ONE_DRIVE_ONEDRIVE_FIND_FILE
- Find a specific folder by name [Optional]ONE_DRIVE_ONEDRIVE_FIND_FOLDER
- List all accessible drives [Optional]ONE_DRIVE_LIST_DRIVES
Key parameters:
: Search query (plain keywords only, NOT KQL syntax)q
:search_scope
(folder hierarchy) or"root"
(includes shared items)"drive"
: Max items per page (default 200)top
: Pagination token fromskip_token@odata.nextLink
: Comma-separated fields to return (e.g.,select
)"id,name,webUrl,size"
: Sort order (e.g.,orderby
,"name asc"
)"name desc"
: Item ID foritem_idGET_ITEM
: Array likeexpand_relations
or["children"]
for["thumbnails"]GET_ITEM
:user_id
(default) or specific user ID/email"me"
Pitfalls:
does NOT support KQL operators (ONE_DRIVE_SEARCH_ITEMS
,folder:
,file:
,filetype:
); these are treated as literal textpath:- Wildcard characters (
,*
) are NOT supported and are auto-removed; use file extension keywords instead (e.g.,?
not"pdf"
)"*.pdf"
returns only root-level contents; use recursiveONE_DRIVE_ONEDRIVE_LIST_ITEMS
withONE_DRIVE_GET_ITEM
for deeper levelsexpand_relations: ["children"]- Large folders paginate; always follow
/skip_token
until exhausted@odata.nextLink - 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:
- Locate the target folder [Prerequisite]ONE_DRIVE_ONEDRIVE_FIND_FOLDER
- Upload a file to a specified folder [Required for upload]ONE_DRIVE_ONEDRIVE_UPLOAD_FILE
- Download a file by item ID [Required for download]ONE_DRIVE_DOWNLOAD_FILE
- Get file details before download [Optional]ONE_DRIVE_GET_ITEM
Key parameters:
: FileUploadable object withfile
,s3key
, andmimetype
for uploadsname
: Destination path (e.g.,folder
) or folder ID for uploads"/Documents/Reports"
: File's unique identifier for downloadsitem_id
: Desired filename with extension for downloadsfile_name
: Specific drive ID (for SharePoint or OneDrive for Business)drive_id
:user_id
(default) or specific user identifier"me"
Pitfalls:
- Upload automatically renames on conflict (no overwrite option by default)
- Large files are automatically handled via chunking
overridesdrive_id
when both are provideduser_id- Item IDs vary by platform: OneDrive for Business uses
prefix, OneDrive Personal uses01...
formatHASH!NUMBER - 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:
orONE_DRIVE_ONEDRIVE_FIND_FILE
- Locate the item [Prerequisite]ONE_DRIVE_ONEDRIVE_FIND_FOLDER
- Check current permissions [Prerequisite]ONE_DRIVE_GET_ITEM_PERMISSIONS
- Grant access to specific users [Required]ONE_DRIVE_INVITE_USER_TO_DRIVE_ITEM
- Create a shareable link [Optional]ONE_DRIVE_CREATE_LINK
- Update item metadata [Optional]ONE_DRIVE_UPDATE_DRIVE_ITEM_METADATA
Key parameters:
: The file or folder to shareitem_id
: Array of objects withrecipients
oremailobject_id
: Array withroles
or"read""write"
:send_invitation
to send notification email,true
for silent permission grantfalse
:require_sign_in
to require authentication to accesstrue
: Custom message for invitation (max 2000 characters)message
: ISO 8601 date for permission expiryexpiration_date_time
:retain_inherited_permissions
(default) to keep existing inherited permissionstrue
Pitfalls:
- Using wrong
withitem_id
changes permissions on unintended items; always verify firstINVITE_USER_TO_DRIVE_ITEM - Write or higher roles are impactful; get explicit user confirmation before granting
returns inherited and owner entries; do not assume response only reflects recent changesGET_ITEM_PERMISSIONS
cannot be expanded viapermissions
; use the separate permissions endpointONE_DRIVE_GET_ITEM- At least one of
orrequire_sign_in
must besend_invitationtrue
4. Manage Folders (Create, Move, Delete, Copy)
When to use: User wants to create, move, rename, delete, or copy files and folders
Tool sequence:
- Locate source and destination folders [Prerequisite]ONE_DRIVE_ONEDRIVE_FIND_FOLDER
- Create a new folder [Required for create]ONE_DRIVE_ONEDRIVE_CREATE_FOLDER
- Move a file or folder to a new location [Required for move]ONE_DRIVE_MOVE_ITEM
- Copy a file or folder (async operation) [Required for copy]ONE_DRIVE_COPY_ITEM
- Move item to recycle bin [Required for delete]ONE_DRIVE_DELETE_ITEM
- Rename or update item properties [Optional]ONE_DRIVE_UPDATE_DRIVE_ITEM_METADATA
Key parameters:
: Folder name for creation or new name for rename/copyname
: Path (e.g.,parent_folder
) or folder ID for creation"/Documents/Reports"
: Item to moveitemId
: Object withparentReference
(destination folder ID) for moves:id{"id": "folder_id"}
: Item to copy or deleteitem_id
: Object withparent_reference
and optionalid
for copy destinationdriveId
:@microsoft.graph.conflictBehavior
,"fail"
, or"replace"
for copies"rename"
: ETag for optimistic concurrency on deletesif_match
Pitfalls:
does NOT support cross-drive moves; useONE_DRIVE_MOVE_ITEM
for cross-drive transfersONE_DRIVE_COPY_ITEM
for moves requires folder ID (not folder name); resolve withparentReference
firstONEDRIVE_FIND_FOLDER
is asynchronous; response provides a URL to monitor progressONE_DRIVE_COPY_ITEM
moves to recycle bin, not permanent deletionONE_DRIVE_DELETE_ITEM- Folder creation auto-renames on conflict (e.g., "New Folder" becomes "New Folder 1")
- Provide either
orname
(or both) forparent_referenceONE_DRIVE_COPY_ITEM
5. Track Changes and Drive Information
When to use: User wants to monitor changes or get drive/quota information
Tool sequence:
- Get drive properties and metadata [Required]ONE_DRIVE_GET_DRIVE
- Check storage quota (total, used, remaining) [Optional]ONE_DRIVE_GET_QUOTA
- Track changes in SharePoint site drives [Optional]ONE_DRIVE_LIST_SITE_DRIVE_ITEMS_DELTA
- Get version history of a file [Optional]ONE_DRIVE_GET_ITEM_VERSIONS
Key parameters:
: Drive identifier (ordrive_id
for personal drive)"me"
: SharePoint site identifier for delta trackingsite_id
: Delta token (token
for current state, URL for next page, or timestamp)"latest"
: File ID for version historyitem_id
Pitfalls:
- Delta queries are only available for SharePoint site drives via
ONE_DRIVE_LIST_SITE_DRIVE_ITEMS_DELTA - Token
returns current delta token without items (useful as starting point)"latest" - Deep or large drives can take several minutes to crawl; use batching and resume logic
Common Patterns
ID Resolution
- User: Use
for authenticated user or specific user email/GUID"me" - Item ID from find: Use
orONE_DRIVE_ONEDRIVE_FIND_FILE
to get item IDsONE_DRIVE_ONEDRIVE_FIND_FOLDER - Item ID from search: Extract from
resultsONE_DRIVE_SEARCH_ITEMS - Drive ID: Use
orONE_DRIVE_LIST_DRIVES
to discover drivesONE_DRIVE_GET_DRIVE - Folder path to ID: Use
with path, then extract ID from responseONE_DRIVE_ONEDRIVE_FIND_FOLDER
ID formats vary by platform:
- OneDrive for Business/SharePoint:
01NKDM7HMOJTVYMDOSXFDK2QJDXCDI3WUK - OneDrive Personal:
D4648F06C91D9D3D!54927
Pagination
OneDrive uses token-based pagination:
- Follow
or@odata.nextLink
until no more pagesskip_token - Set
for page size (varies by endpoint)top
auto-handles pagination internallyONE_DRIVE_ONEDRIVE_LIST_ITEMS- Aggressive parallel requests can trigger HTTP 429; honor
headersRetry-After
Path vs ID
Most OneDrive tools accept either paths or IDs:
- Paths: Start with
(e.g.,/
)"/Documents/Reports" - IDs: Use unique item identifiers from API responses
- Item paths for permissions: Use
format:/path/to/item:/
Known Pitfalls
ID Formats
- Item IDs are case-sensitive and platform-specific
- Never use web URLs, sharing links, or manually constructed identifiers as item IDs
- Always use IDs exactly as returned from Microsoft Graph API
Rate Limits
- Aggressive parallel
calls can trigger HTTP 429 Too Many RequestsONE_DRIVE_GET_ITEM - Honor
headers and implement throttlingRetry-After - Deep drive crawls should use batching with delays
Search Limitations
- No KQL support; use plain keywords only
- No wildcard characters; use extension keywords (e.g.,
not"pdf"
)"*.pdf" - No path-based filtering in search; use folder listing instead
wildcard-only queries return HTTP 400 invalidRequestq='*'
Parameter Quirks
overridesdrive_id
when both are provideduser_id
cannot be expanded viapermissions
; use dedicated permissions endpointGET_ITEM- Move operations require folder IDs in
, not folder namesparentReference - Copy operations are asynchronous; response provides monitoring URL
Quick Reference
| Task | Tool Slug | Key Params |
|---|---|---|
| Search files | | , , |
| List root items | | , , |
| Get item details | | , |
| Find file by name | | , |
| Find folder by name | | , |
| Upload file | | , |
| Download file | | , |
| Create folder | | , |
| Move item | | , |
| Copy item | | , , |
| Delete item | | |
| Share with users | | , , |
| Create share link | | , link type |
| Get permissions | | |
| Update metadata | | , fields |
| Get drive info | | |
| List drives | | user/group/site scope |
| Get quota | | (none) |
| Track changes | | , |
| Version history | | |
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.