google-photos

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Google Photos Skill

Google Photos Skill

Overview

概述

Claude can manage your Google Photos library to browse images, create albums, search photos, and organize your memories. This includes using AI-powered search, creating collages, and managing storage.
Claude可以管理你的Google Photos图库,浏览图片、创建相册、搜索照片并整理你的回忆。这包括使用AI驱动的搜索功能、创建拼贴画以及管理存储空间。

Quick Install

快速安装

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

Setup

设置

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

First, ensure canifi-env is installed:

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

canifi-env set GOOGLE_EMAIL "your-email@gmail.com"
undefined
canifi-env set GOOGLE_EMAIL "your-email@gmail.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

功能

  • Browse and view photos and videos
  • Search photos by content, people, places, or dates
  • Create and manage albums
  • Share albums and photos
  • Edit photos with built-in tools
  • Create collages, animations, and movies
  • Organize by people and faces
  • Archive and delete photos
  • View storage usage
  • Download photos and albums
  • Add photos to favorites
  • View photo metadata and location
  • 浏览和查看照片与视频
  • 按内容、人物、地点或日期搜索照片
  • 创建和管理相册
  • 分享相册和照片
  • 使用内置工具编辑照片
  • 创建拼贴画、动画和影片
  • 按人物和面孔整理照片
  • 归档和删除照片
  • 查看存储空间使用情况
  • 下载照片和相册
  • 将照片添加到收藏夹
  • 查看照片元数据和位置信息

Usage Examples

使用示例

Example 1: Find Photos

示例1:查找照片

User: "Find photos from my trip to Hawaii"
Claude: Searches for "Hawaii" and/or date range of trip.
        Reports: "Found 156 photos from Hawaii. Showing beach, sunset,
        and hiking categories..."
用户:"查找我夏威夷之旅的照片"
Claude:搜索“夏威夷”和/或旅行的日期范围。
        回复:"找到156张夏威夷相关照片,展示海滩、日落
        和徒步等分类..."

Example 2: Create Album

示例2:创建相册

User: "Create an album called 'Best of 2024' with my favorite photos"
Claude: Creates album "Best of 2024", adds starred/favorited photos.
        Returns: "Created album with 43 photos: [link]"
用户:"创建名为'2024精选'的相册,加入我最爱的照片"
Claude:创建名为“2024精选”的相册,添加已标记为星标/收藏的照片。
        回复:"已创建相册,包含43张照片:[链接]"

Example 3: Share Album

示例3:分享相册

User: "Share the vacation album with my family"
Claude: Opens album, creates share link or adds specific people.
        Confirms: "Album shared. Link: [shareable link]"
用户:"把度假相册分享给我的家人"
Claude:打开相册,创建分享链接或添加特定联系人。
        确认:"相册已分享。链接:[可分享链接]"

Example 4: Search by Content

示例4:按内容搜索

User: "Find all photos with dogs"
Claude: Uses AI search for "dog", shows results.
        Reports: "Found 28 photos containing dogs across 12 dates"
用户:"查找所有包含狗狗的照片"
Claude:使用AI搜索“狗狗”,展示结果。
        回复:"找到28张包含狗狗的照片,分布在12个不同日期"

Authentication Flow

认证流程

  1. Claude navigates to photos.google.com via Playwright MCP
  2. Authenticates with GOOGLE_EMAIL if needed
  3. Handles 2FA if prompted (notifies user via iMessage)
  4. Maintains session for subsequent Photos operations
  1. Claude通过Playwright MCP导航至photos.google.com
  2. 如有需要,使用GOOGLE_EMAIL进行认证
  3. 若提示两步验证(2FA),通过iMessage通知用户
  4. 为后续的Photos操作维持会话

Selectors Reference

选择器参考

javascript
// Search box
'input[aria-label="Search your photos"]'

// Photo grid
'.p137Zd' // Photo thumbnails

// Individual photo
'[data-latest-bg]'

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

// Album option
'[aria-label="Album"]'

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

// Favorite button
'[aria-label="Add to favorites"]'

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

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

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

// Albums navigation
'[aria-label="Albums"]'

// Upload button
'[aria-label="Upload"]'
javascript
// 搜索框
'input[aria-label="Search your photos"]'

// 照片网格
'.p137Zd' // 照片缩略图

// 单张照片
'[data-latest-bg]'

// 创建按钮
'[aria-label="Create"]'

// 相册选项
'[aria-label="Album"]'

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

// 收藏按钮
'[aria-label="Add to favorites"]'

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

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

// 编辑按钮
'[aria-label="Edit"]'

// 相册导航
'[aria-label="Albums"]'

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

Search Operators

搜索运算符

dog                    // Content search
beach sunset          // Multiple terms
"vacation 2024"       // Exact phrase
selfie                // Photo type
screenshot            // Photo type
food                  // Content category
wedding               // Event type
Tokyo                 // Location
2024-06               // Date (June 2024)
last week             // Relative date
videos                // Media type
dog                    // 内容搜索
beach sunset          // 多个关键词
"vacation 2024"       // 精确短语
selfie                // 照片类型
screenshot            // 照片类型
food                  // 内容分类
wedding               // 活动类型
Tokyo                 // 地点
2024-06               // 日期(2024年6月)
last week             // 相对日期
videos                // 媒体类型

Error Handling

错误处理

  • Login Failed: Retry 3 times, notify user via iMessage
  • Session Expired: Re-authenticate automatically
  • Photo Not Found: Broaden search, check archive and trash
  • Album Creation Failed: Retry, verify photo selection
  • Share Failed: Check sharing settings, verify recipients
  • Storage Full: Notify user, suggest storage management
  • Download Failed: Retry, try individual photos vs batch
  • 登录失败:重试3次,通过iMessage通知用户
  • 会话过期:自动重新认证
  • 未找到照片:扩大搜索范围,检查归档和回收站
  • 相册创建失败:重试,验证照片选择
  • 分享失败:检查分享设置,验证收件人
  • 存储空间已满:通知用户,建议进行存储空间管理
  • 下载失败:重试,尝试单张照片下载而非批量下载

Self-Improvement Instructions

自我改进说明

When you learn a better way to accomplish a task with Google Photos:
  1. Document the improvement in your response
  2. Suggest updating this skill file with the new approach
  3. Include specific search terms that work well
  4. Note any face recognition or AI search improvements
当你发现使用Google Photos完成任务的更优方法时:
  1. 在回复中记录该改进点
  2. 建议使用新方法更新此技能文件
  3. 包含效果良好的特定搜索关键词
  4. 记录面部识别或AI搜索的任何改进

Notes

注意事项

  • Free storage ended June 2021; now counts against Google One quota
  • AI search can find objects, scenes, text in photos
  • Face grouping requires enabling in settings
  • Partner sharing allows automatic sharing with one person
  • Location data from EXIF or estimated from content
  • Original quality vs storage saver affects file size
  • Live Photos from iPhone preserved as motion photos
  • Trash items deleted after 60 days
  • 免费存储空间于2021年6月结束;现在将占用Google One配额
  • AI搜索可识别照片中的物体、场景和文字
  • 面部分组需在设置中启用
  • 伙伴共享功能允许自动与指定联系人共享内容
  • 位置数据来自EXIF或通过内容估算
  • 原始质量与存储空间节省模式会影响文件大小
  • iPhone的Live Photos将保留为动态照片
  • 回收站中的项目会在60天后被永久删除