fb-comment-automation

Guides safe modification of Facebook and Instagram comment automation reply, filter, and dispatch logic.

722|195|Updated Dec 9, 2024
One-click install
npx skills add https://github.com/ChatbotXIO/ChatbotX --skill fb-comment-automation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fb-comment-automation
Source: https://github.com/ChatbotXIO/ChatbotX/tree/main/.agents/skills/fb-comment-automation
Command: npx skills add https://github.com/ChatbotXIO/ChatbotX --skill fb-comment-automation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Editing the Facebook/Instagram comment automation code in ChatbotX is risky: silent failures like misread parent_id values, composite post id mismatches, and skip paths without logs can silently drop every top-level comment in production. This Skill maps the entire comment-automation subsystem and documents the traps so changes land correctly the first time.

Core Features & Use Cases

  • Codebase Map: Locates every relevant file across the worker handlers, webhook parsers, database schemas, dedup ledger, and the fb-comments/ig-comments builder features.
  • Trap Documentation: Explains seven known failure modes, including the parent_id equals post_id pitfall, composite post id normalization, mandatory skip logging, and the difference between AIAgent comment replies and DM auto-responders.
  • Step-by-Step Recipes: Provides ordered procedures for adding a new filter option (schema, service, loop guard, builder form, i18n, tests) and a new reply type (schema, public/private dispatch, dedup counting, worker job wiring).
  • Use Case: When adding a new comment filter option, follow the recipe to update the Zod partials, add a service query reusing the dedup index, insert a guarded skip with logAutomationSkipped, surface the toggle in the builder form, and extend the worker test suite.

Quick Start

Ask the assistant to add a new filter option to the Facebook comment automation and have it follow the documented recipe including skip logging and tests.

Frequently Asked Questions about fb-comment-automation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new filter option to Facebook comment automation?

Add the field to fbCommentOptionsSchema with a DB default, add a service method if a DB lookup is needed, insert a guard in processCommentAutomation with a logAutomationSkipped call before continue, surface the toggle in the fb-comment-form builder, and extend the worker test suite.

How do I add a new reply type to comment automation?

Extend fbCommentReplySchema.type, handle the type in both executePublicReply and executePrivateReply across all three channels, update willSendReply so dedup only counts dispatchable replies, and add a dedicated worker job with a handler case if async work is needed.

Why are top-level Facebook comments being silently skipped by automation?

The parent_id field is always present and equals post_id for top-level comments, so a truthy parentId check wrongly treats them as replies. Use isCommentReply(parentId, postId) instead, since the default ignoreCommentReplies option otherwise drops every top-level comment.

Does Instagram comment automation support liking comments?

Comment liking works on messenger and instagramFacebook channels, but Instagram Login's likeComment is a logged no-op. The attachment lookup behind hideComments hasImage and hasVideo filters is messenger-only, so unsupported toggles should be hidden in the builder form.

Why does comment automation show no errors but never replies?

processCommentAutomation returns void, so BullMQ always logs returnValue null and any skip without a logAutomationSkipped call is invisible in production. Check that every filter path logs a skip reason and verify post id matching uses normalizePostId for composite page and story ids.