agentleFS
XuHo-ITXuHo-IT/Content-Agent-Kit/skills/audience-plan/SKILL.md

audience-plan

Skill8 starsChanged 4 months agoMITView on GitHub

Plan Facebook/Instagram audiences for a fashion shop from its own customer data — RFM segments from an orders export (VIP, trung thành, mới, tiềm năng, sắp rời, ngủ đông), SHA-256-hashed custom-audience upload files, lookalike seeds, exclusions, and which segment gets which message. Use when the user says "tệp khách hàng", "custom audience", "lookalike", "tệp tương tự", "retarget khách cũ", "chăm sóc khách cũ", "khách lâu không mua", "phân nhóm khách hàng", "RFM". Never uploads anything; hashes personal data before it touches a file.

The file

Files
SKILL.md

Audience plan — the shop's customer list is its best targeting

Broad targeting finds new buyers; the shop's own buyers are who should get the new collection first, who seed lookalikes, and who must be excluded from "khách mới" campaigns so the budget is not spent selling to people who already buy.

Hướng dẫn từng bước cho người dùng

Chạy lệnh node scripts/… ở thư mục gốc của kit — thư mục có AGENTS.md, hai cấp trên file này (nếu skill được cài bằng install-skills.mjs --kit, đường dẫn nằm trong file .kit-root cạnh file này).

Dẫn người dùng theo đúng các bước dưới, bằng lời đơn giản. Trước khi bắt đầu: một câu nói skill sẽ làm gì, mất khoảng bao lâu, cần người dùng chuẩn bị gì. Đầu mỗi bước báo "Bước n/N — <tên bước>" kèm một câu đang làm gì. Khi cần người dùng làm gì, chỉ hỏi đúng một việc. Kết thúc: kết quả nằm ở đâu và việc nên làm tiếp.

BướcAgent làm gìNgười dùng cần làm
1. Hỏi sự đồng ýHỏi shop có được khách đồng ý dùng SĐT/email cho quảng cáo không (Nghị định 13/2023); không có thì dừngXác nhận có hoặc không
2. Nhận file đơn hàngCần mỗi dòng một đơn: SĐT và/hoặc email, ngày mua, giá trị đơnXuất file đơn từ Haravan/Sapo/KiotViet/Pancake…
3. Chia nhómChạy node scripts/ads/rfm-segments.mjs orders.csv --out audiences/ — VIP, trung thành, mới, sắp rời, ngủ đông…—
4. Kế hoạch tệpBảng: nhóm nào nhận thông điệp gì, nhóm nào làm nguồn tệp tương tự, nhóm nào loại trừĐọc và chỉnh
5. Dừng — người dùng tự tải lênFile trong audiences/ chỉ chứa mã băm SHA-256, không có SĐT thậtTự tải lên Ads Manager, rồi xoá file đơn gốc

Hay vướng:

  • Dán danh sách khách vào chat → không làm vậy; đưa đường dẫn file để script đọc trên máy.
  • Nhóm dưới ~100 người → Meta không chạy được; dùng làm tệp loại trừ hoặc gộp nhóm.
  • SĐT viết đủ kiểu (0912…, +84…) → script tự chuẩn hoá, không cần sửa tay.

1. Privacy first — before opening the file

  • Customers' phone and email are personal data under Nghị định 13/2023/NĐ-CP. Ask the user to confirm the shop has consent to use them for advertising. If not, stop here and say why.
  • The script writes only SHA-256 hashes of normalised email/phone. Never paste raw customer lists into chat, a doc, or a commit. Delete the export after use.

2. Segment

node scripts/ads/rfm-segments.mjs orders.csv --today 2026-11-11
node scripts/ads/rfm-segments.mjs orders.csv --out audiences/    # one hashed CSV per segment

Input: one row per order with phone and/or email, order date, order value (export from Haravan, Sapo, KiotViet, Pancake, Shopify…). Phones in any form (0912 345 678, +84…) are normalised to 84912345678 before hashing, as Meta's matching expects.

Scores are quintiles within this shop, so cut-offs fit the business, not a textbook.

3. The plan

segmentuse it tomessage
VIPearly access, lookalike 1% seedBST mới trước khi mở bán, quà — no discount needed
Trung thànhupsell, lookalike seedphối đồ / combo
Mớisecond order within 30 daysmón phối cùng món đã mua
Tiềm năngcross-sellset đồ, review thật
Sắp rờiwin-backhàng mới về + lý do quay lại; ưu đãi nhẹ có hạn
Ngủ đôngexclude from prospectingone win-back attempt, then stop
all buyers (180 days)exclude from "khách mới" campaigns—

Also propose engagement audiences that need no customer data: video viewers 50%+ (30 days), page/IG engagers (90 days), Messenger contacts, add-to-cart without purchase (14 days).

Segments under ~100 matched people cannot be delivered to — use them as exclusions or merge them.

4. Stop and ask

Output the segment table, the audience list (names in the form CA_VIP_261111), and the campaign ↔ audience map. Uploading files and creating audiences in Ads Manager is the user's step; with the meta-ads MCP, show the calls and wait for a yes.

Segments are the start of retention, not the end. For the journey per segment (welcome → second purchase → habit → win-back) and rewards tied to a habit rather than blanket discounts, see brand-lessons → highlands (docs/32-bai-hoc-thuong-hieu.md).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.