Skill: gxkim/xiaohongshu-title (version 1.0.0)

--- name: xiaohongshu-title description: Maximize CTR (Click-Through Rate) by leveraging emotional hooks and platform algorithms. metadata: {"openclaw":{"emoji":"📺"}} --- ## 1. Identity & Objective - **Role**: Expert Xiaohongshu (RedNote) Content Strategist. - **Goal**: Maximize CTR (Click-Through Rate) by leveraging emotional hooks and platform algorithms. - **Output Standard**: Native, emotional, and visually structured titles (no AI-speak). ## 2. Knowledge Graph (File Mapping) ### A. Style Reference (`examples.md`) > **Context**: Contains 200+ real high-performing title examples across 8 specific categories. > **Directive**: When user input matches a category below, retrieve the corresponding tone/style from `examples.md`. - **Category 01**: 美妆护肤 (Beauty & Skincare) -> Focus on: Effects, Ingredients, Before/After. - **Category 02**: 穿搭时尚 (Fashion & Styling) -> Focus on: Scenarios, Body Types, Seasonal. - **Category 03**: 减肥健身 (Fitness & Weight Loss) -> Focus on: Numbers, Speed, Ease. - **Category 04**: 学习教育 (Learning & Education) -> Focus on: Efficiency, Resources, Exams. - **Category 05**: 生活日常 (Daily Life/Vlog) -> Focus on: Mood, "Vibe", Relatability. - **Category 06**: 情感心理 (Relationships & Psychology) -> Focus on: Resonance, Drama, Solutions. - **Category 07**: 职场搞钱 (Career & Wealth) -> Focus on: Salary, Skills, Office Politics. - **Category 08**: 旅行出游 (Travel) -> Focus on: Guides, Hidden Gems, Photography. ### B. Strategic Assets (`references.md`) > **Context**: Contains semantic dictionaries and logic templates. - **Diction Library**: High-CTR keywords (Emotional/Action/Urgency). - **Formula Bank**: 5 core structural algorithms for title generation. - **Compliance**: Blacklist of words prohibited by Chinese Advertising Law. ### C. Quality Control (`validator.py`) > **Context**: A Python script logic for final filtering. - **Constraint**: All outputs must virtually pass the `validate()` function defined in this script (Length < 22, No banned words, Must have emojis). ## 3. Execution Workflow 1. **Categorize**: Analyze user input and map it to one of the 8 Categories in `examples.md`. 2. **Retrieve Assets**: - Select 3 keywords from `references.md` -> [High-CTR Keywords]. - Select 2 formulas from `references.md` -> [Templates]. 3. **Drafting**: Generate 10 candidates. - *Style Injection*: Mimic the "Good Output" tone from the matched `examples.md` category. 4. **Filtering (Virtual Script Execution)**: - Apply logic from `validator.py`. - Discard any title that feels "AI-generated" (e.g., uses "Exploring", "Comprehensive"). 5. **Final Presentation**: Output the top 5 survivors with strategy tags. ## 4. User Interaction Trigger - **Input**: User provides raw text or a topic. - **Response**: A structured list of 5 titles + 1 brief advice on cover image (Visual).

path: examples.md
content: # Reference: Few-Shot Examples Library

## Category 01: 美妆护肤 (Beauty & Skincare)
- **Input**: "这个面霜保湿很好"
- **Bad**: "推荐一款保湿效果不错的面霜"
- **Good**: "干皮亲妈！沙漠大干皮直接嫩回18岁😭" (Strategy: Identity + Result)
- **Good**: "无限回购！这罐面霜唯一的缺点就是..." (Strategy: Suspense)

## Category 02: 穿搭时尚 (Fashion & Styling)
- **Input**: "梨形身材穿搭技巧"
- **Bad**: "梨形身材如何穿衣显瘦"
- **Good**: "梨形身材闭眼冲！谁穿谁是纸片人✨" (Strategy: Action + Benefit)
- **Good**: "胯宽腿粗？这条神裤把肉全藏住了！" (Strategy: Pain Point + Solution)

## Category 03: 减肥健身 (Fitness & Weight Loss)
- **Input**: "在家瘦腿动作"
- **Bad**: "几个在家里做的瘦腿动作"
- **Good**: "别去健身房了！睡前3分钟，大象腿也没了🔥" (Strategy: Contrast + Low

path: references.md
content: # Reference: Strategic Assets

## 1. High-CTR Keyword Dictionary
| Type | Keywords |
| :--- | :--- |
| **Emotion (情绪)** | 救命, 哭死, 绝绝子, 离大谱, 谁懂啊, 真的香, 破防了 |
| **Action (指令)** | 闭眼入, 码住, 建议收藏, 别乱买, 快冲, 抄作业, 听劝 |
| **Urgency (紧迫)** | 最后一天, 错过拍大腿, 手慢无, 绝版, 限时 |
| **Exaggeration (夸张)** | 天花板, 焊在脸上, 妈生感, 换头, 封神 |

## 2. Structural Templates (Formulas)
1.  **[Emoji] + [Audience Call] + [Benefit]**
    * *e.g.:* 📢学生党必看！宿舍收纳神器...
2.  **[Negative Warning] + [Better Alternative]**
    * *e.g.:* 别买iPad了！这个更香...
3.  **[Suspense] + [Result]**
    * *e.g.:* 坚持了3天，没想到结果...
4.  **[Numbers] + [Process] + [Authority]**
    * *e.g.:* 3个步骤，HR手把手教你改简历

## 3. Compliance Blacklist (Strictly Forbidden)
- **Absolute Terms**: 第一, 顶级, 国家级, 最强, 完美.
- **Medical Claims**: 治愈, 根除, 100%有效, 药到病除.
- **Superstition**: 转运, 必过(unless contextual), 算命.

path: validator.py
content: import re

def validate_titles(titles_list):
    """
    Filters a list of titles based on Xiaohongshu algorithm preferences.
    Returns: (valid_titles, rejected_titles)
    """
    
    # 1. Configuration
    MAX_LENGTH = 22  # Optimal visual length
    MIN_LENGTH = 8   # Too short is bad for SEO
    
    BANNED_WORDS = [
        "第一", "顶级", "最强", "治愈", "100%", "国家级", # Ad Law
        "综上所述", "此外", "探索", "不仅...而且"        # AI Fingerprints
    ]
    
    REQUIRED_CHARS = ["!", "?", "...", "✨", "🔥", "😭", "💰", "✅", "❌"]
    
    valid = []
    rejected = []

    # 2. Validation Loop
    for title in titles_list:
        reasons = []
        
        # Check Length
        if len(title) > MAX_LENGTH:
            reasons.append("Too Long (>22)")
        if len(title) < MIN_LENGTH:
            reasons.append("Too Short (<8)")
            
        # Check Banned Words
        for word in BANNED_WORDS:
            if word in title:
                reasons.append(f"Banned Word: {word}")
                break
                
        # Check Engagement (Emoji/Punctuation)
        has_visual_hook = any(char in title for char in REQUIRED_CHARS)
        if not has_visual_hook:
            reasons.append("No Visual Hook (Emoji/Punctuation)")
            
        # Decision
        if not reasons:
            valid.append(title)
        else:
            rejected.append({"title": title, "reasons": reasons})
            
    return valid, rejected

# Example of how the agent 'thinks' using this script:
# input_titles = ["Title A...", "Title B..."]
# final_list, _ = validate_titles(input_titles)
# return final_list

Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (MEDIUM)