Glasses-to-Social
Transform photos from smart glasses into social media posts with AI-generated captions.
Overview
This skill creates a pipeline from smart glasses (Meta Ray-Ban, etc.) to social media:
- 1. User snaps photo with glasses
- Photo syncs to Google Drive folder
- Agent detects new photo, analyzes with vision
- Agent drafts post matching user's voice/style
- User approves, agent publishes
Setup
1. Configure Google Drive Folder
Create a shared Google Drive folder for glasses photos:
CODEBLOCK0
2. Set Up Config
Create config file at glasses-to-social/config.json:
CODEBLOCK1
3. Configure Glasses Auto-Sync
For Meta Ray-Ban glasses:
- 1. Open Meta View app on phone
- Settings > Gallery > Enable "Import Automatically"
- iOS: Enable Google Photos backup (syncs Camera Roll)
- Create iOS Shortcut to copy new Meta photos to Google Drive folder
Usage
Manual Check
Ask the agent to check for new photos:
CODEBLOCK2
Automated Monitoring
Set up a cron job to check periodically:
CODEBLOCK3
Processing Flow
When a new photo is detected:
- 1. Download from Google Drive using
gdown:
CODEBLOCK4
- 2. Compare against processed list in INLINECODE2
- 3. For new photos, analyze with vision:
- Describe the scene/subject
- Identify relevant context for social post
- Note any text, people, or notable elements
- 4. Draft post matching user's voice:
- Keep it concise and authentic
- Add relevant hashtags
- First-person perspective works well for glasses content
- 5. Send draft to user for approval:
- Include image preview
- Show proposed caption
- Wait for "POST" confirmation or edits
- 6. On approval, publish to configured platform (X/Twitter, etc.)
- 7. Mark photo as processed in INLINECODE3
Scripts
check-new-photos.sh
Checks Google Drive folder for new images:
CODEBLOCK5
Output format when new photo found:
CODEBLOCK6
File Tracking
Track processed photos in data/processed.json:
CODEBLOCK7
Tips
- - First-person POV content performs well ("Look what I just saw...")
- Keep captions authentic, not overly polished
- Works great for conferences, interesting sightings, daily moments
- Consider time-of-day context when drafting
Requirements
- -
gdown Python package for Google Drive access - Vision-capable model for image analysis
- Twitter/X credentials for posting (optional)
眼镜到社交
将智能眼镜拍摄的照片通过AI生成标题,转化为社交媒体帖子。
概述
本技能创建了一条从智能眼镜(Meta Ray-Ban等)到社交媒体的处理流程:
- 1. 用户用眼镜拍摄照片
- 照片同步至Google Drive文件夹
- 智能体检测新照片,通过视觉分析
- 智能体草拟符合用户语气/风格的帖子
- 用户批准后,智能体发布
设置
1. 配置Google Drive文件夹
为眼镜照片创建一个共享的Google Drive文件夹:
bash
用户在Google Drive中创建Glasses-to-Social文件夹
设置为拥有链接的任何人可查看
复制文件夹URL
2. 设置配置文件
在glasses-to-social/config.json创建配置文件:
json
{
googleDriveFolderUrl: https://drive.google.com/drive/folders/YOURFOLDERID,
folderId: YOURFOLDERID,
downloadPath: ./glasses-to-social/downloads,
processedFile: ./glasses-to-social/data/processed.json,
defaultHashtags: [#MedicalAI, #HealthTech],
autoPost: false
}
3. 配置眼镜自动同步
对于Meta Ray-Ban眼镜:
- 1. 在手机上打开Meta View应用
- 设置 > 相册 > 开启自动导入
- iOS:启用Google Photos备份(同步相机胶卷)
- 创建iOS快捷指令,将新的Meta照片复制到Google Drive文件夹
使用
手动检查
让智能体检查新照片:
检查我的眼镜文件夹是否有新照片
自动监控
设置定时任务定期检查:
json
{
name: 眼镜到社交:检查照片,
schedule: {kind: cron, expr: /15 *, tz: UTC},
payload: {
message: 检查Glasses-to-Social文件夹是否有新照片。如有发现,进行分析并草拟推文。
}
}
处理流程
检测到新照片时:
- 1. 使用gdown从Google Drive下载:
bash
gdown --folder FOLDER_URL -O ./downloads/ --remaining-ok
- 2. 与data/processed.json中的已处理列表对比
- 3. 对新照片进行视觉分析:
- 描述场景/主体
- 识别社交媒体帖子的相关上下文
- 记录任何文字、人物或显著元素
- 4. 草拟符合用户语气的帖子:
- 保持简洁真实
- 添加相关话题标签
- 第一人称视角适合眼镜内容
- 5. 将草稿发送给用户审批:
- 包含图片预览
- 显示建议标题
- 等待发布确认或修改
- 6. 批准后,发布到配置的平台(X/Twitter等)
- 7. 在data/processed.json中将照片标记为已处理
脚本
check-new-photos.sh
检查Google Drive文件夹中的新图片:
bash
scripts/check-new-photos.sh
发现新照片时的输出格式:
NEWPHOTOPATH:/path/to/downloaded/photo.jpg
文件追踪
在data/processed.json中追踪已处理的照片:
json
{
processed: [photo1.jpg, photo2.jpg],
pending: []
}
提示
- - 第一人称视角内容效果更好(看看我刚才看到了什么...)
- 保持标题真实自然,不要过度修饰
- 非常适合会议、有趣见闻、日常瞬间
- 草拟时考虑时间背景
要求
- - 用于访问Google Drive的gdown Python包
- 具备图像分析能力的视觉模型
- 用于发布的Twitter/X账号凭证(可选)