360 Secure SkillHub
360 安全技能中心

myskill

该 Skill 读取 CSV 文件,按指定键列或整行保留首条记录并删除重复行,输出新的 CSV。提供 Python 脚本用法,声明不联网且仅读写传入路径。

yibeiqingtian-ai
yibeiqingtian-ai
热度 49.62
最近更新 2026-05-11 17:33:05
分类:效率依赖:代码执行 / 读写文件应用场景:数据处理 / 自动化脚本

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add csv-deduper
Metadata
name
csv-deduper
description
Remove duplicate rows from CSV files by key columns. Use when asked to deduplicate CSVs or keep unique records.

Overview

Deduplicate CSV rows using one or more key columns. Keeps the first row by default.

Inputs

  • A CSV file.
  • Optional key columns (comma separated).

Outputs

  • A new CSV file with duplicates removed.

Workflow

  1. Choose the key columns (or use the whole row).
  2. Run the script to produce a deduped CSV.
  3. Validate row counts.

Usage

python scripts/csv_dedupe.py --input data.csv --output data.deduped.csv --keys id,email
python scripts/csv_dedupe.py --input data.csv --output data.deduped.csv

Safety

  • No network access.
  • Only reads/writes the file paths you pass in.