wx-mp-engagement

Scrapes WeChat Official Account article engagement metrics into a SQLite tracking database.

8.5k|1.4k|Updated Apr 24, 2024
One-click install
npx skills add https://github.com/TeamWiseFlow/wiseflow --skill wx-mp-engagement
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wx-mp-engagement
Source: https://github.com/TeamWiseFlow/wiseflow/tree/main/crews/main/skills/expert-wx-mp/tools/wx-mp-engagement
Command: npx skills add https://github.com/TeamWiseFlow/wiseflow --skill wx-mp-engagement

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires camoufox-cli, and includes scripts (resource) components.

What problem does it solve?

Manually checking reads, likes, comments, shares, and favorites for published WeChat Official Account articles is repetitive and error-prone. This Skill automates engagement data collection from the WeChat creator center and writes the metrics into a published-content tracking database.

Core Features & Use Cases

  • Automated engagement scraping: Uses camoufox-cli with a persistent browser session to open the creator center publish-history page and parse per-article reads, likes, comments, shares, and favorites from page innerText.
  • QR-code login management: Self-manages the wx_mp browser session with headless QR-code screenshot login and a stop-and-wait confirmation flow, without exporting cookies or tokens.
  • Database integration: Matches scraped articles by title against rows in the published-track pub_wx_mp SQLite table and writes metrics via the update-metrics script, supporting single-article fetch and batch refresh of the latest 20 posts.
  • Use Case: Run a daily heartbeat job that calls fetch-all to refresh engagement metrics for all recently published WeChat articles, then use the accumulated data for daily content performance reviews.

Quick Start

Ask the agent to run wx-mp-engagement fetch-all to refresh engagement metrics for all tracked WeChat Official Account articles.

Frequently Asked Questions about wx-mp-engagement

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

FAQPage Schema
How do I scrape WeChat Official Account article engagement data?

Use the fetch or fetch-all commands, which open the creator center publish-history page via camoufox-cli, parse article rows from page innerText, match them by title, and write reads, likes, comments, shares, and favorites into the pub_wx_mp database table.

How does WeChat creator center login work with camoufox?

Run the login command to capture a QR code screenshot headlessly, send it to the user to scan with WeChat, then run login-confirm to verify the session redirected into the backend. Login state persists in the wx_mp session profile without exporting cookies or tokens.

Can I scrape engagement metrics for competitor WeChat accounts?

No. The tool only works for accounts where you have creator center admin access, since metrics come from the logged-in backend publish-history page. Competitor account data is a product limitation, not a technical one.

Why does the scraper only fetch the latest 20 articles?

The publish-history page is requested with count=20 by design. Articles older than about 30 days have stable metrics, so re-scraping them adds rate-limit risk with no benefit; older rows are skipped as NOT_ON_FIRST_PAGE during fetch-all.

What does exit code 2 mean when fetching WeChat metrics?

Exit code 2 means the wx_mp browser session login has expired and the creator center redirected to a login page. Re-run the login and login-confirm commands to scan a fresh QR code and restore the session before fetching again.