instagram

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Instagram Skill

Instagram 技能

Overview

概述

Automates Instagram operations including posting content, managing stories, engaging with followers, and analyzing insights through the web interface.
通过网页界面自动化Instagram操作,包括发布内容、管理Stories、与粉丝互动以及查看分析数据。

Quick Install

快速安装

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

Setup

设置

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

First, ensure canifi-env is installed:

First, ensure canifi-env is installed:

canifi-env set INSTAGRAM_USERNAME "your-username" canifi-env set INSTAGRAM_PASSWORD "your-password"
undefined
canifi-env set INSTAGRAM_USERNAME "your-username" canifi-env set INSTAGRAM_PASSWORD "your-password"
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

功能特性

  • Create and publish posts
  • Upload and manage stories
  • Like and comment on posts
  • Follow/unfollow accounts
  • Search users and hashtags
  • View and respond to DMs (see instagram-dms)
  • Access insights and analytics
  • Save posts to collections
  • 创建并发布帖子
  • 上传并管理Stories
  • 点赞并评论帖子
  • 关注/取消关注账号
  • 搜索用户和话题标签
  • 查看并回复私信(详见instagram-dms)
  • 访问洞察分析数据
  • 将帖子保存到收藏夹

Usage Examples

使用示例

Example 1: Create a Post

示例1:创建帖子

User: "Post this photo to Instagram with a caption about the sunset"
Claude: I'll create that Instagram post.
- Navigate to instagram.com
- Click create post
- Upload photo
- Write sunset caption with hashtags
- Publish post
- Confirm posted successfully
用户:"把这张照片发布到Instagram,配一段关于日落的文案"
Claude:我会创建这个Instagram帖子。
- 导航至instagram.com
- 点击创建帖子
- 上传照片
- 撰写带话题标签的日落文案
- 发布帖子
- 确认发布成功

Example 2: Engage with Content

示例2:互动操作

User: "Like the last 5 posts from @naturephotography"
Claude: I'll engage with those posts.
- Navigate to @naturephotography profile
- View recent posts
- Like last 5 posts
- Confirm engagement complete
用户:"点赞@naturephotography的最近5条帖子"
Claude:我会完成这些互动操作。
- 导航至@naturephotography的个人主页
- 查看最新帖子
- 点赞最近5条帖子
- 确认互动完成

Example 3: Check Insights

示例3:查看洞察数据

User: "Show me my Instagram insights for this week"
Claude: I'll pull your insights.
- Navigate to Insights section
- Gather this week's metrics
- Compile reach, engagement, followers
- Present analytics summary
用户:"展示我本周的Instagram洞察数据"
Claude:我会获取你的洞察数据。
- 导航至洞察分析板块
- 收集本周的指标数据
- 整理覆盖人数、互动量、粉丝数
- 呈现分析总结

Example 4: Search Hashtag

示例4:搜索话题标签

User: "Find top posts for #travelgram"
Claude: I'll search that hashtag.
- Navigate to hashtag search
- Search #travelgram
- Display top and recent posts
- Summarize engagement levels
用户:"查找#travelgram的热门帖子"
Claude:我会搜索这个话题标签。
- 导航至话题标签搜索页
- 搜索#travelgram
- 展示热门和最新帖子
- 总结互动热度

Authentication Flow

认证流程

  1. Navigate to instagram.com via Playwright MCP
  2. Enter username and password from canifi-env
  3. Handle suspicious login verification (notify user)
  4. Complete 2FA if enabled (notify user via iMessage)
  5. Handle "Save Login Info" prompt
  6. Verify feed access
  7. Maintain session cookies
  1. 通过Playwright MCP导航至instagram.com
  2. 从canifi-env中读取用户名和密码并输入
  3. 处理异常登录验证(通知用户)
  4. 若启用双重认证则完成验证(通过iMessage通知用户)
  5. 处理"保存登录信息"提示
  6. 验证是否可访问动态 feed
  7. 维持会话Cookie

Error Handling

错误处理

  • Login Failed: Clear cookies, verify credentials
  • Session Expired: Re-authenticate automatically
  • 2FA Required: iMessage for verification code
  • Suspicious Login: Notify user to verify via app
  • Rate Limited: Wait and implement backoff
  • Content Blocked: Check community guidelines
  • Account Restricted: Notify user of temporary block
  • Upload Failed: Check file format and size
  • 登录失败:清除Cookie,验证凭证
  • 会话过期:自动重新认证
  • 需要双重认证:通过iMessage发送验证码通知
  • 异常登录:通知用户通过应用验证
  • 请求受限:等待并实现退避机制
  • 内容被拦截:检查社区规范
  • 账号受限:通知用户账号被临时限制
  • 上传失败:检查文件格式和大小

Self-Improvement Instructions

自我改进说明

When encountering new Instagram features:
  1. Document new UI elements and flows
  2. Add support for new content types
  3. Log successful posting patterns
  4. Update for reels and stories changes
当遇到Instagram新功能时:
  1. 记录新的UI元素和流程
  2. 添加对新内容类型的支持
  3. 记录成功发布的模式
  4. 针对Reels和Stories的更新进行适配

Notes

注意事项

  • Instagram frequently updates UI
  • Creator/Business accounts have more features
  • Insights require Professional account
  • Some features only available in mobile app
  • Posting times affect engagement
  • Hashtag limits: 30 per post
  • Story content expires in 24 hours
  • Instagram经常更新UI
  • 创作者/商业账号拥有更多功能
  • 洞察数据需要专业账号权限
  • 部分功能仅在移动端应用可用
  • 发布时间会影响互动效果
  • 帖子最多可添加30个话题标签
  • Story内容24小时后过期