Skip to content
Back to skills

Meta Tags Aggregator

ASecurity

元标签聚合工具。合并意思相近的元标签,将多个相似标签归类到统一的标签下。 当用户提到标签聚合、合并标签、归类标签、标签映射、标签合并、整理标签等需求时使用此skill。 即使用户没有明确说出"聚合"或"合并",只要任务涉及将多个相似标签归类统一, 就应该使用此skill。

  • 539 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 11, 2026
ai-agentspythonbashapi

Works with

  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 5 files and shows the line behind each finding

Scanned September 11, 2026

npx -y skills add cas-bigdatalab/piflow --skill meta_tags_aggregator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Meta Tags Aggregator?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Meta Tags Aggregator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/cas-bigdatalab-meta-tags-aggregator/badge)](https://www.skillsdirectory.com/skills/cas-bigdatalab-meta-tags-aggregator)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: meta_tags_aggregator
description: |
  元标签聚合工具。合并意思相近的元标签,将多个相似标签归类到统一的标签下。
  当用户提到标签聚合、合并标签、归类标签、标签映射、标签合并、整理标签等需求时使用此skill。
  即使用户没有明确说出"聚合"或"合并",只要任务涉及将多个相似标签归类统一,
  就应该使用此skill。

name_zh: 元标签聚合算子
input_params:
  - name: input
    type: string
    required: true
    description: 输入JSON文件路径

  - name: output
    type: string
    required: true
    description: 输出JSON文件路径

  - name: api_model
    type: string
    required: true
    description: API模型名称

  - name: meta_tag_key
    type: string
    required: true
    description: 元数据标签的键名

  - name: target_tags
    type: string
    required: false
    description: 目标标签列表,逗号分隔(不指定则自动生成)

  - name: api_endpoint
    type: string
    required: false
    description: API端点URL

output_params:
  - name: output
    type: json_file
    description: 标签聚合后的JSON文件,包含合并后的标签
tag: 数据衍生
publisher: COMMUNITY
---

# Meta Tags Aggregator 元标签聚合 Skill

## 功能概述

本skill通过调用大语言模型(LLM)API,智能分析并合并意思相近的元标签。
例如:将"开心"、"快乐"、"高兴"归类为"开心",将"难过"、"伤心"、"悲痛"归类为"难过"。

## 触发条件

当用户请求以下任务时,应使用此skill:
- 标签聚合
- 合并相似标签
- 归类标签
- 标签映射
- 整理标签
- 统一标签分类

## 核心参数说明

### 必需参数
| 参数 | 说明 |
|------|------|
| `--input` | 输入JSON文件路径 |
| `--output` | 输出JSON文件路径 |
| `--api_model` | API模型名称 |
| `--meta_tag_key` | 元数据标签的键名 |

### 可选参数
| 参数 | 说明 | 默认值 |
|------|------|--------|
| `--target_tags` | 目标标签列表,逗号分隔 | `None` (自动生成) |
| `--api_endpoint` | API端点URL | `None` |

## 输入文件格式

```json
[
  {
    "meta": [
      {"query_sentiment_label": "开心"},
      {"query_sentiment_label": "快乐"},
      {"query_sentiment_label": "难过"}
    ]
  }
]
```

或使用列表类型的标签:

```json
[
  {
    "meta": [
      {"dialog_sentiment_labels": ["开心", "平静"]},
      {"dialog_sentiment_labels": ["快乐", "开心", "幸福"]}
    ]
  }
]
```

## 使用方法

### 基本用法(自动生成标签分类)
```bash
python scripts/run_meta_tags_aggregator.py \
  --input ./input.json \
  --output ./output.json \
  --api_model qwen2.5-72b-instruct \
  --meta_tag_key query_sentiment_label
```

### 指定目标标签
```bash
python scripts/run_meta_tags_aggregator.py \
  --input ./input.json \
  --output ./output.json \
  --api_model qwen2.5-72b-instruct \
  --meta_tag_key query_sentiment_label \
  --target_tags 开心,难过,其他
```

## 输出示例

**命令行输出:**
```
[OK] Meta tags aggregation completed!
   API model: qwen2.5-72b-instruct
   Meta tag key: query_sentiment_label
   Target tags: ['开心', '难过', '其他']
   Input file: ./input.json
   Output file: ./output.json
```

**输入示例:**
```json
[{"meta": [{"query_sentiment_label": "开心"}, {"query_sentiment_label": "快乐"}, {"query_sentiment_label": "难过"}]}]
```

**输出示例:**
```json
[{"meta": [{"query_sentiment_label": "开心"}, {"query_sentiment_label": "开心"}, {"query_sentiment_label": "难过"}]}]
```

## 环境要求

**安装依赖:**
本SKILL使用依赖 data_juicer,请在调用前安装好python环境并安装data_juicer,可用以下指令进行安装:
```bash
pip install py-data-juicer
```

**API配置:**
```bash
export OPENAI_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1/
export OPENAI_API_KEY=your_api_key
```

## 注意事项

1. **必需参数**:需要指定 `--api_model` 和 `--meta_tag_key`
2. **输入格式**:输入JSON必须包含 `meta` 字段
3. **标签类型**:支持单个字符串或字符串列表作为标签值
4. **目标标签**:`--target_tags` 可选,不指定时由LLM自动生成合理的分类

Files in this skill

  • SKILL.md4.2 KB
  • assets/icon.png25.2 KB
  • scripts/example_input.json249 B
  • scripts/run_meta_tags_aggregator.py3.2 KB
  • skill.json2.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…