china-3c-marketing-copilot

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

China 3C Marketing Copilot Skill

中国3C营销Copilot Skill

Skill by ara.so — Marketing Skills collection.
An AI-powered knowledge base and copilot system for marketing consumer electronics (3C) in the Chinese market. Covers smartphones, laptops, earphones, wearables, and smart home devices with competitive analysis, creative campaign generation, risk assessment, and market insights.
Skill 由 ara.so 提供 —— 营销技能合集。
这是一个面向中国市场3C消费电子营销的AI驱动知识库与Copilot系统,覆盖智能手机、笔记本电脑、耳机、可穿戴设备及智能家居领域,具备竞品分析、创意营销方案生成、风险评估及市场洞察能力。

What This Project Does

项目功能

China 3C Marketing Copilot is a structured knowledge base designed to be used as context for AI agents to:
  • Generate creative campaigns grounded in real market data
  • Analyze competitive threats using cross-referenced product evaluations
  • Assess marketing risks including social media backlash scenarios
  • Provide category insights from expert reviews (爱否科技, 笔吧评测室, etc.)
  • Simulate audience reactions across 5 persona types
  • Break into new categories using proven playbook strategies
The system enforces strict data discipline: no fabricated numbers, source attribution required, speculation must be labeled.
中国3C营销Copilot是一个结构化知识库,可用作AI Agent的上下文,实现以下功能:
  • 生成创意营销方案:基于真实市场数据产出方案
  • 分析竞品威胁:通过交叉引用的产品评测进行分析
  • 评估营销风险:包含社交媒体负面舆情场景
  • 提供品类洞察:整合专业评测机构(爱否科技、笔吧评测室等)的内容
  • 模拟受众反应:覆盖5类用户画像
  • 突破新品类:采用经过验证的策略手册
系统执行严格的数据规范:禁止编造数据,所有内容需标注来源,推测内容必须明确标记。

Installation

安装步骤

Clone the repository:
bash
git clone https://github.com/killsnake01/China-Marketing-Copilot-Skill.git
cd China-Marketing-Copilot-Skill
No additional dependencies required for basic usage. The knowledge base is pure Markdown.
For data preprocessing (optional):
python
pip install pandas
python scripts/preprocess.py --input raw_data.csv --output knowledge-base/
克隆仓库:
bash
git clone https://github.com/killsnake01/China-Marketing-Copilot-Skill.git
cd China-Marketing-Copilot-Skill
基础使用无需额外依赖,知识库为纯Markdown格式。
如需数据预处理(可选):
python
pip install pandas
python scripts/preprocess.py --input raw_data.csv --output knowledge-base/

Project Structure

项目结构

docs/
  templates/          # Output formats (creative, insights, risk)
  references/         # KOL database, platform rules, personas
  ecosystem/          # Industry terminology, memes to avoid
knowledge-base/
  mobile/            # Phone brand matrix, pricing tiers
  headphones/        # Earphone reviews, clip-on comparison
  laptops/           # Notebook selection guide (笔吧)
  wearables/         # Smartwatch/band market data
  smart-home/        # Robot vacuum reviews, case studies
scripts/
  preprocess.py      # Data cleaning utility
docs/
  templates/          # 输出格式模板(创意方案、洞察报告、风险评估)
  references/         # KOL数据库、平台规则、用户画像
  ecosystem/          # 行业术语、需规避的网络热词
knowledge-base/
  mobile/            # 手机品牌矩阵、价格档位
  headphones/        # 耳机评测、半入耳式产品对比
  laptops/           # 笔记本选购指南(笔吧)
  wearables/         # 智能手表/手环市场数据
  smart-home/        # 扫地机器人评测、案例研究
scripts/
  preprocess.py      # 数据清理工具

Core Capabilities

核心能力

1. Creative Campaign Generation

1. 创意营销方案生成

Trigger phrases:
  • "帮我想几个创意" (give me some creative ideas)
  • "写个传播方案" (write a campaign plan)
  • "手机发布会创意" (phone launch event ideas)
Output format: Uses
docs/templates/creative-output.md
template. Generates 3-5 ideas per request with:
  • Hook (attention-grabbing headline)
  • Core Message (data-driven value prop)
  • Execution (platform-specific tactics)
  • Risk Flag (potential backlash points)
Example usage:
python
undefined
触发短语:
  • "帮我想几个创意"
  • "写个传播方案"
  • "手机发布会创意"
输出格式: 使用
docs/templates/creative-output.md
模板,每个请求生成3-5个创意,包含:
  • 钩子(吸睛标题)
  • 核心信息(基于数据的价值主张)
  • 执行策略(平台专属战术)
  • 风险标记(潜在负面舆情点)
示例用法:
python
undefined

In your AI agent prompt:

在AI Agent提示词中使用:

context = load_knowledge_base("knowledge-base/mobile/") prompt = f""" Using this data: {context} Generate 3 creative campaign ideas for a mid-range phone (2000-3000 RMB) with Snapdragon 8 Gen 3 chip, focusing on Xiaohongshu platform. Follow creative-output.md template. """

**De-duplication:**
Check `docs/templates/used-ideas.md` before generation. Append new ideas to prevent repetition.
context = load_knowledge_base("knowledge-base/mobile/") prompt = f""" 使用以下数据: {context} 针对搭载Snapdragon 8 Gen 3芯片、定价2000-3000元的中端手机,生成3个面向小红书平台的创意营销方案。 遵循creative-output.md模板格式。 """

**去重机制:**
生成前检查 `docs/templates/used-ideas.md`,将新创意追加至文件以避免重复。

2. Competitive Analysis

2. 竞品分析

Trigger phrases:
  • "XX发布了,对我们有什么威胁" (XX launched, what's the threat)
  • "分析竞品" (analyze competitors)
  • "横评对比" (cross-evaluation comparison)
Data sources in knowledge base:
  • mobile/_index.md
    : 16 phone brands, chipset camps, pricing tiers
  • laptops/_index.md
    : 笔吧 2025 laptop guide, 8 price segments
  • headphones/_index.md
    : 12 clip-on earphone comparison (爱否科技)
Example code:
python
import os
import re

def load_category_data(category: str) -> dict:
    """Load brand matrix and evaluation data for a category."""
    base_path = f"knowledge-base/{category}/"
    index_file = os.path.join(base_path, "_index.md")
    
    with open(index_file, 'r', encoding='utf-8') as f:
        content = f.read()
    
    # Extract brand matrix table
    brands = re.findall(r'\| (.+?) \| (.+?) \| (.+?) \|', content)
    
    return {
        'category': category,
        'brands': brands,
        'raw_content': content
    }
触发短语:
  • "XX发布了,对我们有什么威胁"
  • "分析竞品"
  • "横评对比"
知识库数据源:
  • mobile/_index.md
    : 16个手机品牌、芯片阵营、价格档位
  • laptops/_index.md
    : 笔吧2025年笔记本指南、8个价格区间
  • headphones/_index.md
    : 爱否科技12款半入耳式耳机对比
示例代码:
python
import os
import re

def load_category_data(category: str) -> dict:
    """加载指定品类的品牌矩阵与评测数据。"""
    base_path = f"knowledge-base/{category}/"
    index_file = os.path.join(base_path, "_index.md")
    
    with open(index_file, 'r', encoding='utf-8') as f:
        content = f.read()
    
    # 提取品牌矩阵表格
    brands = re.findall(r'\\| (.+?) \\| (.+?) \\| (.+?) \\|', content)
    
    return {
        'category': category,
        'brands': brands,
        'raw_content': content
    }

Usage

使用示例

laptop_data = load_category_data('laptops')
laptop_data = load_category_data('laptops')

Feed to AI agent for competitive threat analysis

传入AI Agent进行竞品威胁分析


**Output format:**
Uses `docs/templates/insight-output.md` with required sections:
- **Market Position** (price tier, feature positioning)
- **Competitive Threats** (direct overlap products)
- **Differentiation Gaps** (where competitor is weak)
- **Data Sources** (must cite: KOL name + platform + date)

**输出格式:**
使用 `docs/templates/insight-output.md` 模板,包含必填章节:
- **市场定位**(价格档位、功能定位)
- **竞品威胁**(直接重叠产品)
- **差异化缺口**(竞品薄弱环节)
- **数据源**(必须标注:KOL名称 + 平台 + 日期)

3. Risk Assessment

3. 风险评估

Trigger phrases:
  • "会不会翻车" (will this backfire)
  • "风险评估" (risk assessment)
  • "有没有负面" (any negative risks)
Template:
docs/templates/risk-assessment.md
includes:
  • Technical Risk (spec exaggeration, measurement tricks)
  • Social Risk (5 persona backlash simulation)
  • Platform Risk (content guideline violations)
  • Historical Precedent (similar campaigns that failed)
Persona simulation: Load from
docs/references/comment-personas.md
:
python
PERSONAS = {
    "参数党": "Spec sheet warriors - will fact-check every number",
    "解构找茬": "Deconstruction trolls - expose marketing tricks",
    "真实体验派": "Real user experience advocates - hate hype",
    "品牌信仰": "Brand loyalists - defend their tribe",
    "吃瓜群众": "Casual observers - amplify drama"
}

def simulate_comment_section(campaign_text: str, personas: dict) -> list:
    """Generate predicted negative comments from each persona."""
    comments = []
    for persona_type, description in personas.items():
        prompt = f"As a {persona_type} ({description}), critique: {campaign_text}"
        # Feed to AI agent
        comments.append(generate_critique(prompt))
    return comments
Case study integration: Knowledge base includes real翻车案例 (backfire cases):
  • knowledge-base/laptops/_index.md
    : Lenovo Y9000P thermal issues
  • knowledge-base/smart-home/
    : Robot vacuum "deceptive cleaning" scandal
触发短语:
  • "会不会翻车"
  • "风险评估"
  • "有没有负面"
模板:
docs/templates/risk-assessment.md
包含:
  • 技术风险(参数夸大、测试手段误导)
  • 社交风险(5类用户画像负面反应模拟)
  • 平台风险(违反内容规范)
  • 历史先例(类似失败营销案例)
用户画像模拟:
docs/references/comment-personas.md
加载:
python
PERSONAS = {
    "参数党": "Spec sheet warriors - will fact-check every number",
    "解构找茬": "Deconstruction trolls - expose marketing tricks",
    "真实体验派": "Real user experience advocates - hate hype",
    "品牌信仰": "Brand loyalists - defend their tribe",
    "吃瓜群众": "Casual observers - amplify drama"
}

def simulate_comment_section(campaign_text: str, personas: dict) -> list:
    """生成各用户画像的负面评论预测。"""
    comments = []
    for persona_type, description in personas.items():
        prompt = f"As a {persona_type} ({description}), critique: {campaign_text}"
        # 传入AI Agent生成评论
        comments.append(generate_critique(prompt))
    return comments
案例整合: 知识库包含真实翻车案例:
  • knowledge-base/laptops/_index.md
    : 联想Y9000P散热问题
  • knowledge-base/smart-home/
    : 扫地机器人"虚假清洁"丑闻

4. New Category Playbook

4. 新品类策略手册

Trigger phrases:
  • "怎么传播新品类" (how to promote new category)
  • "市场教育成本高" (high market education cost)
  • "新品类破局" (breakthrough strategy for new category)
5 proven methods: Located in
docs/templates/new-category-playbook.md
Example - Method 1: 认知刷新法 (Perception Reset)
python
def generate_perception_reset_campaign(product_data: dict) -> dict:
    """
    Find human limit benchmark → Product breaks it → Visualize data
    
    Example: DJI ROMO cleaning 500㎡ villa in 2 hours
    (Human baseline: 4+ hours)
    """
    return {
        "human_baseline": "Find existing perception (e.g., 'villa cleaning takes half a day')",
        "product_performance": product_data['key_metric'],
        "visualization": "Side-by-side time-lapse video",
        "data_source": "Must cite: test environment + conditions"
    }
触发短语:
  • "怎么传播新品类"
  • "市场教育成本高"
  • "新品类破局"
5种验证有效的方法: 位于
docs/templates/new-category-playbook.md
示例 - 方法1: 认知刷新法 (Perception Reset)
python
def generate_perception_reset_campaign(product_data: dict) -> dict:
    """
    找到人类极限基准 → 产品打破基准 → 数据可视化
    
    示例:DJI ROMO 2小时清洁500㎡别墅
    (人类基准:4小时以上)
    """
    return {
        "human_baseline": "找到现有认知(例如:'别墅清洁需半天')",
        "product_performance": product_data['key_metric'],
        "visualization": "对比延时视频",
        "data_source": "必须标注:测试环境 + 条件"
    }

Usage for smart home robot vacuum

智能家居扫地机器人使用示例

romo_data = { 'key_metric': '2小时清洁500㎡别墅 (2 hours for 500㎡ villa)', 'comparison': '人工清洁需4小时+ (Manual: 4+ hours)' } campaign = generate_perception_reset_campaign(romo_data)

**Method 5: 专业信任纪录片法 (Professional Trust Documentary)**
- Recruit real professionals (not actors)
- 6-month field test period
- Minimalist documentary style (no hype language)
- Case study: DJI agriculture drones with actual farmers
romo_data = { 'key_metric': '2小时清洁500㎡别墅', 'comparison': '人工清洁需4小时+' } campaign = generate_perception_reset_campaign(romo_data)

**方法5: 专业信任纪录片法 (Professional Trust Documentary)**
- 招募真实专业人士(非演员)
- 6个月实地测试周期
- 极简纪录片风格(无夸张话术)
- 案例:DJI农业无人机与真实农户合作

5. Data Import & Preprocessing

5. 数据导入与预处理

Trigger phrase:
  • "处理新数据" (process new data)
  • "我导入了新文件" (I imported a new file)
Preprocessing script:
python
undefined
触发短语:
  • "处理新数据"
  • "我导入了新文件"
预处理脚本:
python
undefined

scripts/preprocess.py

scripts/preprocess.py

import pandas as pd import json import sys
def clean_review_data(input_file: str, output_dir: str): """ Clean and validate review data before adding to knowledge base.
Validation rules:
- Numbers must have units
- Ratings must have scale (e.g., 5/5)
- Price must include currency and date
- Source must include: KOL name + platform + publish date
"""
df = pd.read_csv(input_file)

# Validation
required_columns = ['product_name', 'metric', 'value', 'unit', 'source', 'date']
for col in required_columns:
    if col not in df.columns:
        raise ValueError(f"Missing required column: {col}")

# Check source format
for idx, row in df.iterrows():
    source = row['source']
    if not ('|' in source and len(source.split('|')) >= 3):
        print(f"Warning: Invalid source format at row {idx}: {source}")
        print("Expected: KOL名|平台|日期 (e.g., 爱否科技|Bilibili|2025-03)")

# Export to knowledge base
category = df['category'].iloc[0]
output_path = f"{output_dir}/{category}/_data.json"

df.to_json(output_path, orient='records', force_ascii=False, indent=2)
print(f"Processed {len(df)} records to {output_path}")
import pandas as pd import json import sys
def clean_review_data(input_file: str, output_dir: str): """ 添加至知识库前,清洁并验证评测数据。
验证规则:
- 数字必须带单位
- 评分必须带刻度(例如:5/5)
- 价格必须包含货币与日期
- 来源必须包含:KOL名称 + 平台 + 发布日期
"""
df = pd.read_csv(input_file)

# 验证必填列
required_columns = ['product_name', 'metric', 'value', 'unit', 'source', 'date']
for col in required_columns:
    if col not in df.columns:
        raise ValueError(f"缺少必填列: {col}")

# 检查来源格式
for idx, row in df.iterrows():
    source = row['source']
    if not ('|' in source and len(source.split('|')) >= 3):
        print(f"警告:第{idx}行来源格式无效: {source}")
        print("预期格式:KOL名|平台|日期(例如:爱否科技|Bilibili|2025-03)")

导出至知识库
category = df['category'].iloc[0]
output_path = f"{output_dir}/{category}/_data.json"

df.to_json(output_path, orient='records', force_ascii=False, indent=2)
print(f"已处理{len(df)}条记录至{output_path}")

Usage

使用示例

if name == "main": clean_review_data(sys.argv[1], sys.argv[2])

**Run preprocessing:**

```bash
python scripts/preprocess.py earphone_reviews.csv knowledge-base/
if name == "main": clean_review_data(sys.argv[1], sys.argv[2])

**运行预处理:**

```bash
python scripts/preprocess.py earphone_reviews.csv knowledge-base/

Configuration

配置说明

User Profile (Optional)

用户配置文件(可选)

Create
user-config.json
for personalized output:
json
{
  "brand": "your_brand_name",
  "category": "mobile",
  "target_price_range": "2000-3000",
  "competitors": ["Redmi", "Realme", "iQOO"],
  "platforms": ["Xiaohongshu", "Douyin", "Bilibili"],
  "risk_tolerance": "conservative",
  "kol_preferences": ["爱否科技", "ZEALER"]
}
创建
user-config.json
以生成个性化输出:
json
{
  "brand": "your_brand_name",
  "category": "mobile",
  "target_price_range": "2000-3000",
  "competitors": ["Redmi", "Realme", "iQOO"],
  "platforms": ["Xiaohongshu", "Douyin", "Bilibili"],
  "risk_tolerance": "conservative",
  "kol_preferences": ["爱否科技", "ZEALER"]
}

Environment Variables

环境变量

For API integrations (optional):
bash
undefined
用于API集成(可选):
bash
undefined

.env file

.env 文件

XIAOHONGSHU_API_KEY=your_key_here BILIBILI_API_KEY=your_key_here MARKET_DATA_SOURCE=https://your-data-api.com

Load in Python:

```python
import os
from dotenv import load_dotenv

load_dotenv()
api_key = os.getenv('XIAOHONGSHU_API_KEY')
XIAOHONGSHU_API_KEY=your_key_here BILIBILI_API_KEY=your_key_here MARKET_DATA_SOURCE=https://your-data-api.com

在Python中加载:

```python
import os
from dotenv import load_dotenv

load_dotenv()
api_key = os.getenv('XIAOHONGSHU_API_KEY')

Real-World Workflow Example

实际工作流示例

Complete campaign generation flow:

完整营销方案生成流程:

python
import os
import json
python
import os
import json

1. Load knowledge base

1. 加载知识库

def load_knowledge_base(category: str) -> str: path = f"knowledge-base/{category}/_index.md" with open(path, 'r', encoding='utf-8') as f: return f.read()
def load_knowledge_base(category: str) -> str: path = f"knowledge-base/{category}/_index.md" with open(path, 'r', encoding='utf-8') as f: return f.read()

2. Load templates

2. 加载模板

def load_template(template_name: str) -> str: path = f"docs/templates/{template_name}.md" with open(path, 'r', encoding='utf-8') as f: return f.read()
def load_template(template_name: str) -> str: path = f"docs/templates/{template_name}.md" with open(path, 'r', encoding='utf-8') as f: return f.read()

3. Check used ideas for deduplication

3. 检查已使用创意去重

def load_used_ideas() -> list: path = "docs/templates/used-ideas.md" with open(path, 'r', encoding='utf-8') as f: content = f.read() # Extract hooks from markdown list import re hooks = re.findall(r'- **(.+?)**', content) return hooks
def load_used_ideas() -> list: path = "docs/templates/used-ideas.md" with open(path, 'r', encoding='utf-8') as f: content = f.read() # 从Markdown列表中提取钩子 import re hooks = re.findall(r'- \\(.+?)\\', content) return hooks

4. Generate campaign

4. 生成营销方案

def generate_campaign(product_spec: dict, platform: str): kb_data = load_knowledge_base(product_spec['category']) template = load_template('creative-output') used_hooks = load_used_ideas()
prompt = f"""
Knowledge Base:
{kb_data}

Template:
{template}

Already Used Hooks (avoid these):
{used_hooks}

Product Specs:
{json.dumps(product_spec, ensure_ascii=False)}

Target Platform: {platform}

Generate 3 creative campaign ideas following the template.
Ensure:
1. Every number has a source citation
2. No AI clichés (no "值得注意的是", "首先其次")
3. Hooks are not in used_hooks list
4. Include risk assessment for each idea
"""

# Feed to your AI agent (Claude, GPT, etc.)
return prompt
def generate_campaign(product_spec: dict, platform: str): kb_data = load_knowledge_base(product_spec['category']) template = load_template('creative-output') used_hooks = load_used_ideas()
prompt = f"""
知识库数据:
{kb_data}

模板:
{template}

已使用钩子(需避免):
{used_hooks}

产品参数:
{json.dumps(product_spec, ensure_ascii=False)}

目标平台: {platform}

遵循模板生成3个创意营销方案。
需满足:
1. 所有数据均标注来源
2. 无AI套话(禁用"值得注意的是"、"首先其次")
3. 钩子未出现在已使用列表中
4. 每个创意包含风险评估
"""

# 传入AI Agent(Claude、GPT等)
return prompt

5. Usage

5. 使用示例

product = { 'category': 'mobile', 'name': 'SuperPhone X1', 'chipset': 'Snapdragon 8 Gen 3', 'price': 2499, 'key_features': ['120Hz OLED', '5000mAh battery', '67W charging'] }
campaign_prompt = generate_campaign(product, 'Xiaohongshu')
product = { 'category': 'mobile', 'name': 'SuperPhone X1', 'chipset': 'Snapdragon 8 Gen 3', 'price': 2499, 'key_features': ['120Hz OLED', '5000mAh battery', '67W charging'] }
campaign_prompt = generate_campaign(product, 'Xiaohongshu')

Send campaign_prompt to AI agent

将campaign_prompt发送至AI Agent

undefined
undefined

Risk assessment workflow:

风险评估工作流:

python
def assess_campaign_risk(campaign_text: str) -> dict:
    """
    Run multi-layer risk check on campaign content.
    """
    # Load personas
    personas_content = load_template('comment-personas')
    
    # Load historical failures
    kb_smart_home = load_knowledge_base('smart-home')
    failures = extract_case_studies(kb_smart_home)
    
    prompt = f"""
    Campaign Text:
    {campaign_text}
    
    Comment Personas (simulate negative reactions):
    {personas_content}
    
    Historical Failures (check for similar patterns):
    {failures}
    
    Assess risks in these dimensions:
    1. Technical credibility (can 参数党 debunk it?)
    2. Perception tricks (will 解构找茬 expose methods?)
    3. Platform compliance (content guidelines)
    4. Similar historical failures
    
    Output in risk-assessment.md template format.
    """
    
    return prompt
python
def assess_campaign_risk(campaign_text: str) -> dict:
    """
    对营销内容进行多层风险检查。
    """
    # 加载用户画像
    personas_content = load_template('comment-personas')
    
    # 加载历史失败案例
    kb_smart_home = load_knowledge_base('smart-home')
    failures = extract_case_studies(kb_smart_home)
    
    prompt = f"""
    营销方案文本:
    {campaign_text}
    
    评论用户画像(模拟负面反应):
    {personas_content}
    
    历史失败案例(检查相似模式):
    {failures}
    
    从以下维度评估风险:
    1. 技术可信度(参数党能否揭穿?)
    2. 营销手段(解构找茬能否曝光?)
    3. 平台合规性(内容规范)
    4. 相似历史失败案例
    
    按照risk-assessment.md模板格式输出。
    """
    
    return prompt

Usage

使用示例

risk_prompt = assess_campaign_risk(campaign_output)
undefined
risk_prompt = assess_campaign_risk(campaign_output)
undefined

Common Patterns

常见模式

Pattern 1: Cross-Category Competitive Analysis

模式1: 跨品类竞品分析

python
def cross_category_comparison(product_a: dict, product_b: dict) -> str:
    """
    Compare products from different categories (e.g., phone vs tablet).
    Must ensure data sources are compatible.
    """
    kb_a = load_knowledge_base(product_a['category'])
    kb_b = load_knowledge_base(product_b['category'])
    
    # Verify data source compatibility
    source_a = extract_sources(kb_a, product_a['name'])
    source_b = extract_sources(kb_b, product_b['name'])
    
    if not sources_compatible(source_a, source_b):
        return "Error: Cannot compare - data sources not aligned (different test methodologies)"
    
    # Proceed with comparison...
python
def cross_category_comparison(product_a: dict, product_b: dict) -> str:
    """
    对比不同品类产品(例如:手机vs平板)。
    必须确保数据源兼容。
    """
    kb_a = load_knowledge_base(product_a['category'])
    kb_b = load_knowledge_base(product_b['category'])
    
    # 验证数据源兼容性
    source_a = extract_sources(kb_a, product_a['name'])
    source_b = extract_sources(kb_b, product_b['name'])
    
    if not sources_compatible(source_a, source_b):
        return "错误:无法对比 - 数据源不匹配(测试方法不同)"
    
    # 继续执行对比...

Pattern 2: KOL Ecosystem Integration

模式2: KOL生态整合

python
def select_kols_for_category(category: str, budget: int) -> list:
    """
    Select KOLs based on category expertise and budget.
    """
    kol_db_path = "docs/ecosystem/kols.md"
    with open(kol_db_path, 'r', encoding='utf-8') as f:
        kol_data = f.read()
    
    # Extract KOLs for category
    import re
    kol_pattern = rf'\| (.+?) \| {category} \| (.+?) \| (.+?) \|'
    matches = re.findall(kol_pattern, kol_data)
    
    # matches = [(name, followers, estimated_cost), ...]
    affordable_kols = [k for k in matches if parse_cost(k[2]) <= budget]
    
    return affordable_kols
python
def select_kols_for_category(category: str, budget: int) -> list:
    """
    根据品类专业度与预算选择KOL。
    """
    kol_db_path = "docs/ecosystem/kols.md"
    with open(kol_db_path, 'r', encoding='utf-8') as f:
        kol_data = f.read()
    
    # 提取对应品类的KOL
    import re
    kol_pattern = rf'\\| (.+?) \\| {category} \\| (.+?) \\| (.+?) \\|'
    matches = re.findall(kol_pattern, kol_data)
    
    # matches = [(名称, 粉丝量, 预估费用), ...]
    affordable_kols = [k for k in matches if parse_cost(k[2]) <= budget]
    
    return affordable_kols

Pattern 3: Meme/Jargon Validation

模式3: 热词/术语验证

python
def validate_campaign_language(text: str) -> list:
    """
    Check campaign text against industry meme database to avoid backfires.
    """
    meme_db = load_template('industry-memes')
    warnings = []
    
    # Load risky phrases
    risky_phrases = extract_risky_phrases(meme_db)
    
    for phrase in risky_phrases:
        if phrase in text:
            context = get_meme_context(meme_db, phrase)
            warnings.append({
                'phrase': phrase,
                'risk': context['risk_level'],
                'explanation': context['why_risky']
            })
    
    return warnings
python
def validate_campaign_language(text: str) -> list:
    """
    检查营销文本是否包含行业敏感热词,避免舆情风险。
    """
    meme_db = load_template('industry-memes')
    warnings = []
    
    # 加载风险短语
    risky_phrases = extract_risky_phrases(meme_db)
    
    for phrase in risky_phrases:
        if phrase in text:
            context = get_meme_context(meme_db, phrase)
            warnings.append({
                'phrase': phrase,
                'risk': context['risk_level'],
                'explanation': context['why_risky']
            })
    
    return warnings

Usage

使用示例

warnings = validate_campaign_language("我们的产品遥遥领先")
warnings = validate_campaign_language("我们的产品遥遥领先")

Output: [{'phrase': '遥遥领先', 'risk': 'high', 'explanation': 'Huawei meme - used ironically'}]

输出: [{'phrase': '遥遥领先', 'risk': 'high', 'explanation': 'Huawei相关热词 - 常被用于反讽'}]

undefined
undefined

Troubleshooting

故障排查

Issue 1: "知识库暂无此数据" (No data in knowledge base)

问题1: "知识库暂无此数据"

Cause: Querying product/brand not in knowledge base
Solution:
python
undefined
原因: 查询的产品/品牌不在知识库中
解决方案:
python
undefined

Add data via preprocessing

通过预处理添加数据

python scripts/preprocess.py new_product_data.csv knowledge-base/
python scripts/preprocess.py new_product_data.csv knowledge-base/

Or manually create markdown file

或手动创建Markdown文件

knowledge-base/mobile/new-brand.md

knowledge-base/mobile/new-brand.md

undefined
undefined

Issue 2: Source Attribution Missing

问题2: 缺少来源标注

Cause: Generated content lacks proper citations
Fix:
python
undefined
原因: 生成内容未包含正确引用
修复方法:
python
undefined

Add validation step

添加验证步骤

def validate_sources(content: str) -> bool: """Check if every claim has a source.""" import re # Numbers without sources numbers = re.findall(r'\d+(?:.\d+)?[%㎡mAh元]', content) sources = re.findall(r'[来源:.+?]', content)
if len(numbers) > len(sources):
    raise ValueError(f"Found {len(numbers)} claims but only {len(sources)} sources")
return True
undefined
def validate_sources(content: str) -> bool: """检查所有主张是否均有来源。""" import re # 无来源的数字 numbers = re.findall(r'\d+(?:\.\d+)?[%㎡mAh元]', content) sources = re.findall(r'\[来源:.+?\]', content)
if len(numbers) > len(sources):
    raise ValueError(f"发现{len(numbers)}项主张,但仅{len(sources)}项标注来源")
return True
undefined

Issue 3: AI Clichés in Output

问题3: 输出包含AI套话

Cause: Template not enforcing de-AI rules
Fix:
python
AI_CLICHES = [
    "值得注意的是", "首先其次最后", "我们可以发现",
    "不是A而是B", "在...背景下", "赋能", "生态"
]

def check_ai_language(text: str) -> list:
    """Detect AI clichés."""
    found = [phrase for phrase in AI_CLICHES if phrase in text]
    if found:
        print(f"Warning: AI clichés detected: {found}")
        print("Rewrite using colloquial language or data-driven statements")
    return found
原因: 模板未强制执行去AI化规则
修复方法:
python
AI_CLICHES = [
    "值得注意的是", "首先其次最后", "我们可以发现",
    "不是A而是B", "在...背景下", "赋能", "生态"
]

def check_ai_language(text: str) -> list:
    """检测AI套话。"""
    found = [phrase for phrase in AI_CLICHES if phrase in text]
    if found:
        print(f"警告:检测到AI套话: {found}")
        print("请使用口语化表达或数据驱动的陈述改写")
    return found

Issue 4: Data Source Conflicts

问题4: 数据源冲突

Cause: Mixing incompatible evaluation methodologies
Example:
python
undefined
原因: 混合了不兼容的评测方法
示例:
python
undefined

Wrong: Comparing battery life from different test conditions

错误:对比不同测试条件下的续航

laptop_a_battery = "10 hours (PCMark 10 test)" laptop_b_battery = "12 hours (video playback)"
laptop_a_battery = "10 hours (PCMark 10 test)" laptop_b_battery = "12 hours (video playback)"

Fix: Flag as incomparable

修复:标记为不可对比

def compare_metrics(metric_a: dict, metric_b: dict): if metric_a['test_method'] != metric_b['test_method']: return { 'comparable': False, 'reason': f"Different test methods: {metric_a['test_method']} vs {metric_b['test_method']}" }
undefined
def compare_metrics(metric_a: dict, metric_b: dict): if metric_a['test_method'] != metric_b['test_method']: return { 'comparable': False, 'reason': f"测试方法不同: {metric_a['test_method']} vs {metric_b['test_method']}" }
undefined

Issue 5: Missing Risk Flags

问题5: 缺少风险标记

Cause: Campaign generated without persona simulation
Fix:
python
def enforce_risk_check(campaign: str) -> str:
    """Mandatory risk assessment before finalizing campaign."""
    personas = load_template('comment-personas')
    
    if "[风险评估]" not in campaign:
        risk_section = generate_risk_assessment(campaign, personas)
        campaign += f"\n\n## 风险评估\n{risk_section}"
    
    return campaign
原因: 生成营销方案时未进行用户画像模拟
修复方法:
python
def enforce_risk_check(campaign: str) -> str:
    """最终确定方案前强制进行风险评估。"""
    personas = load_template('comment-personas')
    
    if "[风险评估]" not in campaign:
        risk_section = generate_risk_assessment(campaign, personas)
        campaign += f"\
\

Quality Checklist

风险评估\

Before finalizing any campaign output:
python
QUALITY_CHECKS = {
    "数据纪律": [
        "✓ Every number has source citation",
        "✓ No fabricated statistics",
        "✓ Speculation labeled as [推测]",
        "✓ Competitive data from same source"
    ],
    "去AI化": [
        "✓ No '值得注意的是' phrases",
        "✓ No '首先其次最后' structures",
        "✓ No generic corporate jargon"
    ],
    "风险覆盖": [
        "✓ 5 personas simulated",
        "✓ Historical case studies checked",
        "✓ Platform compliance verified"
    ]
}

def run_quality_check(content: str) -> dict:
    """Run full quality validation."""
    results = {}
    for category, checks in QUALITY_CHECKS.items():
        results[category] = []
        for check in checks:
            # Implement validation logic for each check
            pass
    return results
{risk_section}"
return campaign
undefined

Advanced Usage

质量检查清单

Sub-Agent Integration

DataProcessor Sub-Agent:
python
undefined
最终确定营销方案输出前需完成以下检查:
python
QUALITY_CHECKS = {
    "数据纪律": [
        "✓ 所有数字均标注来源",
        "✓ 无编造统计数据",
        "✓ 推测内容标记为[推测]",
        "✓ 竞品数据来自同一来源"
    ],
    "去AI化": [
        "✓ 无'值得注意的是'类表述",
        "✓ 无'首先其次最后'类结构",
        "✓ 无通用企业话术"
    ],
    "风险覆盖": [
        "✓ 已模拟5类用户画像",
        "✓ 已检查历史案例",
        "✓ 已验证平台合规性"
    ]
}

def run_quality_check(content: str) -> dict:
    """执行完整质量验证。"""
    results = {}
    for category, checks in QUALITY_CHECKS.items():
        results[category] = []
        for check in checks:
            # 为每个检查实现验证逻辑
            pass
    return results

Triggered by: "处理新数据"

进阶用法

子Agent集成

def activate_data_processor(raw_data: str): """ Sub-agent for data cleaning and validation. See: docs/references/subagent-dataprocessor.md """ steps = [ "1. 纠错 - Fix encoding, formatting", "2. 判断类型 - Classify data type (review/spec/comment)", "3. 清洗 - Remove ads, extract facts", "4. 提取 - Structured data extraction", "5. 更新索引 - Update knowledge base index" ] # Execute preprocessing pipeline return process_pipeline(raw_data, steps)

**FactChecker Sub-Agent:**

```python
DataProcessor子Agent:
python
undefined

Triggered by: "帮我检查"

触发词:"处理新数据"

def activate_fact_checker(content: str): """ Adversarial audit for generated content. See: docs/references/subagent-factchecker.md """ checks = { "数据核验": verify_data_sources(content), "遗漏检测": check_missing_citations(content), "幻觉扫描": detect_fabrications(content), "逻辑一致性": validate_logic_chain(content) } return checks
undefined
def activate_data_processor(raw_data: str): """ 用于数据清理与验证的子Agent。 参考:docs/references/subagent-dataprocessor.md """ steps = [ "1. 纠错 - 修复编码、格式问题", "2. 判断类型 - 分类数据类型(评测/参数/评论)", "3. 清洗 - 移除广告、提取事实", "4. 提取 - 结构化数据提取", "5. 更新索引 - 更新知识库索引" ] # 执行预处理流程 return process_pipeline(raw_data, steps)

**FactChecker子Agent:**

```python

Knowledge Base Coverage

触发词:"帮我检查"

CategoryCompletenessData Sources
Mobile⭐⭐⭐16 brands, chipset camps, price tiers
Earphones⭐⭐⭐爱否科技 12-product clip-on review
Laptops⭐⭐⭐笔吧 2025 guide, 8 price segments
Wearables⭐⭐⭐IDC 2025 market share, brand matrix
Smart Home⭐⭐⭐⭐4 cross-referenced robot vacuum reviews, DJI ROMO case

License: MIT
Repository: https://github.com/killsnake01/China-Marketing-Copilot-Skill
Last Updated: 2026-05-09
def activate_fact_checker(content: str): """ 对生成内容进行对抗式审核的子Agent。 参考:docs/references/subagent-factchecker.md """ checks = { "数据核验": verify_data_sources(content), "遗漏检测": check_missing_citations(content), "幻觉扫描": detect_fabrications(content), "逻辑一致性": validate_logic_chain(content) } return checks
undefined

知识库覆盖范围

品类完整度数据源
手机⭐⭐⭐16个品牌、芯片阵营、价格档位
耳机⭐⭐⭐爱否科技12款半入耳式产品评测
笔记本⭐⭐⭐笔吧2025年指南、8个价格区间
可穿戴设备⭐⭐⭐IDC 2025年市场份额、品牌矩阵
智能家居⭐⭐⭐⭐4份交叉验证的扫地机器人评测、DJI ROMO案例

许可证: MIT
仓库地址: https://github.com/killsnake01/China-Marketing-Copilot-Skill
最后更新: 2026-05-09",