infra-facebook-cdp

$npx mdskill add aAAaqwq/AGI-Super-Team/infra-facebook-cdp

Automate Facebook comment collection and replies via Chrome DevTools Protocol.

  • Gathers nested comments and exports data to CSV files.
  • Connects to Facebook using Chrome DevTools Protocol.
  • Executes Python scripts to collect or reply to specific comments.
  • Delivers structured JSON data containing author names and timestamps.

SKILL.md

.github/skills/infra-facebook-cdpView on GitHub ↗
---
name: infra-facebook-cdp
description: Facebook CDP automation: comments, data collection
---
# Skill: Facebook CDP Automation

**ID:** `infra-facebook-cdp`
**Domain:** infra
**Repo:** https://github.com/your-org/your-facebook-cdp (private)

---

## Description

Facebook automation via Chrome DevTools Protocol. Comment collection, replying to comments, CSV export.

---

## Path

```
$HOME/facebook-cdp/
```

---

## Capabilities

1. **Comment collection** -- all comments from a post including nested replies
2. **Reply to comments** -- reply to a specific comment by author name
3. **CSV export** -- saving collected comments

---

## Usage

### 1. Launch Chrome with remote debugging

```bash
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
    --remote-debugging-port=9222 \
    '--remote-allow-origins=*'
```

### 2. Log in to Facebook manually

### 3. Collect comments

```python
from facebook_comments import collect_post_comments

comments = collect_post_comments(
    "https://www.facebook.com/post/123",
    output_file="comments.csv"
)
```

### 4. Reply to a comment

```python
from facebook_comments import FacebookComments

fb = FacebookComments()
fb.connect()
fb.reply_to_comment("Author Name", "Reply text")
fb.close()
```

---

## Comment data structure

```python
{
    "author_name": "Author name",
    "author_profile_url": "https://facebook.com/...",
    "comment_text": "Comment text",
    "is_reply": False,  # True if this is a reply
    "timestamp": "Feb 6, 2026"
}
```

---

## Dependencies

- Python 3.8+
- `requests`, `websocket-client`
- Chrome with remote debugging

---

## Related skills

- `linkedin-cdp` -- similar tool for LinkedIn

More from aAAaqwq/AGI-Super-Team

SkillDescription
a-fund-monitor监控 A 股基金实时估值与盘后净值,自动判断交易日并生成提醒或分析。
add-leadAdd company/person/relationship to CRM
ads-agentAI-агент для управления Facebook рекламой. Вызывай для анализа, оптимизации, создания кампаний и отчётов.
afrexai-compliance-auditRun internal compliance audits against major governance and security
afrexai-personal-financeComplete personal finance system — budgeting, debt payoff, investing, tax optimization, net worth tracking, and financial independence planning. Use when managing money, building wealth, paying off debt, planning retirement, or optimizing taxes. Zero dependencies.
after-salesUse when managing post-purchase experience, building customer loyalty, or increasing repeat purchases
agent-contactsAI agent contacts — add, list, remove MCP contacts. Use when someone gives an agent URL, or when you need to view/remove contacts.
agent-model-switcher批量查看和切换子 agent 的模型配置,用于统一调整多 agent 的 provider/model 设置。
agent-patternsFormat SPAWN REQUEST messages to launch parallel agents, generate structured agent status reports, and define communication protocols within the sprint system. Use when the user needs to coordinate multiple agents, format spawn requests, produce agent reports, or establish inter-agent communication patterns.
agent-task-confirmUse when confirming whether a dispatched agent task was actually received, activated, and progressing after sessions_send or other task handoff actions.