Install
openclaw skills install facebook-account-operationsOperating doctrine for Facebook Page automation — careful brand-page pattern via Meta Business Suite, role separation, page-vs-profile-vs-group surface awareness, comment + Messenger ops (Playwright click + type + Enter), moderation discipline (hide vs delete vs ban), and recovery patterns. Use this for any scheduled FB activity (cron, agent, recurring task) where account / page safety and reach matter more than raw output.
openclaw skills install facebook-account-operationsThis skill is the operating doctrine for every Facebook automation run on a brand Page (recommended), professional or personal account.
The goal is not to comment fast. The goal is to operate Facebook like a careful, helpful human community manager: stable browser, correct context (Meta Business Suite), useful action, no page restrictions, no reputational risk.
Drop-in for any niche (legal, medical, software, finance, creator, ecommerce). Replace the placeholders in section 0 with your own values.
Before running anything, fill these placeholders in your local copy or your agent's memory:
| Placeholder | Example | Your value |
|---|---|---|
<BRAND_NAME> | "Acme Studio" | — |
<BRAND_DOMAIN> | "acme.studio" | — |
<FB_PAGE_NAME> | "Acme Studio" (the public Page name) | — |
<FB_PAGE_ID> | numeric ID of the Page | — |
<META_BUSINESS_ID> | numeric ID from business.facebook.com → Settings | — |
<META_ASSET_ID> | numeric ID of the FB Page asset in MBS | — |
<BROWSER_PROFILE> | "facebook-live" | — |
<BROWSER_PORT> | "18803" | — |
<NICHE_KEYWORDS> | "lost license OR speeding ticket" | — |
<PRIMARY_CTA> | "WhatsApp / form / app — pick ONE" | — |
<WORKSPACE_DIR> | "~/.openclaw/workspace/facebook-<brand>" | — |
All shell snippets below assume an OpenClaw 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.
brand:
name: <BRAND_NAME>
domain: <BRAND_DOMAIN>
facebook:
page_name: <FB_PAGE_NAME>
page_id: <FB_PAGE_ID>
browser_profile: <BROWSER_PROFILE>
browser_port: <BROWSER_PORT>
meta_business_suite:
business_id: <META_BUSINESS_ID>
asset_id: <META_ASSET_ID>
base_url: https://business.facebook.com/latest/inbox
discovery:
niche_keywords: <NICHE_KEYWORDS>
cta:
primary: <PRIMARY_CTA>
workspace:
dir: <WORKSPACE_DIR>
alerts:
channel: telegram | slack | discord
webhook: <YOUR_WEBHOOK_URL>
schedule:
timezone: Europe/Paris
windows:
dm_check: "6,21,36,51 9-22 * * *"
comment_check: "9,24,39,54 9-22 * * *"
browser_health: "0 * * * *"
daily_recap: "21:00"
| Stack | Skill install path |
|---|---|
| Claude Code | ~/.claude/skills/facebook-account-operations/ |
| OpenClaw | ~/.openclaw/skills/facebook-account-operations/ |
| ClawHub-published | one-click install via clawhub.ai |
| Cursor / Copilot CLI | drop SKILL.md into your project's .cursorrules or AGENTS.md |
| Any LLM agent reading markdown rules | concatenate SKILL.md into your system prompt |
Doctrine for brand automation:
This skill covers the Page surface exclusively.
Everything goes through business.facebook.com. Never automate against facebook.com directly — the personal-profile DOM is unstable, IP-throttled, and any anti-automation trigger there can poison the Page-admin's personal account.
A single browser profile per Page-admin account:
<BROWSER_PROFILE> (CDP direct, attached to http://127.0.0.1:<BROWSER_PORT>)openclaw browser --browser-profile <BROWSER_PROFILE> status
openclaw browser --browser-profile <BROWSER_PROFILE> navigate https://business.facebook.com/latest/inbox/all/?business_id=<META_BUSINESS_ID>&asset_id=<META_ASSET_ID>
openclaw browser --browser-profile <BROWSER_PROFILE> snapshot --limit 200
| Tab | URL fragment |
|---|---|
| All messages (Messenger + IG DMs if cross-linked) | /latest/inbox/all?asset_id=<META_ASSET_ID>&business_id=<META_BUSINESS_ID> |
| Messenger only (Page DMs) | /latest/inbox/messenger?asset_id=<META_ASSET_ID>&business_id=<META_BUSINESS_ID> |
| Facebook Page comments | /latest/inbox/facebook?asset_id=<META_ASSET_ID>&business_id=<META_BUSINESS_ID> |
| Page Insights | https://business.facebook.com/latest/insights/all_tools?asset_id=<META_ASSET_ID>&business_id=<META_BUSINESS_ID> |
| Page Posts | https://business.facebook.com/latest/posts?asset_id=<META_ASSET_ID>&business_id=<META_BUSINESS_ID> |
fb-postPage cockpit (acting AS THE PAGE, not as the admin's personal account). Use for:
Default page: MBS inbox/all.
fb-engageDiscovery. Use for:
facebook.com/<user> in a separate tab — DO NOT act from there).Default page: MBS inbox/facebook (comments).
fb-stealthQuiet maintenance. Use for:
Default page: MBS dashboard.
fb-post = act AS THE PAGE via MBS.fb-engage = discover, never act outside MBS.fb-stealth = maintain quietly.inbox/all.Same as Instagram — see instagram-account-operations §2. The MBS session covers both IG and FB assets when both are linked to the same <META_BUSINESS_ID>.
If you only manage a FB Page (no IG asset), the same login + navigation pattern applies; replace inbox/all with inbox/messenger for the smoke test.
Facebook Pages do not have karma; they have:
Phases:
Always read <WORKSPACE_DIR>/memory/fb-state.md at start.
Same as IG — append YYYY-MM-DD - phase=B (manual override) to fb-state.md for grandfathered, verified Pages. Document the rationale in fb-learnings.md.
A DM or comment is repliable only if all of:
fb-banned-users.md).fb-reply-log.md).If any check fails: skip.
If the user is in fb-clients-known.md, redirect to your client support channel (NOT <PRIMARY_CTA> for prospects).
Do NOT redirect to <PRIMARY_CTA>. Reply with a public thank-you. No CTA, no link.
Plain, helpful, no brand mention, no link.
DM reply structure:
[Acknowledge the situation in 1 sentence, neutral tone.]
[General framework in 2-3 short paragraphs.]
[Concrete next step — point to <PRIMARY_CTA>. ONE channel only.]
Page-comment reply structure (Page comments are public — keep them short and bold-typo-free):
@<UserName> [contextual acknowledgement]. [Indirect signal — "DM us" or "form on Page"].
<PRIMARY_CTA>).Out of scope for the live reactive crons. Recommended rhythm for a Phase B Page:
Never boost a comment-reply. Boost only top-level Page posts.
| Action | Phase A limit | Phase B limit |
|---|---|---|
| DMs handled / 24 h | 20 | 80 |
| DMs handled / cron run | 4 | 10 |
| Comment replies handled / 24 h | 30 | 120 |
| Comment replies handled / cron run | 5 | 12 |
| Outbound DMs / day (proactive) | 0 | 0 — Page Messenger outbound is heavily restricted; rely on templates with opt-in only |
| Page posts / day | 1 | 3 |
| Comments on other Pages | 0 | 5 (sober, on-topic, no link) |
| Actions in same conversation | min 60 s apart | min 30 s apart |
| Actions globally | min 30 s apart | min 15 s apart |
Quota tracking: read fb-reply-log.md at start of every run.
| Avoid | Use instead |
|---|---|
<BRAND_NAME> more than once per reply | (max one mention) |
| URLs in comment bodies | (never) |
| Multiple URLs in a single DM | (max 1) |
| "Click here", "DM me", "WhatsApp me" all together | (one CTA, one channel) |
| Emojis in regulated niches | (drop them) |
| All caps for emphasis | (use sparingly) |
| Shorteners (bit.ly / tinyurl) | (use the canonical URL) |
| Tagging unrelated Pages | (never — it spams the tagged Page) |
12 actions in 10 min → rate limit.
Same backbone as Instagram §9. FB-specific notes below.
URL: https://business.facebook.com/latest/inbox/messenger?asset_id=<META_ASSET_ID>&business_id=<META_BUSINESS_ID>
The flow is identical to the IG-DM flow in instagram-account-operations §9 (Playwright click + type + press Enter). Differences:
HUMAN_AGENT, CONFIRMED_EVENT_UPDATE, etc.). Out of scope for this skill — if you need post-24h outbound, use the Conversations API with an approved tag.URL: https://business.facebook.com/latest/inbox/facebook?asset_id=<META_ASSET_ID>&business_id=<META_BUSINESS_ID>
Same SPA bug as IG comments: clicking the per-comment "Reply" link sometimes navigates the right pane to a different post. Same workaround:
@<UserName> your reply.This posts a top-level comment under the same post but tagged at the parent — which is sufficient for visibility and notification.
When a comment is offensive, spammy, or off-topic:
| Action | Effect | When |
|---|---|---|
| Hide | Comment stays visible to the author + their friends, invisible to everyone else | Default for most low-quality comments — author doesn't notice, no escalation |
| Delete | Comment removed | Only for clearly offensive content or doxxing |
| Ban user from Page | User can no longer comment or DM the Page | Only for repeated harassment after a Hide |
Doctrine: prefer Hide over Delete. Hidden comments don't trigger the author to recomment angrily.
Maintain <WORKSPACE_DIR>/memory/fb-banned-users.md with one row per ban, the date, and the trigger comment URL.
| Element | Selector |
|---|---|
| Messenger DM textbox | [contenteditable='true'] |
| Messenger DM send | press Enter |
| Messenger "Mark as Done" | [aria-label*='Mark as done'], [aria-label*='Marquer comme termin'] |
| Page-comment textarea | textarea[placeholder*='comment'], textarea[placeholder*='commentaire'] |
| Page-comment send | the SVG arrow button to the right of the textarea |
| Comment "Hide" | [aria-label*='Hide'], [aria-label*='Masquer'] (in the comment overflow menu) |
| Comment "Delete" | [aria-label*='Delete'], [aria-label*='Supprimer'] |
| Ban user from Page | per-user overflow → "Ban" / "Bloquer" |
Same as instagram-account-operations §9.
Reply / Répondre, Hide / Masquer, Delete / Supprimer — maintain a label map.File: <WORKSPACE_DIR>/memory/fb-state.md
For each day:
File: <WORKSPACE_DIR>/memory/fb-banned-users.md
File: <WORKSPACE_DIR>/memory/fb-clients-known.md
Update at the end of every run that touched a moderation action.
| Issue | Action |
|---|---|
status: stopped | Report, stop. |
| Login form on MBS | Session expired, alert, stop. |
| Page Quality drops to yellow | Flip to Phase A. Alert. Audit hidden / deleted comments. |
| Page Quality drops to red | Stop all crons. Manual review. Likely a posting policy violation. |
| "Page restricted" banner | Stop all outbound activity. Inbound DM reply only if MBS allows. Alert. |
| MBS "Something went wrong" | Refresh once. Persist → stop and alert. |
| Comment "Reply" causes page navigation | Use @username workaround. |
| Personal admin account in "review" status | Stop. Pages are admin-owned — if the admin is restricted, the Page is at risk. |
Same format as instagram-account-operations §12, with Page Quality: green/yellow/red added to the recap line.
| File | Purpose | Update cadence |
|---|---|---|
fb-recaps.md | Per-run logs | Every cron run |
fb-post-log.md | Page posts (URL, type, date, reach) | Each posting run |
fb-reply-log.md | DM + comment replies sent | Each reply pass |
fb-state.md | Daily phase + Page Quality + warnings | Daily Metrics Recap |
fb-banned-users.md | Users banned from the Page | Each ban |
fb-clients-known.md | Existing clients to NEVER pitch | Ad hoc |
fb-ideas.md | Content backlog | Weekly Planning |
fb-learnings.md | Patterns (what reached, what got hidden) | Weekly + ad hoc |
fb-alerts-sent.md | Anti-doublon hot-lead alerts | Each alert |
<PRIMARY_CTA> link. No emoji walls.<PRIMARY_CTA>.When the Daily Metrics Recap detects (page_age_days ≥ 30) AND (followers ≥ 100) AND (page_quality = green) AND (no warning in 30 d):
fb-state.md: YYYY-MM-DD - phase=A - PHASE_B_THRESHOLD_REACHED.🎉 FB Page ready for Phase B — flip outbound crons manually after review.Better silence than spam. Better a blockage report than a fake success.
<META_BUSINESS_ID>, <META_ASSET_ID>, <FB_PAGE_ID> extracted.<PRIMARY_CTA> link.inbox/messenger renders the conversation list.<WORKSPACE_DIR>/memory/ exists with the 9 memory files.Init memory:
mkdir -p "<WORKSPACE_DIR>/memory" && cd "$_" && touch fb-recaps.md fb-post-log.md fb-reply-log.md fb-state.md fb-banned-users.md fb-clients-known.md fb-ideas.md fb-learnings.md fb-alerts-sent.md
Q: Do I need OpenClaw to use this skill? A: No. OpenClaw browser CLI is the example stack — the doctrine works with Playwright, Puppeteer, Chrome MCP, or any CDP-capable tool.
Q: Can I use the Facebook Pages API instead? A: Partially. The Pages API + Conversations API covers Messenger sending (within and outside the 24h window via message tags), comment moderation, and Page posting. The doctrine in this skill is the fallback for accounts without API access, or for cases where MBS UI features are essential (Page Quality dashboard, link previews, audience insights).
Q: My Page got restricted during testing. What now?
A: Stop everything. Manual review of the last 50 actions in fb-reply-log.md. Wait for the restriction to expire (or appeal manually). Once cleared, restart at Phase A with stricter quotas.
Q: Does this cover Facebook Groups? A: Only if you own the group (the Page is the admin). Replying as the Page in a third-party group requires the group setting "Allow Pages to post" — most groups do not allow this. Default: skip groups.
Q: What about Marketplace / Events / Shop? A: Out of scope. Marketplace and Shop have separate UIs and separate sanction patterns; Events run through the standard Page + Ads stack but with a manual posting cadence.
Q: Boost vs Ads Manager — which does this skill cover? A: Neither. Both are out of scope. This skill is organic + reactive ops only.
Q: What if my admin account is suspended (not just the Page)?
A: Stop everything. A suspended admin account puts the Page at risk. Manual review only. Document the last 20 admin-account actions, not just Page actions, in fb-learnings.md.