microsoft-onedrive

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Microsoft OneDrive Skill

Microsoft OneDrive Skill

Overview

概述

Claude can manage your Microsoft OneDrive to upload files, organize folders, search content, share files, and maintain your cloud storage. Integrates with Microsoft 365 apps for seamless file management.
Claude可以管理你的Microsoft OneDrive,进行文件上传、文件夹整理、内容搜索、文件共享以及云存储维护。与Microsoft 365应用集成,实现无缝文件管理。

Quick Install

快速安装

bash
curl -sSL https://canifi.com/skills/microsoft-onedrive/install.sh | bash
Or manually:
bash
cp -r skills/microsoft-onedrive ~/.canifi/skills/
bash
curl -sSL https://canifi.com/skills/microsoft-onedrive/install.sh | bash
或手动安装:
bash
cp -r skills/microsoft-onedrive ~/.canifi/skills/

Setup

设置

Configure via canifi-env:
bash
undefined
通过canifi-env进行配置:
bash
undefined

First, ensure canifi-env is installed:

首先,确保已安装canifi-env:

canifi-env set MICROSOFT_EMAIL "your-email@outlook.com"
undefined
canifi-env set MICROSOFT_EMAIL "your-email@outlook.com"
undefined

Privacy & Authentication

隐私与认证

Your credentials, your choice. Canifi LifeOS respects your privacy.
你的凭据,由你掌控。 Canifi LifeOS尊重你的隐私。

Option 1: Manual Browser Login (Recommended)

选项1:手动浏览器登录(推荐)

If you prefer not to share credentials with Claude Code:
  1. Complete the Browser Automation Setup using CDP mode
  2. Login to the service manually in the Playwright-controlled Chrome window
  3. Claude will use your authenticated session without ever seeing your password
如果你不想与Claude Code共享凭据:
  1. 使用CDP模式完成浏览器自动化设置
  2. 在Playwright控制的Chrome窗口中手动登录该服务
  3. Claude将使用你的已认证会话,全程不会获取你的密码

Option 2: Environment Variables

选项2:环境变量

If you're comfortable sharing credentials, you can store them locally:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"
Note: Credentials stored in canifi-env are only accessible locally on your machine and are never transmitted.
如果你愿意共享凭据,可以将其存储在本地:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"
注意:存储在canifi-env中的凭据仅能在你的本地机器上访问,绝不会被传输。

Capabilities

功能

  • Upload and download files
  • Create and organize folders
  • Search files by name or content
  • Share files and folders with permissions
  • Move and copy files
  • View file versions
  • Manage storage quota
  • Create shortcuts
  • Access shared files
  • Sync status monitoring
  • Recover deleted files
  • Generate sharing links
  • 上传和下载文件
  • 创建和整理文件夹
  • 按名称或内容搜索文件
  • 带权限设置的文件和文件夹共享
  • 移动和复制文件
  • 查看文件版本
  • 管理存储配额
  • 创建快捷方式
  • 访问共享文件
  • 同步状态监控
  • 恢复已删除文件
  • 生成共享链接

Usage Examples

使用示例

Example 1: Find File

示例1:查找文件

User: "Find my quarterly report in OneDrive"
Claude: Searches OneDrive for "quarterly report".
        Reports: "Found 3 files:
        1. Q4 Report 2024.docx (modified yesterday)
        2. Q3 Report 2024.xlsx (2 months ago)..."
用户:“在OneDrive中找到我的季度报告”
Claude:在OneDrive中搜索“季度报告”。
        回复:“找到3个文件:
        1. Q4 Report 2024.docx(修改于昨天)
        2. Q3 Report 2024.xlsx(2个月前)...”

Example 2: Organize Files

示例2:整理文件

User: "Create a folder for client documents and move relevant files"
Claude: Creates "Client Documents" folder, identifies and moves files.
        Confirms: "Created folder, moved 15 files"
用户:“创建一个客户文档文件夹并移动相关文件”
Claude:创建“客户文档”文件夹,识别并移动相关文件。
        确认:“已创建文件夹,移动了15个文件”

Example 3: Share File

示例3:共享文件

User: "Share the proposal with sarah@company.com with edit access"
Claude: Locates proposal, shares with Sarah as editor.
        Confirms: "Shared with sarah@company.com (can edit)"
用户:“将提案以编辑权限共享给sarah@company.com”
Claude:找到提案文件,以编辑者身份共享给Sarah。
        确认:“已共享给sarah@company.com(可编辑)”

Example 4: Check Storage

示例4:查看存储情况

User: "How much OneDrive storage am I using?"
Claude: Checks storage quota.
        Reports: "Using 45.2 GB of 1 TB (4.5%). Largest items:
        Videos folder (30 GB)..."
用户:“我在OneDrive中使用了多少存储空间?”
Claude:检查存储配额。
        回复:“已使用45.2 GB,总容量1 TB(占比4.5%)。占用空间最大的项目:
        视频文件夹(30 GB)...”

Authentication Flow

认证流程

  1. Claude navigates to onedrive.live.com via Playwright MCP
  2. Authenticates with MICROSOFT_EMAIL if needed
  3. Handles 2FA if prompted (notifies user via iMessage)
  4. Maintains session for OneDrive operations
  1. Claude通过Playwright MCP导航至onedrive.live.com
  2. 如有需要,使用MICROSOFT_EMAIL进行认证
  3. 若提示双因素认证(2FA),将通过iMessage通知用户
  4. 维持会话以进行OneDrive操作

Selectors Reference

选择器参考

javascript
// New button
'[aria-label="New"]'

// Upload button
'[aria-label="Upload"]'

// File list
'[role="grid"]'

// File item
'[role="row"]'

// Search box
'[aria-label="Search"]'

// Folder navigation
'.breadcrumb'

// Share button
'[aria-label="Share"]'

// Download button
'[aria-label="Download"]'

// Move to button
'[aria-label="Move to"]'

// Delete button
'[aria-label="Delete"]'

// Storage info
'.storage-info'
javascript
// 新建按钮
'[aria-label="New"]'

// 上传按钮
'[aria-label="Upload"]'

// 文件列表
'[role="grid"]'

// 文件项
'[role="row"]'

// 搜索框
'[aria-label="Search"]'

// 文件夹导航
'.breadcrumb'

// 共享按钮
'[aria-label="Share"]'

// 下载按钮
'[aria-label="Download"]'

// 移动到按钮
'[aria-label="Move to"]'

// 删除按钮
'[aria-label="Delete"]'

// 存储信息
'.storage-info'

Error Handling

错误处理

  • Login Failed: Retry 3 times, notify user via iMessage
  • Session Expired: Re-authenticate automatically
  • File Not Found: Search with variations, ask for clarification
  • Upload Failed: Check file size, retry in chunks
  • Share Failed: Verify email, check sharing restrictions
  • Storage Full: Notify user, suggest cleanup
  • 登录失败:重试3次,通过iMessage通知用户
  • 会话过期:自动重新认证
  • 文件未找到:使用变体关键词搜索,请求用户澄清
  • 上传失败:检查文件大小,分块重试
  • 共享失败:验证邮箱地址,检查共享限制
  • 存储已满:通知用户,建议清理空间

Self-Improvement Instructions

自我改进说明

When you learn a better way to accomplish a task with OneDrive:
  1. Document the improvement in your response
  2. Suggest updating this skill file with the new approach
  3. Include specific search or organization tips
  4. Note any sync behavior improvements
当你发现使用OneDrive完成任务的更好方法时:
  1. 在回复中记录该改进
  2. 建议使用新方法更新此Skill文件
  3. 包含具体的搜索或整理技巧
  4. 记录任何同步行为的改进

Notes

注意事项

  • Free tier: 5 GB storage
  • Microsoft 365 subscription: 1 TB+ storage
  • Files on demand allows cloud-only storage
  • Personal Vault for sensitive files
  • Recycle bin retains files for 30 days
  • Version history for document recovery
  • Integrates with Windows File Explorer
  • Mobile apps available for iOS/Android
  • 免费版:5 GB存储空间
  • Microsoft 365订阅:1 TB+存储空间
  • 按需文件功能支持仅云存储
  • 个人保管库用于存储敏感文件
  • 回收站保留文件30天
  • 版本历史记录用于文档恢复
  • 与Windows文件资源管理器集成
  • 支持iOS/Android移动应用