360 Secure SkillHub
360 安全技能中心

Group Deduplicate

核心功能:跨微信、QQ、行业平台搜索社群,采用MD5校验自动去重,缓存已发现群30天,仅返回新群;支持缓存查看、清理等管理操作。典型场景:适合社群运营者、行业从业者寻找无重复的目标社群。输入为搜索关键词、指定平台等参数,输出包含新群的名称、平台、链接及缓存操作状态,需依赖memory-cache和多搜索引擎技能。

xiiang0529
xiiang0529
热度 14.02
最近更新 2026-07-09 14:12:07
分类:搜索依赖:代码执行 / 联网浏览搜索 / MCP 服务应用场景:社交媒体 / 数据处理 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add group-deduplicate
Metadata
name
group-deduplicate
description
Search for WeChat/QQ/industry groups with automatic deduplication using memory-cache. Finds new groups only, avoids pushing duplicates, and caches discovered groups for 30 days. Use when you need to discover and track unique community groups without repetition.

Group Deduplication Skill

Automatically searches for community groups (WeChat, QQ, industry groups) and filters out duplicates using memory-cache with MD5-based keys and 30-day TTL.

Workflow

  1. Search: Find groups using multi-search-engine across platforms
  2. Deduplicate: Check memory-cache for existing group records using MD5 hashes
  3. Filter: Return only new groups not previously discovered
  4. Push: Output new groups for user consumption
  5. Cache: Automatically store discovered groups in memory-cache with TTL 30 days

Key Features

  • MD5-based deduplication: Uses mema:groups:{群名MD5} key format
  • 30-day TTL: Cached entries automatically expire after 30 days
  • Zero duplicates: Only returns genuinely new group discoveries
  • Multi-platform: Searches WeChat, QQ, and industry groups
  • Memory efficient: Uses existing memory-cache skill for storage

Requirements

  • memory-cache skill must be installed
  • REDIS_URL environment variable configured for memory-cache
  • multi-search-engine skill available (bundled with OpenClaw)

Usage

Basic Search

Search for new groups in a specific industry or topic:

# Search for new AI industry groups
python3 $WORKSPACE/skills/group-deduplicate/scripts/search_groups.py --query "AI 人工智能 群" --max-results 10

# Search for new WeChat groups about blockchain
python3 $WORKSPACE/skills/group-deduplicate/scripts/search_groups.py --query "区块链 区块链技术 微信群" --platform wechat --max-results 5

Check Cache Status

View current cached groups or clear cache:

# See all cached groups
python3 $WORKSPACE/skills/group-deduplicate/scripts/cache_manager.py list

# Clear expired cache entries
python3 $WORKSPACE/skills/group-deduplicate/scripts/cache_manager.py cleanup

# Check specific group existence
python3 $WORKSPACE/skills/group-deduplicate/scripts/cache_manager.py check "群名称"

Installation

This skill assumes memory-cache is already installed. If not:

openclaw clawhub install memory-cache

Scripts Included

scripts/search_groups.py

Main search script with deduplication logic:

  • --query: Search query (required)
  • --platform: Target platform (wechat, qq, industry, all) - default: all
  • --max-results: Maximum results to return - default: 10
  • --use-cache: Enable deduplication (default: true)
  • --ttl-days: Cache TTL in days (default: 30)

scripts/cache_manager.py

Cache management interface:

  • list: Show all cached groups
  • check <group-name>: Check if group exists in cache
  • add <group-name>: Manually add group to cache
  • remove <group-name>: Remove group from cache
  • cleanup: Remove expired entries
  • stats: Show cache statistics

Technical Details

Cache Key Format

mema:groups:{md5_hash_of_group_name}
  • Uses MD5 hash of normalized group name for consistent keys
  • TTL defaults to 30 days (2592000 seconds)
  • Stored in memory-cache namespace

Search Process

  1. Normalize group name (trim whitespace, lowercase for hashing)
  2. Generate MD5 hash for cache key lookup
  3. Check memory-cache for existing entry
  4. If not found, return as new group and cache it
  5. If found, skip as duplicate

Supported Platforms

  • WeChat: Searches WeChat groups/channels
  • QQ: Searches QQ groups
  • Industry: Searches industry forums, Tieba, professional networks
  • All: Searches across all platforms (default)

Example Output

When running a search, you'll get:

Found 3 new groups:
1. AI技术交流群 (WeChat) - https://...
2. Machine Learning论坛 (Industry) - https://...
3. Deep Learning实战QQ群 (QQ) - https://...

Cached 3 new groups with 30-day TTL.

Notes

  • The skill respects search engine rate limits (1-2 second delays)
  • Only session cookies are used temporarily (no persistence)
  • Results include group name, platform, and link when available
  • Cache survives OpenClaw restarts via Redis persistence
  • Manual cache management available for administrative control

Troubleshooting

If you see "Redis connection failed":

  1. Ensure REDIS_URL is set in your environment
  2. Verify Redis server is running
  3. Check memory-cache skill installation

If searches return no results:

  1. Try broader or different search queries
  2. Verify multi-search-engine skill is functional
  3. Check network connectivity to search engines