lionad-morotar/local-tools/document-localize

Claude Code and agent skill by lionad-morotar/local-tools

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

为 LLM 指令文件中的操作添加本地化标注,让 LLM 使用指定语言输出。适用于任何 prompt/instruction 文件,支持文档写入、Git commit、代码注释等多种操作类型。触发场景:(1) 需要让 LLM 用中文/日语/韩语等输出内容 (2) 批量为指令文件添加语言标注 (3) 本地化现有 prompt 文件。

Install

npx vskill@latest install lionad-morotar/local-tools/document-localize

SKILL.md

Document Localize

为 LLM 指令文件中的操作添加本地化语言标注。

快速开始

输入:包含操作指令的文本 输出:添加语言标注后的文本

示例:

markdown
# Before
-Write a summary of the changes
-Commit the changes with a message
# After (默认中文标注)
-Write a summary of the changes(要求:使用中文)
-Commit the changes with a message(要求:使用中文)

支持的操作类型

文档写入操作

识别模式:

  • Write to、Write、Create、Generate、Update、Output
  • 撰写、编写、生成、创建、输出
  • 编写文档、生成报告、创建文件
Git 操作

识别模式:

  • commit、Commit、git commit
  • 提交、提交代码
  • PR 标题/描述相关指令
代码注释

识别模式:

  • Add comments、Comment the code
  • 添加注释、代码注释
  • 文档字符串生成
其他输出操作

识别模式:

  • Print、Display、Output、Show
  • 打印、显示、输出、展示
  • 回复/响应类指令

使用方式

1. 直接标注

为给定的指令文本添加语言标注:

参数:
- text: 需要标注的文本
- language: 目标语言(默认:中文)
- format: 标注格式(默认:(要求:使用{language}))
2. 批量处理文件

处理整个 prompt 文件:

参数:
- file_path: 文件路径
- language: 目标语言
- operations: 需要标注的操作类型列表(可选,默认全部)
3. 自定义格式

支持自定义标注格式:

markdown
# 默认格式
(要求:使用中文)
# 其他格式示例
[请用中文]
-- 请使用中文输出
> Language: Chinese

标注格式说明

默认格式
(要求:使用{language})
位置

标注默认紧随操作指令,保持原有句子格式不变。

语言映射
语言代码标注文本
zh / chinese中文
ja / japanese日语
ko / korean韩语
en / englishEnglish
de / germanDeutsch
fr / frenchFrançais

配置选项

可在执行时指定:

选项说明默认值
language目标语言中文
format标注格式(要求:使用{language})
operations操作类型过滤全部
skip_existing跳过已有标注的行true

注意事项

  1. 避免重复标注:检测行尾是否已有语言标注
  2. 保持格式:不改变原有文本的缩进和结构
  3. 智能识别:仅对输出类操作添加标注,不对读取/查询类操作添加

实践洞察

核心判断原则

是否需要标注 = 该指令是否要求 LLM 生成内容

不要死记硬背关键词,而是理解指令的意图:

需要标注(LLM生成内容)不需要标注(参考/描述/占位)
Create DISCOVERY.mdSee /templates/xxx.md
Write to: file.mdUse template: /templates/xxx.md
Output: Report contentOutput: [What artifacts will be created] ← 占位符
Produces DISCOVERY.md(在 <output> 标签中)Produces 2-4 commits ← 描述性
上下文决定语义

同一个词在不同上下文中含义不同:

markdown
<!-- 在 <output> 标签中 = LLM指令,需要标注 -->
<output>
After completion, create SUMMARY.md
</output>
<!-- 在正文中 = 描述性说明,不需要标注 -->
This workflow produces DISCOVERY.md for Level 2-3.
<!-- 方括号 = 人类占位符,不需要标注 -->
Output: [What artifacts will be created]
常见陷阱

陷阱1:过度标注

markdown
❌ See /templates/summary.md(要求:使用中文) ← 错误!只是引用路径
✅ See /templates/summary.md

陷阱2:遗漏标注

markdown
❌ After completion, create SUMMARY.md ← 错误!LLM需要执行
✅ After completion, create SUMMARY.md(要求:使用中文)

陷阱3:混淆 `Output:` 的语义

markdown
❌ Output: [What artifacts will be created](要求:使用中文) ← 错误!这是占位符
✅ Output: [What artifacts will be created]
❌ Output: DISCOVERY.md with recommendation ← 错误!需要标注
✅ Output: DISCOVERY.md with recommendation(要求:使用中文)
快速检查清单

标注前问自己:

  1. 谁在执行? LLM 执行 → 标注;人类执行/参考 → 不标注
  2. 什么内容? 生成新内容 → 标注;引用已有内容 → 不标注
  3. 方括号? [占位符] → 不标注(留给人类填写)
  4. XML标签? <output>、<step> 中的指令 → 通常需要标注

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/lionad-morotar/local-tools/document-localize/badge)](https://verified-skill.com/skills/lionad-morotar/local-tools/document-localize)

Something wrong with this skill or its page? Tell us.