[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77JK5WAA644V8H7YS3Q2FXT":3,"skill-same:01M77JK5WAA644V8H7YS3Q2FXT":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M77JK5WAA644V8H7YS3Q2FXT","instagram-account-operations",null,"Operating doctrine for Instagram account automation — careful creator + business pattern via Meta Business Suite, role separation, action-block awareness (24h\u002F7d\u002Fpermanent), comment + DM ops (Playwright click + type + Enter), reply qualification, hashtag-shadowban discipline, and recovery. Use this for any scheduled IG activity (cron, agent, recurring task) where account safety and Reels reach matter more than raw output.","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fi\u002Finstagram-account-operations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: instagram-account-operations\ndescription: Operating doctrine for Instagram account automation — careful creator + business pattern via Meta Business Suite, role separation, action-block awareness (24h\u002F7d\u002Fpermanent), comment + DM ops (Playwright click + type + Enter), reply qualification, hashtag-shadowban discipline, and recovery. Use this for any scheduled IG activity (cron, agent, recurring task) where account safety and Reels reach matter more than raw output.\n---\n\n# Instagram Account Operations\n\nThis skill is the operating doctrine for every Instagram automation run on a brand, professional or personal account.\n\n**The goal is not to comment fast. The goal is to operate Instagram like a careful, helpful human contributor: stable browser, correct context (Meta Business Suite), useful action, no action block, no shadowban risk.**\n\nDrop-in for any niche (legal, medical, software, finance, creator, ecommerce). Replace the placeholders in section 0 with your own values.\n\n---\n\n## 0. Configure for your brand\n\nBefore running anything, fill these placeholders in your local copy or your agent's memory:\n\n| Placeholder | Example | Your value |\n|---|---|---|\n| `\u003CBRAND_NAME>` | \"Acme Studio\" | — |\n| `\u003CBRAND_DOMAIN>` | \"acme.studio\" | — |\n| `\u003CIG_HANDLE>` | \"@acmestudio\" | — |\n| `\u003CMETA_BUSINESS_ID>` | numeric ID from business.facebook.com → Settings | — |\n| `\u003CMETA_ASSET_ID>` | numeric ID of the IG account asset in MBS | — |\n| `\u003CBROWSER_PROFILE>` | \"instagram-live\" | — |\n| `\u003CBROWSER_PORT>` | \"18802\" | — |\n| `\u003CNICHE_KEYWORDS>` | \"lost license OR speeding ticket\" | — |\n| `\u003CPRIMARY_CTA>` | \"WhatsApp \u002F form \u002F app — pick ONE\" | — |\n| `\u003CWORKSPACE_DIR>` | \"~\u002F.openclaw\u002Fworkspace\u002Finstagram-\u003Cbrand>\" | — |\n\nAll shell snippets below assume an [OpenClaw](https:\u002F\u002Fopenclaw.ai) browser CLI bound by CDP, but the doctrine works with any browser-automation stack (Playwright, Puppeteer, Chrome MCP). Swap the CLI calls for your own.\n\n### Quick config (copy-paste YAML)\n\nIf your agent reads config from YAML, drop this in `\u003CWORKSPACE_DIR>\u002Fconfig.yaml`:\n\n```yaml\nbrand:\n  name: \u003CBRAND_NAME>\n  domain: \u003CBRAND_DOMAIN>\n\ninstagram:\n  handle: \u003CIG_HANDLE>\n  account_type: business | creator    # business strongly recommended for MBS access\n  browser_profile: \u003CBROWSER_PROFILE>  # e.g. \"instagram-live\"\n  browser_port: \u003CBROWSER_PORT>        # e.g. 18802\n\nmeta_business_suite:\n  business_id: \u003CMETA_BUSINESS_ID>\n  asset_id: \u003CMETA_ASSET_ID>\n  base_url: https:\u002F\u002Fbusiness.facebook.com\u002Flatest\u002Finbox\n\ndiscovery:\n  niche_keywords: \u003CNICHE_KEYWORDS>\n\ncta:\n  primary: \u003CPRIMARY_CTA>              # one channel only\n\nworkspace:\n  dir: \u003CWORKSPACE_DIR>\n\nalerts:\n  channel: telegram | slack | discord\n  webhook: \u003CYOUR_WEBHOOK_URL>\n\nschedule:\n  timezone: Europe\u002FParis\n  windows:\n    dm_check:      \"*\u002F15 9-22 * * *\"       # every 15 min\n    comment_check: \"10,25,40,55 9-22 * * *\" # offset to avoid collision\n    browser_health: \"0 * * * *\"\n    daily_recap:   \"21:00\"\n```\n\n### Compatibility\n\n| Stack | Skill install path |\n|---|---|\n| [Claude Code](https:\u002F\u002Fclaude.ai\u002Fcode) | `~\u002F.claude\u002Fskills\u002Finstagram-account-operations\u002F` |\n| [OpenClaw](https:\u002F\u002Fopenclaw.ai) | `~\u002F.openclaw\u002Fskills\u002Finstagram-account-operations\u002F` |\n| ClawHub-published | one-click install via [clawhub.ai](https:\u002F\u002Fclawhub.ai) |\n| Cursor \u002F Copilot CLI | drop `SKILL.md` into your project's `.cursorrules` or `AGENTS.md` |\n| Any LLM agent reading markdown rules | concatenate `SKILL.md` into your system prompt |\n\n---\n\n## 1. The Meta Business Suite is the only sane surface\n\n**Doctrine: EVERYTHING goes through `business.facebook.com`. Never automate against `instagram.com` directly.**\n\nWhy:\n- No iframes (unlike TikTok).\n- Single UI for **4 channels**: IG DMs, FB Messenger DMs, IG comments, FB comments.\n- Playwright `click + type + press Enter` works out of the box.\n- Built-in CRM-style features: labels, notes, prospect stages.\n- Link previews are auto-generated for the `\u003CPRIMARY_CTA>`.\n- Bypasses `instagram.com`'s \"redirect to `\u002Fdirect\u002Finbox\u002F`\" bug.\n\n### Physical profile\n\nA single browser profile per account:\n\n- `\u003CBROWSER_PROFILE>` (CDP direct, attached to `http:\u002F\u002F127.0.0.1:\u003CBROWSER_PORT>`)\n\nThe IG account must be **logged into Meta Business Suite** in this profile and have an Asset assigned to a Business — otherwise the URLs below will 404 or redirect to a setup wizard.\n\n```bash\nopenclaw browser --browser-profile \u003CBROWSER_PROFILE> status\nopenclaw browser --browser-profile \u003CBROWSER_PROFILE> navigate https:\u002F\u002Fbusiness.facebook.com\u002Flatest\u002Finbox\u002Fall\u002F?business_id=\u003CMETA_BUSINESS_ID>&asset_id=\u003CMETA_ASSET_ID>\nopenclaw browser --browser-profile \u003CBROWSER_PROFILE> snapshot --limit 200\n```\n\n### Canonical URLs (per tab)\n\n| Tab | URL fragment |\n|---|---|\n| All messages (IG DMs + FB Messenger DMs) | `\u002Flatest\u002Finbox\u002Fall?asset_id=\u003CMETA_ASSET_ID>&business_id=\u003CMETA_BUSINESS_ID>` |\n| Messenger only (FB DMs) | `\u002Flatest\u002Finbox\u002Fmessenger?asset_id=\u003CMETA_ASSET_ID>&business_id=\u003CMETA_BUSINESS_ID>` |\n| Instagram DMs only | `\u002Flatest\u002Finbox\u002Finstagram_direct?asset_id=\u003CMETA_ASSET_ID>&business_id=\u003CMETA_BUSINESS_ID>` |\n| Instagram comments | `\u002Flatest\u002Finbox\u002Finstagram?asset_id=\u003CMETA_ASSET_ID>&business_id=\u003CMETA_BUSINESS_ID>` |\n| Facebook comments | `\u002Flatest\u002Finbox\u002Ffacebook?asset_id=\u003CMETA_ASSET_ID>&business_id=\u003CMETA_BUSINESS_ID>` |\n\nThis skill covers IG-specific concerns; for FB-specific doctrine (Pages, groups, page moderation), see the companion `facebook-account-operations` skill.\n\n### Roles (mental separation, single physical profile)\n\n#### Role: `ig-post`\n\nAccount cockpit (acting as the brand). Use for:\n- DM replies in MBS All \u002F IG Direct tab.\n- Comment replies in MBS IG Comments tab.\n- Direct profile checks (only when MBS doesn't expose the metric).\n\nDefault page: MBS `inbox\u002Fall`.\n\n#### Role: `ig-engage`\n\nDiscovery. Use for:\n- Reading public conversations under your own posts (in MBS).\n- Inspecting a candidate user's profile before replying to a comment (open in a new tab on `instagram.com`, but DO NOT act from there).\n\nDefault page: MBS `inbox\u002Finstagram` (comments tab).\n\n#### Role: `ig-stealth`\n\nQuiet maintenance. Use for:\n- Story view audits.\n- Hashtag-state checks (open hashtag in incognito, NOT in this profile).\n\nDefault page: MBS dashboard.\n\n### Operational law\n\n- `ig-post` = act as the account via MBS.\n- `ig-engage` = discover and qualify, NEVER act outside MBS.\n- `ig-stealth` = maintain and observe.\n- Stability matters more than speed.\n- After every run, return to MBS `inbox\u002Fall`.\n\n---\n\n## 2. Session check (run first on every cron)\n\n```bash\nopenclaw browser --browser-profile \u003CBROWSER_PROFILE> status\nopenclaw browser --browser-profile \u003CBROWSER_PROFILE> navigate \"https:\u002F\u002Fbusiness.facebook.com\u002Flatest\u002Finbox\u002Fall\u002F?business_id=\u003CMETA_BUSINESS_ID>&asset_id=\u003CMETA_ASSET_ID>\"\nopenclaw browser --browser-profile \u003CBROWSER_PROFILE> snapshot --limit 60\n```\n\nCheck:\n- If `status` is `stopped`: report and stop.\n- If the snapshot shows a Facebook login form: session expired, report and stop.\n- If the snapshot shows the MBS chrome but with a \"Reauthenticate to manage this asset\" banner: same — stop and report.\n- If the snapshot shows the inbox with conversation list visible: continue.\n\nNever relaunch Chrome from inside a cron.\n\n---\n\n## 3. Phase gating (action-block awareness)\n\nInstagram does not have karma; it has **action blocks** — a tiered penalty system:\n\n- **Phase A** (account \u003C 30 d, OR last 30 d had an action block, OR less than 500 followers): only inbound DM\u002Fcomment replies inside MBS, **zero outbound actions** (no proactive DMs, no comment-on-other-people's-posts, no following).\n- **Phase B** (account ≥ 30 d, no recent block, ≥ 500 followers, no community-guideline flag): all crons authorized.\n\nAlways read `\u003CWORKSPACE_DIR>\u002Fmemory\u002Fig-state.md` at start (last line = current phase).\n\n### Action-block thresholds (observed, not officially published)\n\n| Action | Frequency that triggers a block |\n|---|---|\n| Follow \u002F unfollow | > 50\u002Fday or > 200\u002Fweek |\n| Comment on others' posts | > 30\u002Fhr or > 200\u002Fday |\n| DMs to non-followers (proactive) | > 10\u002Fday on a young account |\n| Liking | > 60\u002Fhr |\n| Posting | > 5 posts\u002F24h |\n\nA block lasts 24 h (warning), 7 d (second offense), or **permanent** (third+). The thresholds tighten on Phase A accounts.\n\n### Manual override (advanced)\n\nYou can force Phase B by appending `YYYY-MM-DD - phase=B (manual override)` to `ig-state.md`. Use only if the account is grandfathered (verified business, long history, no warnings). Document in `ig-learnings.md`.\n\n---\n\n## 4. Qualification of an inbound DM or comment\n\nA DM or comment is repliable only if **all** of:\n\n- The thread has at least one user-authored message (not a pure share \u002F reel forward — those have no question).\n- The user did NOT just receive a templated auto-reply that they haven't acknowledged.\n- Phase B authorized for proactive \u002F brand-mentioning replies (see §3).\n- The message is a real question or intent in your domain.\n- The same user has not been sent a brand-mentioning reply in the last 7 days (`ig-reply-log.md`).\n\nIf any check fails: skip. Document why in the recap.\n\n### Special: a user shared a Reel with no message\n\nDefault action: **skip silently**. A Reel share without a question is usually a forward to friends; replying creates noise and confuses the conversation.\n\n### Special: existing client recognized\n\nIf the user appears in `ig-clients-known.md`: reply with empathy, **do not paste any link**, redirect to the standard support channel (NOT `\u003CPRIMARY_CTA>` which is for prospects).\n\n---\n\n## 5. Reply templates\n\n### Phase A (warming, NO brand mention)\n\n- 1-3 sentences.\n- Match the conversation tone.\n- No links, no expert-grade advice.\n\n### Phase B (brand-aware, expert)\n\nDM reply (any length, but ≤ 700 chars stays human):\n```\n[Acknowledge the situation in 1 sentence, neutral tone.]\n\n[General framework in 2-3 short paragraphs.]\n\n[Concrete next step — point to \u003CPRIMARY_CTA>. ONE channel only.]\n```\n\nComment reply (≤ 200 chars, prefix with `@username` to target the parent comment):\n```\n@username [contextual acknowledgement]. [Indirect signal — \"DM us\" or \"form on profile\"].\n```\n\n### What never to paste verbatim\n\n- Anything with `[brackets]` left in it (final read-through is mandatory).\n- The same opening phrase across more than 2 replies in 7 days.\n- A literal URL inside a DM unless it is the `\u003CPRIMARY_CTA>`'s own link AND it is the second message in the conversation (Meta's link-preview takes 1-2 s; if pasted as the first interaction, IG marks it as spam).\n\n### Brand link policy\n\n- Inside a comment body: NEVER paste a URL. \"Form on profile\" \u002F \"DM us\" is the only allowed signal.\n- Inside a DM: max ONE URL, ONE channel (`\u003CPRIMARY_CTA>`). Never a bit.ly \u002F tinyurl \u002F shortener — IG marks shorteners as spam.\n\n---\n\n## 6. Original posting cadence\n\nOut of scope for the live reactive crons. Recommended rhythm for a Phase B account:\n\n- **Reels**: 3-5\u002Fweek. Hook in first 1.5 s. Vertical 9:16. Native sound or licensed library only.\n- **Carousels**: 2-3\u002Fweek. Educational, multi-slide. Drives saves (the strongest ranking signal).\n- **Stories**: 3-7\u002Fday. Reuse top reel hooks. Polls + sticker engagement = strong reach signal.\n- **Lives**: ad hoc, max 1\u002Fweek. Plan, don't ad-lib.\n- **Static feed posts**: out, except for branded covers.\n\nHashtag discipline (Reels + posts):\n- 3-5 hashtags per post (the \"30 hashtags\" old advice is dead — IG reduced the cap and over-tagging looks spammy).\n- 1 broad + 2-3 niche + 1 micro (\u003C 50k posts).\n- Re-check the `\u003CWORKSPACE_DIR>\u002Fmemory\u002Fig-hashtag-state.md` registry monthly for shadowbanned tags.\n\n---\n\n## 7. Quotas (hard limits)\n\n| Action | Phase A limit | Phase B limit |\n|--------|---------------|---------------|\n| DMs handled (inbound replies) per 24 h | 20 | 60 |\n| DMs handled per cron run | 4 | 8 |\n| Comment replies handled per 24 h | 30 | 100 |\n| Comment replies handled per cron run | 5 | 10 |\n| Outbound DMs \u002F day (to non-followers) | 0 | 5 |\n| Follows \u002F day | 5 | 20 |\n| Unfollows \u002F day | 5 | 20 |\n| Likes per hour | 30 | 60 |\n| Actions in same conversation | min 60 s apart | min 30 s apart |\n| Actions globally | min 30 s apart | min 15 s apart |\n\nQuota tracking: read `ig-reply-log.md` at start of every run, count entries in the last 24 h, abort early if quotas already met.\n\n---\n\n## 8. Anti-spam triggers\n\n### Content\n\n| Avoid | Use instead |\n|-------|-------------|\n| \"Check link in bio\" repeated | (mention bio at most once per conversation) |\n| `\u003CBRAND_NAME>` more than once per reply | (max one mention) |\n| \"DM me\", \"WhatsApp me\", \"click here\" stacked | (one CTA, one channel — `\u003CPRIMARY_CTA>`) |\n| Phone numbers, emails | (never in comment bodies; OK in DM tail if user explicitly asked) |\n| Emojis in regulated \u002F sober niches | (drop them) |\n| All caps for emphasis | (use sparingly) |\n| Shorteners (bit.ly \u002F tinyurl) | (use the full canonical URL) |\n\n### Behavioral\n\n- Replying within 30 s of a comment going live → bot-like; wait ≥ 2 min.\n- Same opening phrase across multiple replies → flagged. Vary the first 1-2 words.\n- > 6 actions in 10 min → rate limit on that role.\n- Following + liking the same user's last 5 posts within 1 min → instant action block.\n- Sending the same DM body to > 3 users in 24 h → \"Action blocked\" toast within minutes.\n\n---\n\n## 9. Operational flow inside Meta Business Suite\n\nReactive DM + comment ops run inside MBS exclusively. The flow below is validated end-to-end.\n\n### DM check \u002F reply (validated)\n\nURL: `https:\u002F\u002Fbusiness.facebook.com\u002Flatest\u002Finbox\u002Fall?business_id=\u003CMETA_BUSINESS_ID>&asset_id=\u003CMETA_ASSET_ID>`\n\n1. Pre-flight session check (see §2).\n2. Navigate to the `all` tab. Wait 5 s for the conversation list to render.\n3. **Filter for unread** by clicking the \"Unread\" filter chip, or query the conversation list for nodes with the unread badge.\n4. For each unread conversation, top-to-bottom:\n   a. Click the conversation tile (the user's name).\n   b. **Read the entire message thread** for context — IG conversations often span across the auto-template + user's real reply.\n   c. Qualify (see §4). If skip-eligible, click the next conversation.\n   d. **Click the textbox**: selector `[contenteditable='true']` or `[aria-label*='Reply'], [aria-label*='Répondre']`.\n   e. **Type the message** via Playwright `type` (or `evaluate` with `document.execCommand('insertText', false, msg)` ONLY if `contenteditable` is a vanilla React-controlled input — verify first).\n   f. **Press Enter** to send. Do NOT click \"Send\" — there are visual duplicates of the send button and a Playwright `click` sometimes lands on the wrong one. Enter is unambiguous.\n5. After sending, the textbox empties; verify before moving to the next conversation.\n6. After processing all unread, switch to the `Messenger` tab and to the `Instagram` tab in turn to catch any FB-only or IG-only inboxes that didn't surface in `all`.\n\n### Comment reply (validated — partial)\n\nURL: `https:\u002F\u002Fbusiness.facebook.com\u002Flatest\u002Finbox\u002Finstagram?business_id=\u003CMETA_BUSINESS_ID>&asset_id=\u003CMETA_ASSET_ID>`\n\nThe comments tab is **less stable than DMs** — see \"Known issue\" below.\n\n1. Navigate to the comments tab. Wait 5 s.\n2. Posts with new comments appear in the left rail with an unread badge.\n3. For each post:\n   a. Click the post tile.\n   b. Comments render in the right pane.\n   c. For each lead-qualified comment:\n      - **Find the page-level \"Ajoutez un commentaire...\" \u002F \"Add a comment...\"** textarea **at the bottom** of the right pane.\n      - Type `@username your reply` (the `@username` prefix targets the parent comment without clicking \"Reply\").\n      - **Click the send-arrow button** (SVG arrow to the right of the textarea) — Enter does NOT submit a comment in this UI.\n\n### Known issue: do NOT click \"Reply\" on comments\n\nClicking the \"Reply\" affordance under a comment navigates the right pane to a different post (Meta's SPA bug, present in 2025-2026). The validated workaround is `@username` prefix + page-level textarea + send-arrow click — described above.\n\nIf you must produce a true nested reply (rare): open the post URL on `instagram.com` in a separate ig-engage tab, reply there manually, then mark the conversation done in `ig-reply-log.md`. Do not script the `instagram.com` reply path — Instagram's anti-automation is much tighter than MBS.\n\n### Selectors quick-reference\n\n| Element | Selector |\n|---|---|\n| DM textbox | `[contenteditable='true']` or `[aria-label*='Reply'], [aria-label*='Répondre']` |\n| DM send (preferred) | `press Enter` |\n| Comment textarea | `textarea[placeholder*='comment'], textarea[placeholder*='commentaire']` |\n| Comment send | the SVG arrow button to the right of the textarea — `[aria-label*='Send'], [aria-label*='Envoyer']` |\n| Conversation tile | `text=\u003Cuser's display name>` |\n| Tab \"Messenger\" | `text=Messenger` |\n| Tab \"Instagram\" | `text=Instagram` (the DMs tab) |\n| Tab \"Commentaires Instagram\" | `text=Instagram` (in comments URL — same string, different URL) |\n| Unread filter chip | `text=Unread, text=Non lu` |\n\n### Exit codes (recommended convention)\n\n| Code | Meaning | Recap action |\n|------|---------|--------------|\n| 0 | Replies sent, verified | `status: ok` |\n| 1 | Fatal error (selector missing, MBS error toast) | `status: error`, attach screenshot |\n| 2 | \"Action blocked\" \u002F \"Try again later\" toast | `status: blocked`, flip the role to Phase A pause |\n| 3 | Session expired (login form rendered) | `status: blocked`, alert user |\n| 4 | Comment \"Reply\" caused page navigation (known bug — see above) | `status: partial`, log for manual review |\n\n### Gotchas\n\n- **The MBS comment-Reply navigation bug**: still present. Use the `@username` workaround.\n- **Localized labels**: `Reply` \u002F `Répondre`, `Send` \u002F `Envoyer` — maintain a label map and try both in selectors.\n- **MBS soft logout**: after ~48 h of inactivity, MBS asks for re-authentication on next navigation. Treat as session expired (exit 3).\n- **Tab switching**: if you operate on multiple tabs (`all`, `messenger`, `instagram_direct`), wait ≥ 3 s after switching — MBS re-fetches the conversation list and clicking too early lands on stale tiles.\n- **The `Non Lu` \u002F `Unread` filter chip is sometimes mis-clicked**: it has a transparent overlay. Snapshot before clicking.\n- **Cron timeout**: bump to ≥ 1200 s. MBS pages can take 4-6 s to render fully.\n\n---\n\n## 10. Account state management\n\nFile: `\u003CWORKSPACE_DIR>\u002Fmemory\u002Fig-state.md`\n\nFor each day:\n- Phase (A \u002F B).\n- Followers count.\n- Last action-block timestamp + duration.\n- Last community-guideline notice.\n- Posts published today (cap at 5\u002F24h per §6).\n\nFile: `\u003CWORKSPACE_DIR>\u002Fmemory\u002Fig-clients-known.md`\n\nFor each existing client:\n- IG handle.\n- Last contact date.\n- Sensitive flag (do-not-paste-CTA).\n\nUpdate at the end of every run.\n\n---\n\n## 11. Recovery & blockers\n\n| Issue | Action |\n|-------|--------|\n| `status: stopped` | Report, stop. |\n| Login form rendered on MBS | Session expired, alert, stop. |\n| \"Reauthenticate to manage this asset\" banner | Same as login expired. |\n| \"Action blocked — try again later\" toast | Flip the role to Phase A pause for 24 h. Alert. |\n| \"Please verify it's you\" \u002F re-captcha | Stop. Never auto-solve. Alert for manual login. |\n| MBS shows \"Something went wrong\" generic error | Refresh once. If persists, stop and alert. |\n| Comment \"Reply\" click navigated to wrong post | Mark exit 4, fall back to manual via `instagram.com`. |\n| Followers drop > 5 % overnight | Likely shadowban — flip to Phase A, alert. |\n| Two consecutive comments removed within \u003C 10 min of post | Auto-freeze comment cron for 6 h. |\n\n---\n\n## 12. Mandatory recap (alert channel + memory)\n\nAt the end of each cron:\n\n**Alert channel — final run message**:\n```\n[Job name] — [status: ok|partial|blocked|skipped]\nDMs handled: [N or \"—\"]\nComments handled: [N or \"—\"]\nHot leads: [list short OR \"—\"]\nPhase: [A|B]\nBlockers: [text OR \"—\"]\nNext action: [1 line]\n```\n\n**Memory** — append to `\u003CWORKSPACE_DIR>\u002Fmemory\u002Fig-recaps.md`:\n```\n## YYYY-MM-DD HH:MM TZ — \u003Cjob-id> — status: \u003Cstatus>\n- Job: \u003Cdescription>\n- Phase: A|B\n- DMs sent: \u003CN>\n- Comments sent: \u003CN>\n- Hot leads: \u003Clist or \"—\">\n- Blockers: \u003Ctext or \"—\">\n- Next useful action: \u003C1 line>\n```\n\n---\n\n## 13. Memory files inventory\n\nLocated at: `\u003CWORKSPACE_DIR>\u002Fmemory\u002F`\n\n| File | Purpose | Update cadence |\n|------|---------|----------------|\n| `ig-recaps.md` | Per-run logs | Every cron run |\n| `ig-post-log.md` | Reels + carousels + stories (URL, type, date, reach) | Each posting run |\n| `ig-reply-log.md` | DM + comment replies sent | Each reply pass |\n| `ig-state.md` | Daily phase + followers + warning flags | Daily Metrics Recap |\n| `ig-hashtag-state.md` | Per-hashtag reach + shadowban check | Weekly |\n| `ig-clients-known.md` | Existing clients to NEVER pitch | Ad hoc |\n| `ig-ideas.md` | Content backlog | Weekly Planning |\n| `ig-learnings.md` | Patterns (what reached, what got removed) | Weekly + ad hoc |\n| `ig-alerts-sent.md` | Anti-doublon hot-lead alerts | Each alert |\n\n---\n\n## 14. Account identity guardrails\n\n- Handle: brand-aligned but not aggressively promotional (`@drsmithlegal` > `@bestlawyerinparis`).\n- Bio: one line + the single `\u003CPRIMARY_CTA>` link. No emojis, no flag salad in regulated niches.\n- Never reply to a DM that asks for expert-grade advice on a specific case — redirect to `\u003CPRIMARY_CTA>`.\n- Never share private client details, names, or numbers.\n- Never reuse strict CRM templates as IG content.\n- Never promise an outcome (\"you will win\").\n- Never charge or solicit payment in DM.\n- If asked \"are you a bot?\": one sober, ambiguous line, then redirect. Do not confirm AI.\n\n---\n\n## 15. Phase A → Phase B transition\n\nWhen the Daily Metrics Recap detects (account_age_days ≥ 30) AND (followers ≥ 500) AND (last_action_block_days_ago > 30):\n\n1. Append to `ig-state.md`: `YYYY-MM-DD - phase=A - PHASE_B_THRESHOLD_REACHED`.\n2. Send a distinct alert: `🎉 IG account ready for Phase B — review and flip outbound crons manually`.\n3. Manual user flip (no auto-flip).\n4. First week of Phase B: cap reply pass at **3 replies\u002Frun** (not 8).\n5. Daily check on `Action Status` (MBS → Settings → Account Status). Any \"warning\" reverts to Phase A.\n\n---\n\n## 16. Stability discipline\n\n- Read the UI before clicking.\n- One click → verify with a snapshot.\n- Switch tabs only after the previous tab settled.\n- Close stale tabs at the end of every run.\n- Never fake a successful reply — always verify the message landed in the thread.\n\n**Better silence than spam. Better a blockage report than a fake success.**\n\n---\n\n## 17. First-run checklist\n\n- [ ] Section 0 placeholders filled.\n- [ ] IG account is **Business** or **Creator**, linked to a Meta Business Suite asset.\n- [ ] `\u003CMETA_BUSINESS_ID>` and `\u003CMETA_ASSET_ID>` extracted (open MBS, copy from the URL).\n- [ ] Bio is one line + single `\u003CPRIMARY_CTA>` link.\n- [ ] Browser profile launched at `http:\u002F\u002F127.0.0.1:\u003CBROWSER_PORT>` and logged into facebook.com (the MBS gate).\n- [ ] Navigating to `inbox\u002Fall` renders the conversation list (no login form, no setup wizard).\n- [ ] `\u003CWORKSPACE_DIR>\u002Fmemory\u002F` exists with the 9 memory files.\n- [ ] Alert channel webhook tested.\n- [ ] Phase A confirmed: only inbound DM cron enabled.\n- [ ] At least 14 days of manual posting + manual replies before turning on the cron.\n- [ ] Account Status checked (MBS → Settings → Account Status): **green \u002F no warning**.\n\nInit memory:\n\n```bash\nmkdir -p \"\u003CWORKSPACE_DIR>\u002Fmemory\" && cd \"$_\" && touch ig-recaps.md ig-post-log.md ig-reply-log.md ig-state.md ig-hashtag-state.md ig-clients-known.md ig-ideas.md ig-learnings.md ig-alerts-sent.md\n```\n\n---\n\n## 18. FAQ\n\n**Q: Do I need OpenClaw to use this skill?**\nA: No. OpenClaw browser CLI is the example stack — the doctrine works with Playwright (Node or Python), Puppeteer, Chrome MCP, or any CDP-capable tool.\n\n**Q: Can I just use the Instagram Graph API?**\nA: Partially. The Graph API covers `instagram_basic`, `instagram_manage_messages`, `instagram_manage_comments` — if you have an approved app, you can build a more robust webhook-based flow. The doctrine in this skill is the **fallback for accounts not yet approved for Graph API access, or for cases where MBS UI features are needed** (labels, prospect stages, link previews).\n\n**Q: What about multi-account?**\nA: Clone the workspace dir per account. Use a separate browser profile + port. **Each IG account must have its own Meta Business asset** — you can manage multiple assets from one MBS, but they have distinct `\u003CMETA_ASSET_ID>` values.\n\n**Q: My account got an action block during testing. What now?**\nA: Stop everything. Flip to Phase A. Manual usage only for 7-14 days. Document in `ig-learnings.md` the exact last 20 actions. Do NOT appeal automatically.\n\n**Q: Does the doctrine cover Reels Ads \u002F Boost \u002F Shopping?**\nA: No. This skill is for organic + reactive ops only. Ads have a separate dashboard and a separate (different) sanction pattern.\n\n**Q: What's the most common reason this skill's crons get flagged?**\nA: Same opening phrase across replies. Vary the first 1-2 words every time. The second most common: replying within 30 s of a comment landing — wait ≥ 2 min.\n\n**Q: What if my account is suspended (not just action-blocked)?**\nA: Stop everything. Do not appeal automatically — Instagram's appeal flow is sensitive to repeated automated submissions. Manual review only. Document the exact last 20 actions before the suspension in `ig-learnings.md`.\n","# Instagram Account Operations\n\nThis skill is the operating doctrine for every Instagram automation run on a brand, professional or personal account.\n\n**The goal is not to comment fast. The goal is to operate Instagram like a careful, helpful human contributor: stable browser, correct context (Meta Business Suite), useful action, no action block, no shadowban risk.**\n\nDrop-in for any niche (legal, medical, software, finance, creator, ecommerce). Replace the placeholders in section 0 with your own values.\n\n---\n\n## 0. Configure for your brand\n\nBefore running anything, fill these placeholders in your local copy or your agent's memory:\n\n| Placeholder | Example | Your value |\n|---|---|---|\n| `\u003CBRAND_NAME>` | \"Acme Studio\" | — |\n| `\u003CBRAND_DOMAIN>` | \"acme.studio\" | — |\n| `\u003CIG_HANDLE>` | \"@acmestudio\" | — |\n| `\u003CMETA_BUSINESS_ID>` | numeric ID from business.facebook.com → Settings | — |\n| `\u003CMETA_ASSET_ID>` | numeric ID of the IG account asset in MBS | — |\n| `\u003CBROWSER_PROFILE>` | \"instagram-live\" | — |\n| `\u003CBROWSER_PORT>` | \"18802\" | — |\n| `\u003CNICHE_KEYWORDS>` | \"lost license OR speeding ticket\" | — |\n| `\u003CPRIMARY_CTA>` | \"WhatsApp \u002F form \u002F app — pick ONE\" | — |\n| `\u003CWORKSPACE_DIR>` | \"~\u002F.openclaw\u002Fworkspace\u002Finstagram-\u003Cbrand>\" | — |\n\nAll shell snippets below assume an [OpenClaw](https:\u002F\u002Fopenclaw.ai) browser CLI bound by CDP, but the doctrine works with any browser-automation stack (Playwright, Puppeteer, Chrome MCP). Swap the CLI calls for your own.\n\n### Quick config (copy-paste YAML)\n\nIf your agent reads config from YAML, drop this in `\u003CWORKSPACE_DIR>\u002Fconfig.yaml`:\n\n```yaml\nbrand:\n  name: \u003CBRAND_NAME>\n  domain: \u003CBRAND_DOMAIN>\n\ninstagram:\n  handle: \u003CIG_HANDLE>\n  account_type: business | creator    # business strongly recommended for MBS access\n  browser_profile: \u003CBROWSER_PROFILE>  # e.g. \"instagram-live\"\n  browser_port: \u003CBROWSER_PORT>        # e.g. 18802\n\nmeta_business_suite:\n  business_id: \u003CMETA_BUSINESS_ID>\n  asset_id: \u003CMETA_ASSET_ID>\n  base_url: https:\u002F\u002Fbusiness.facebook.com\u002Flatest\u002Finbox\n\ndiscovery:\n  niche_keywords: \u003CNICHE_KEYWORDS>\n\ncta:\n  primary: \u003CPRIMARY_CTA>              # one channel only\n\nworkspace:\n  dir: \u003CWORKSPACE_DIR>\n\nalerts:\n  channel: telegram | slack | discord\n  webhook: \u003CYOUR_WEBHOOK_URL>\n\nschedule:\n  timezone: Europe\u002FParis\n  windows:\n    dm_check:      \"*\u002F15 9-22 * * *\"       # every 15 min\n    comment_check: \"10,25,40,55 9-22 * * *\" # offset to avoid collision\n    browser_health: \"0 * * * *\"\n    daily_recap:   \"21:00\"\n```\n\n### Compatibility\n\n| Stack | Skill install path |\n|---|---|\n| [Claude Code](https:\u002F\u002Fclaude.ai\u002Fcode) | `~\u002F.claude\u002Fskills\u002Finstagram-account-operations\u002F` |\n| [OpenClaw](https:\u002F\u002Fopenclaw.ai) | `~\u002F.openclaw\u002Fskills\u002Finstagram-account-operations\u002F` |\n| ClawHub-published | one-click install via [clawhub.ai](https:\u002F\u002Fclawhub.ai) |\n| Cursor \u002F Copilot CLI | drop `SKILL.md` into your project's `.cursorrules` or `AGENTS.md` |\n| Any LLM agent reading markdown rules | concatenate `SKILL.md` into your system prompt |\n\n---\n\n## 1. The Meta Business Suite is the only sane surface\n\n**Doctrine: EVERYTHING goes through `business.facebook.com`. Never automate against `instagram.com` directly.**\n\nWhy:\n- No iframes (unlike TikTok).\n- Single UI for **4 channels**: IG DMs, FB Messenger DMs, IG comments, FB comments.\n- Playwright `click + type + press Enter` works out of the box.\n- Built-in CRM-style features: labels, notes, prospect stages.\n- Link previews are auto-generated for the `\u003CPRIMARY_CTA>`.\n- Bypasses `instagram.com`'s \"redirect to `\u002Fdirect\u002Finbox\u002F`\" bug.\n\n### Physical profile\n\nA single browser profile per account:\n\n- `\u003CBROWSER_PROFILE>` (CDP direct, attached to `http:\u002F\u002F127.0.0.1:\u003CBROWSER_PORT>`)\n\nThe IG account must be **logged into Meta Business Suite** in this profile and have an Asset assigned to a Business — otherwise the URLs below will 404 or redirect to a setup wizard.\n\n```bash\nopenclaw browser --browser-profile \u003CBROWSER_PROFILE> status\nopenclaw browser --browser-profile \u003CBROWSER_PROFILE> navigate https:\u002F\u002Fbusiness.facebook.com\u002Flatest\u002Finbox\u002Fall\u002F?business_id=\u003CMETA_BUSINESS_ID>&asset_id=\u003CMETA_ASSET_ID>\nopenclaw browser --browser-profile \u003CBROWSER_PROFILE> snapshot --limit 200\n```\n\n### Canonical URLs (per tab)\n\n| Tab | URL fragment |\n|---|---|\n| All messages (IG DMs + FB Messenger DMs) | `\u002Flatest\u002Finbox\u002Fall?asset_id=\u003CMETA_ASSET_ID>&business_id=\u003CMETA_BUSINESS_ID>` |\n| Messenger only (FB DMs) | `\u002Flatest\u002Finbox\u002Fmessenger?asset_id=\u003CMETA_ASSET_ID>&business_id=\u003CMETA_BUSINESS_ID>` |\n| Instagram DMs only | `\u002Flatest\u002Finbox\u002Finstagram_direct?asset_id=\u003CMETA_ASSET_ID>&business_id=\u003CMETA_BUSINESS_ID>` |\n| Instagram comments | `\u002Flatest\u002Finbox\u002Finstagram?asset_id=\u003CMETA_ASSET_ID>&business_id=\u003CMETA_BUSINESS_ID>` |\n| Facebook comments | `\u002Flatest\u002Finbox\u002Ffacebook?asset_id=\u003CMETA_ASSET_ID>&business_id=\u003CMETA_BUSINESS_ID>` |\n\nThis skill covers IG-specific concerns; for FB-specific doctrine (Pages, groups, page moderation), see the companion `facebook-account-operations` skill.\n\n### Roles (mental separation, single physical profile)\n\n#### Role: `ig-post`\n\nAccount cockpit (acting as the brand). Use for:\n- DM replies in MBS All \u002F IG Direct tab.\n- Comment replies in MBS IG Comments tab.\n- Direct profile checks (only when MBS doesn't expose the metric).\n\nDefault page: MBS `inbox\u002Fall`.\n\n#### Role: `ig-engage`\n\nDiscovery. Use for:\n- Reading public conversations under your own posts (in MBS).\n- Inspecting a candidate user's profile before replying to a comment (open in a new tab on `instagram.com`, but DO NOT act from there).\n\nDefault page: MBS `inbox\u002Finstagram` (comments tab).\n\n#### Role: `ig-stealth`\n\nQuiet maintenance. Use for:\n- Story view audits.\n- Hashtag-state checks (open hashtag in incognito, NOT in this profile).\n\nDefault page: MBS dashboard.\n\n### Operational law\n\n- `ig-post` = act as the account via MBS.\n- `ig-engage` = discover and qualify, NEVER act outside MBS.\n- `ig-stealth` = maintain and observe.\n- Stability matters more than speed.\n- After every run, return to MBS `inbox\u002Fall`.\n\n---\n\n## 2. Session check (run first on every cron)\n\n```bash\nopenclaw browser --browser-profile \u003CBROWSER_PROFILE> status\nopenclaw browser --browser-profile \u003CBROWSER_PROFILE> navigate \"https:\u002F\u002Fbusiness.facebook.com\u002Flatest\u002Finbox\u002Fall\u002F?business_id=\u003CMETA_BUSINESS_ID>&asset_id=\u003CMETA_ASSET_ID>\"\nopenclaw browser --browser-profile \u003CBROWSER_PROFILE> snapshot --limit 60\n```\n\nCheck:\n- If `status` is `stopped`: report and stop.\n- If the snapshot shows a Facebook login form: session expired, report and stop.\n- If the snapshot shows the MBS chrome but with a \"Reauthenticate to manage this asset\" banner: same — stop and report.\n- If the snapshot shows the inbox with conversation list visible: continue.\n\nNever relaunch Chrome from inside a cron.\n\n---\n\n## 3. Phase gating (action-block awareness)\n\nInstagram does not have karma; it has **action blocks** — a tiered penalty system:\n\n- **Phase A** (account \u003C 30 d, OR last 30 d had an action block, OR less than 500 followers): only inbound DM\u002Fcomment replies inside MBS, **zero outbound actions** (no proactive DMs, no comment-on-other-people's-posts, no following).\n- **Phase B** (account ≥ 30 d, no recent block, ≥ 500 followers, no community-guideline flag): all crons authorized.\n\nAlways read `\u003CWORKSPACE_DIR>\u002Fmemory\u002Fig-state.md` at start (last line = current phase).\n\n### Action-block thresholds (observed, not officially published)\n\n| Action | Frequency that triggers a block |\n|---|---|\n| Follow \u002F unfollow | > 50\u002Fday or > 200\u002Fweek |\n| Comment on others' posts | > 30\u002Fhr or > 200\u002Fday |\n| DMs to non-followers (proactive) | > 10\u002Fday on a young account |\n| Liking | > 60\u002Fhr |\n| Posting | > 5 posts\u002F24h |\n\nA block lasts 24 h (warning), 7 d (second offense), or **permanent** (third+). The thresholds tighten on Phase A accounts.\n\n### Manual override (advanced)\n\nYou can force Phase B by appending `YYYY-MM-DD - phase=B (manual override)` to `ig-state.md`. Use only if the account is grandfathered (verified business, long history, no warnings). Document in `ig-learnings.md`.\n\n---\n\n## 4. Qualification of an inbound DM or comment\n\nA DM or comment is repliable only if **all** of:\n\n- The thread has at least one user-authored message (not a pure share \u002F reel forward — those have no question).\n- The user did NOT just receive a templated auto-reply that they haven't acknowledged.\n- Phase B authorized for proactive \u002F brand-mentioning replies (see §3).\n- The message is a real question or intent in your domain.\n- The same user has not been sent a brand-mentioning reply in the last 7 days (`ig-reply-log.md`).\n\nIf any check fails: skip. Document why in the recap.\n\n### Special: a user shared a Reel with no message\n\nDefault action: **skip silently**. A Reel share without a question is usually a forward to friends; replying creates noise and confuses the conversation.\n\n### Special: existing client recognized\n\nIf the user appears in `ig-clients-known.md`: reply with empathy, **do not paste any link**, redirect to the standard support channel (NOT `\u003CPRIMARY_CTA>` which is for prospects).\n\n---\n\n## 5. Reply templates\n\n### Phase A (warming, NO brand mention)\n\n- 1-3 sentences.\n- Match the conversation tone.\n- No links, no expert-grade advice.\n\n### Phase B (brand-aware, expert)\n\nDM reply (any length, but ≤ 700 chars stays human):\n```\n[Acknowledge the situation in 1 sentence, neutral tone.]\n\n[General framework in 2-3 short paragraphs.]\n\n[Concrete next step — point to \u003CPRIMARY_CTA>. ONE channel only.]\n```\n\nComment reply (≤ 200 chars, prefix with `@username` to target the parent comment):\n```\n@username [contextual acknowledgement]. [Indirect signal — \"DM us\" or \"form on profile\"].\n```\n\n### What never to paste verbatim\n\n- Anything with `[brackets]` left in it (final read-through is mandatory).\n- The same opening phrase across more than 2 replies in 7 days.\n- A literal URL inside a DM unless it is the `\u003CPRIMARY_CTA>`'s own link AND it is the second message in the conversation (Meta's link-preview takes 1-2 s; if pasted as the first interaction, IG marks it as spam).\n\n### Brand link policy\n\n- Inside a comment body: NEVER paste a URL. \"Form on profile\" \u002F \"DM us\" is the only allowed signal.\n- Inside a DM: max ONE URL, ONE channel (`\u003CPRIMARY_CTA>`). Never a bit.ly \u002F tinyurl \u002F shortener — IG marks shorteners as spam.\n\n---\n\n## 6. Original posting cadence\n\nOut of scope for the live reactive crons. Recommended rhythm for a Phase B account:\n\n- **Reels**: 3-5\u002Fweek. Hook in first 1.5 s. Vertical 9:16. Native sound or licensed library only.\n- **Carousels**: 2-3\u002Fweek. Educational, multi-slide. Drives saves (the strongest ranking signal).\n- **Stories**: 3-7\u002Fday. Reuse top reel hooks. Polls + sticker engagement = strong reach signal.\n- **Lives**: ad hoc, max 1\u002Fweek. Plan, don't ad-lib.\n- **Static feed posts**: out, except for branded covers.\n\nHashtag discipline (Reels + posts):\n- 3-5 hashtags per post (the \"30 hashtags\" old advice is dead — IG reduced the cap and over-tagging looks spammy).\n- 1 broad + 2-3 niche + 1 micro (\u003C 50k posts).\n- Re-check the `\u003CWORKSPACE_DIR>\u002Fmemory\u002Fig-hashtag-state.md` registry monthly for shadowbanned tags.\n\n---\n\n## 7. Quotas (hard limits)\n\n| Action | Phase A limit | Phase B limit |\n|--------|---------------|---------------|\n| DMs handled (inbound replies) per 24 h | 20 | 60 |\n| DMs handled per cron run | 4 | 8 |\n| Comment replies handled per 24 h | 30 | 100 |\n| Comment replies handled per cron run | 5 | 10 |\n| Outbound DMs \u002F day (to non-followers) | 0 | 5 |\n| Follows \u002F day | 5 | 20 |\n| Unfollows \u002F day | 5 | 20 |\n| Likes per hour | 30 | 60 |\n| Actions in same conversation | min 60 s apart | min 30 s apart |\n| Actions globally | min 30 s apart | min 15 s apart |\n\nQuota tracking: read `ig-reply-log.md` at start of every run, count entries in the last 24 h, abort early if quotas already met.\n\n---\n\n## 8. Anti-spam triggers\n\n### Content\n\n| Avoid | Use instead |\n|-------|-------------|\n| \"Check link in bio\" repeated | (mention bio at most once per conversation) |\n| `\u003CBRAND_NAME>` more than once per reply | (max one mention) |\n| \"DM me\", \"WhatsApp me\", \"click here\" stacked | (one CTA, one channel — `\u003CPRIMARY_CTA>`) |\n| Phone numbers, emails | (never in comment bodies; OK in DM tail if user explicitly asked) |\n| Emojis in regulated \u002F sober niches | (drop them) |\n| All caps for emphasis | (use sparingly) |\n| Shorteners (bit.ly \u002F tinyurl) | (use the full canonical URL) |\n\n### Behavioral\n\n- Replying within 30 s of a comment going live → bot-like; wait ≥ 2 min.\n- Same opening phrase across multiple replies → flagged. Vary the first 1-2 words.\n- > 6 actions in 10 min → rate limit on that role.\n- Following + liking the same user's last 5 posts within 1 min → instant action block.\n- Sending the same DM body to > 3 users in 24 h → \"Action blocked\" toast within minutes.\n\n---\n\n## 9. Operational flow inside Meta Business Suite\n\nReactive DM + comment ops run inside MBS exclusively. The flow below is validated end-to-end.\n\n### DM check \u002F reply (validated)\n\nURL: `https:\u002F\u002Fbusiness.facebook.com\u002Flatest\u002Finbox\u002Fall?business_id=\u003CMETA_BUSINESS_ID>&asset_id=\u003CMETA_ASSET_ID>`\n\n1. Pre-flight session check (see §2).\n2. Navigate to the `all` tab. Wait 5 s for the conversation list to render.\n3. **Filter for unread** by clicking the \"Unread\" filter chip, or query the conversation list for nodes with the unread badge.\n4. For each unread conversation, top-to-bottom:\n   a. Click the conversation tile (the user's name).\n   b. **Read the entire message thread** for context — IG conversations often span across the auto-template + user's real reply.\n   c. Qualify (see §4). If skip-eligible, click the next conversation.\n   d. **Click the textbox**: selector `[contenteditable='true']` or `[aria-label*='Reply'], [aria-label*='Répondre']`.\n   e. **Type the message** via Playwright `type` (or `evaluate` with `document.execCommand('insertText', false, msg)` ONLY if `contenteditable` is a vanilla React-controlled input — verify first).\n   f. **Press Enter** to send. Do NOT click \"Send\" — there are visual duplicates of the send button and a Playwright `click` sometimes lands on the wrong one. Enter is unambiguous.\n5. After sending, the textbox empties; verify before moving to the next conversation.\n6. After processing all unread, switch to the `Messenger` tab and to the `Instagram` tab in turn to catch any FB-only or IG-only inboxes that didn't surface in `all`.\n\n### Comment reply (validated — partial)\n\nURL: `https:\u002F\u002Fbusiness.facebook.com\u002Flatest\u002Finbox\u002Finstagram?business_id=\u003CMETA_BUSINESS_ID>&asset_id=\u003CMETA_ASSET_ID>`\n\nThe comments tab is **less stable than DMs** — see \"Known issue\" below.\n\n1. Navigate to the comments tab. Wait 5 s.\n2. Posts with new comments appear in the left rail with an unread badge.\n3. For each post:\n   a. Click the post tile.\n   b. Comments render in the right pane.\n   c. For each lead-qualified comment:\n      - **Find the page-level \"Ajoutez un commentaire...\" \u002F \"Add a comment...\"** textarea **at the bottom** of the right pane.\n      - Type `@username your reply` (the `@username` prefix targets the parent comment without clicking \"Reply\").\n      - **Click the send-arrow button** (SVG arrow to the right of the textarea) — Enter does NOT submit a comment in this UI.\n\n### Known issue: do NOT click \"Reply\" on comments\n\nClicking the \"Reply\" affordance under a comment navigates the right pane to a different post (Meta's SPA bug, present in 2025-2026). The validated workaround is `@username` prefix + page-level textarea + send-arrow click — described above.\n\nIf you must produce a true nested reply (rare): open the post URL on `instagram.com` in a separate ig-engage tab, reply there manually, then mark the conversation done in `ig-reply-log.md`. Do not script the `instagram.com` reply path — Instagram's anti-automation is much tighter than MBS.\n\n### Selectors quick-reference\n\n| Element | Selector |\n|---|---|\n| DM textbox | `[contenteditable='true']` or `[aria-label*='Reply'], [aria-label*='Répondre']` |\n| DM send (preferred) | `press Enter` |\n| Comment textarea | `textarea[placeholder*='comment'], textarea[placeholder*='commentaire']` |\n| Comment send | the SVG arrow button to the right of the textarea — `[aria-label*='Send'], [aria-label*='Envoyer']` |\n| Conversation tile | `text=\u003Cuser's display name>` |\n| Tab \"Messenger\" | `text=Messenger` |\n| Tab \"Instagram\" | `text=Instagram` (the DMs tab) |\n| Tab \"Commentaires Instagram\" | `text=Instagram` (in comments URL — same string, different URL) |\n| Unread filter chip | `text=Unread, text=Non lu` |\n\n### Exit codes (recommended convention)\n\n| Code | Meaning | Recap action |\n|------|---------|--------------|\n| 0 | Replies sent, verified | `status: ok` |\n| 1 | Fatal error (selector missing, MBS error toast) | `status: error`, attach screenshot |\n| 2 | \"Action blocked\" \u002F \"Try again later\" toast | `status: blocked`, flip the role to Phase A pause |\n| 3 | Session expired (login form rendered) | `status: blocked`, alert user |\n| 4 | Comment \"Reply\" caused page navigation (known bug — see above) | `status: partial`, log for manual review |\n\n### Gotchas\n\n- **The MBS comment-Reply navigation bug**: still present. Use the `@username` workaround.\n- **Localized labels**: `Reply` \u002F `Répondre`, `Send` \u002F `Envoyer` — maintain a label map and try both in selectors.\n- **MBS soft logout**: after ~48 h of inactivity, MBS asks for re-authentication on next navigation. Treat as session expired (exit 3).\n- **Tab switching**: if you operate on multiple tabs (`all`, `messenger`, `instagram_direct`), wait ≥ 3 s after switching — MBS re-fetches the conversation list and clicking too early lands on stale tiles.\n- **The `Non Lu` \u002F `Unread` filter chip is sometimes mis-clicked**: it has a transparent overlay. Snapshot before clicking.\n- **Cron timeout**: bump to ≥ 1200 s. MBS pages can take 4-6 s to render fully.\n\n---\n\n## 10. Account state management\n\nFile: `\u003CWORKSPACE_DIR>\u002Fmemory\u002Fig-state.md`\n\nFor each day:\n- Phase (A \u002F B).\n- Followers count.\n- Last action-block timestamp + duration.\n- Last community-guideline notice.\n- Posts published today (cap at 5\u002F24h per §6).\n\nFile: `\u003CWORKSPACE_DIR>\u002Fmemory\u002Fig-clients-known.md`\n\nFor each existing client:\n- IG handle.\n- Last contact date.\n- Sensitive flag (do-not-paste-CTA).\n\nUpdate at the end of every run.\n\n---\n\n## 11. Recovery & blockers\n\n| Issue | Action |\n|-------|--------|\n| `status: stopped` | Report, stop. |\n| Login form rendered on MBS | Session expired, alert, stop. |\n| \"Reauthenticate to manage this asset\" banner | Same as login expired. |\n| \"Action blocked — try again later\" toast | Flip the role to Phase A pause for 24 h. Alert. |\n| \"Please verify it's you\" \u002F re-captcha | Stop. Never auto-solve. Alert for manual login. |\n| MBS shows \"Something went wrong\" generic error | Refresh once. If persists, stop and alert. |\n| Comment \"Reply\" click navigated to wrong post | Mark exit 4, fall back to manual via `instagram.com`. |\n| Followers drop > 5 % overnight | Likely shadowban — flip to Phase A, alert. |\n| Two consecutive comments removed within \u003C 10 min of post | Auto-freeze comment cron for 6 h. |\n\n---\n\n## 12. Mandatory recap (alert channel + memory)\n\nAt the end of each cron:\n\n**Alert channel — final run message**:\n```\n[Job name] — [status: ok|partial|blocked|skipped]\nDMs handled: [N or \"—\"]\nComments handled: [N or \"—\"]\nHot leads: [list short OR \"—\"]\nPhase: [A|B]\nBlockers: [text OR \"—\"]\nNext action: [1 line]\n```\n\n**Memory** — append to `\u003CWORKSPACE_DIR>\u002Fmemory\u002Fig-recaps.md`:\n```\n## YYYY-MM-DD HH:MM TZ — \u003Cjob-id> — status: \u003Cstatus>\n- Job: \u003Cdescription>\n- Phase: A|B\n- DMs sent: \u003CN>\n- Comments sent: \u003CN>\n- Hot leads: \u003Clist or \"—\">\n- Blockers: \u003Ctext or \"—\">\n- Next useful action: \u003C1 line>\n```\n\n---\n\n## 13. Memory files inventory\n\nLocated at: `\u003CWORKSPACE_DIR>\u002Fmemory\u002F`\n\n| File | Purpose | Update cadence |\n|------|---------|----------------|\n| `ig-recaps.md` | Per-run logs | Every cron run |\n| `ig-post-log.md` | Reels + carousels + stories (URL, type, date, reach) | Each posting run |\n| `ig-reply-log.md` | DM + comment replies sent | Each reply pass |\n| `ig-state.md` | Daily phase + followers + warning flags | Daily Metrics Recap |\n| `ig-hashtag-state.md` | Per-hashtag reach + shadowban check | Weekly |\n| `ig-clients-known.md` | Existing clients to NEVER pitch | Ad hoc |\n| `ig-ideas.md` | Content backlog | Weekly Planning |\n| `ig-learnings.md` | Patterns (what reached, what got removed) | Weekly + ad hoc |\n| `ig-alerts-sent.md` | Anti-doublon hot-lead alerts | Each alert |\n\n---\n\n## 14. Account identity guardrails\n\n- Handle: brand-aligned but not aggressively promotional (`@drsmithlegal` > `@bestlawyerinparis`).\n- Bio: one line + the single `\u003CPRIMARY_CTA>` link. No emojis, no flag salad in regulated niches.\n- Never reply to a DM that asks for expert-grade advice on a specific case — redirect to `\u003CPRIMARY_CTA>`.\n- Never share private client details, names, or numbers.\n- Never reuse strict CRM templates as IG content.\n- Never promise an outcome (\"you will win\").\n- Never charge or solicit payment in DM.\n- If asked \"are you a bot?\": one sober, ambiguous line, then redirect. Do not confirm AI.\n\n---\n\n## 15. Phase A → Phase B transition\n\nWhen the Daily Metrics Recap detects (account_age_days ≥ 30) AND (followers ≥ 500) AND (last_action_block_days_ago > 30):\n\n1. Append to `ig-state.md`: `YYYY-MM-DD - phase=A - PHASE_B_THRESHOLD_REACHED`.\n2. Send a distinct alert: `🎉 IG account ready for Phase B — review and flip outbound crons manually`.\n3. Manual user flip (no auto-flip).\n4. First week of Phase B: cap reply pass at **3 replies\u002Frun** (not 8).\n5. Daily check on `Action Status` (MBS → Settings → Account Status). Any \"warning\" reverts to Phase A.\n\n---\n\n## 16. Stability discipline\n\n- Read the UI before clicking.\n- One click → verify with a snapshot.\n- Switch tabs only after the previous tab settled.\n- Close stale tabs at the end of every run.\n- Never fake a successful reply — always verify the message landed in the thread.\n\n**Better silence than spam. Better a blockage report than a fake success.**\n\n---\n\n## 17. First-run checklist\n\n- [ ] Section 0 placeholders filled.\n- [ ] IG account is **Business** or **Creator**, linked to a Meta Business Suite asset.\n- [ ] `\u003CMETA_BUSINESS_ID>` and `\u003CMETA_ASSET_ID>` extracted (open MBS, copy from the URL).\n- [ ] Bio is one line + single `\u003CPRIMARY_CTA>` link.\n- [ ] Browser profile launched at `http:\u002F\u002F127.0.0.1:\u003CBROWSER_PORT>` and logged into facebook.com (the MBS gate).\n- [ ] Navigating to `inbox\u002Fall` renders the conversation list (no login form, no setup wizard).\n- [ ] `\u003CWORKSPACE_DIR>\u002Fmemory\u002F` exists with the 9 memory files.\n- [ ] Alert channel webhook tested.\n- [ ] Phase A confirmed: only inbound DM cron enabled.\n- [ ] At least 14 days of manual posting + manual replies before turning on the cron.\n- [ ] Account Status checked (MBS → Settings → Account Status): **green \u002F no warning**.\n\nInit memory:\n\n```bash\nmkdir -p \"\u003CWORKSPACE_DIR>\u002Fmemory\" && cd \"$_\" && touch ig-recaps.md ig-post-log.md ig-reply-log.md ig-state.md ig-hashtag-state.md ig-clients-known.md ig-ideas.md ig-learnings.md ig-alerts-sent.md\n```\n\n---\n\n## 18. FAQ\n\n**Q: Do I need OpenClaw to use this skill?**\nA: No. OpenClaw browser CLI is the example stack — the doctrine works with Playwright (Node or Python), Puppeteer, Chrome MCP, or any CDP-capable tool.\n\n**Q: Can I just use the Instagram Graph API?**\nA: Partially. The Graph API covers `instagram_basic`, `instagram_manage_messages`, `instagram_manage_comments` — if you have an approved app, you can build a more robust webhook-based flow. The doctrine in this skill is the **fallback for accounts not yet approved for Graph API access, or for cases where MBS UI features are needed** (labels, prospect stages, link previews).\n\n**Q: What about multi-account?**\nA: Clone the workspace dir per account. Use a separate browser profile + port. **Each IG account must have its own Meta Business asset** — you can manage multiple assets from one MBS, but they have distinct `\u003CMETA_ASSET_ID>` values.\n\n**Q: My account got an action block during testing. What now?**\nA: Stop everything. Flip to Phase A. Manual usage only for 7-14 days. Document in `ig-learnings.md` the exact last 20 actions. Do NOT appeal automatically.\n\n**Q: Does the doctrine cover Reels Ads \u002F Boost \u002F Shopping?**\nA: No. This skill is for organic + reactive ops only. Ads have a separate dashboard and a separate (different) sanction pattern.\n\n**Q: What's the most common reason this skill's crons get flagged?**\nA: Same opening phrase across replies. Vary the first 1-2 words every time. The second most common: replying within 30 s of a comment landing — wait ≥ 2 min.\n\n**Q: What if my account is suspended (not just action-blocked)?**\nA: Stop everything. Do not appeal automatically — Instagram's appeal flow is sensitive to repeated automated submissions. Manual review only. Document the exact last 20 actions before the suspension in `ig-learnings.md`.\n",{"name":5,"description":7},"master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Fi\u002Finstagram-account-operations",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill instagram-account-operations",{"tool":39,"command":40},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill instagram-account-operations",{"tool":42,"command":43},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill instagram-account-operations","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fi\u002Finstagram-account-operations\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]