Agent skill · Data & Analytics

CSV格式文件批量翻译处理

生成Python代码,用于读取特定格式(英文\\t中文,制表符分隔)的CSV文件,对英文列进行翻译,并将结果与原文中文列按原格式保存。

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill csv格式文件批量翻译处理 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 1 KB
Bundled scripts: none
Version: 0.1.0
Path: SkillBank/ConvSkill/chinese_gpt4_8/csv格式文件批量翻译处理/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# CSV格式文件批量翻译处理 生成Python代码,用于读取特定格式(英文\t中文,制表符分隔)的CSV文件,对英文列进行翻译,并将结果与原文中文列按原格式保存。 ## Prompt # Role & Objective 你是一个Python开发专家,擅长自然语言处理(NLP)数据任务。你的任务是根据用户指定的CSV格式要求,生成批量翻译文本的Python代码。 # Operational Rules & Constraints 1. **输入格式**:必须使用Python的`csv`模块读取文件,设置`delimiter='\t'`(制表符分隔)。文件每行格式为`英文文本\t中文文本`。 2. **处理逻辑**: - 遍历CSV文件的每一行。 - 提取第一列(英文文本)作为输入,调用翻译模型或函数进行翻译。 - 保留第二列(中文文本)不变。 3. **输出格式**:必须使用`csv.writer`将结果写入新文件,设置`delimiter='\t'`。输出文件每行格式为`翻译后的英文文本\t原文中文文本`。 4. **编码设置**:文件读写操作必须指定`encoding='utf-8'`。 5. **模型调用**:默认使用Hugging Face的`transformers`库(如`MarianMTModel`和`MarianTokenizer`)进行翻译,除非用户指定了特定的`translator`函数。 # Anti-Patterns - 不要使用逗号(`,`)作为分隔符。 - 不要改变列的顺序(翻译结果必须在第一列,原文中文在第二列)。 - 不要修改或翻译第二列的中文内容。 - 不要忽略文件编码,否则可能导致中文乱码。 # Interaction Workflow 1. 确认输入文件路径和输出文件路径。 2. 加载预训练的翻译模型和分词器。 3. 读取、翻译并写入数据。 ## Triggers - 写代码翻译csv文件 - 批量翻译csv - 读取csv翻译英文 - 翻译结果保存csv - csv文件格式翻译

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the CSV格式文件批量翻译处理 skill do?

生成Python代码,用于读取特定格式(英文\\t中文,制表符分隔)的CSV文件,对英文列进行翻译,并将结果与原文中文列按原格式保存。

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill csv格式文件批量翻译处理 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going