document-localize
为 LLM 指令文件中的操作添加本地化标注,让 LLM 使用指定语言输出。适用于任何 prompt/instruction 文件,支持文档写入、Git commit、代码注释等多种操作类型。触发场景:(1) 需要让 LLM 用中文/日语/韩语等输出内容 (2) 批量为指令文件添加语言标注 (3) 本地化现有 prompt 文件。
Best use case
document-localize is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
为 LLM 指令文件中的操作添加本地化标注,让 LLM 使用指定语言输出。适用于任何 prompt/instruction 文件,支持文档写入、Git commit、代码注释等多种操作类型。触发场景:(1) 需要让 LLM 用中文/日语/韩语等输出内容 (2) 批量为指令文件添加语言标注 (3) 本地化现有 prompt 文件。
Teams using document-localize should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/document-localize/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How document-localize Compares
| Feature / Agent | document-localize | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
为 LLM 指令文件中的操作添加本地化标注,让 LLM 使用指定语言输出。适用于任何 prompt/instruction 文件,支持文档写入、Git commit、代码注释等多种操作类型。触发场景:(1) 需要让 LLM 用中文/日语/韩语等输出内容 (2) 批量为指令文件添加语言标注 (3) 本地化现有 prompt 文件。
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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 / english | English |
| de / german | Deutsch |
| fr / french | Français |
## 配置选项
可在执行时指定:
| 选项 | 说明 | 默认值 |
|-----|------|-------|
| `language` | 目标语言 | 中文 |
| `format` | 标注格式 | (要求:使用{language}) |
| `operations` | 操作类型过滤 | 全部 |
| `skip_existing` | 跳过已有标注的行 | true |
## 注意事项
1. **避免重复标注**:检测行尾是否已有语言标注
2. **保持格式**:不改变原有文本的缩进和结构
3. **智能识别**:仅对输出类操作添加标注,不对读取/查询类操作添加
## 实践洞察
### 核心判断原则
**是否需要标注 = 该指令是否要求 LLM 生成内容**
不要死记硬背关键词,而是理解指令的**意图**:
| 需要标注(LLM生成内容) | 不需要标注(参考/描述/占位) |
|------------------------|---------------------------|
| `Create DISCOVERY.md` | `See /templates/xxx.md` |
| `Write to: file.md` | `Use template: /templates/xxx.md` |
| `Output: Report content` | `Output: [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>` 中的指令 → 通常需要标注Related Skills
open-u-dashboard
open understand dashboard for user
sync-template-skill
这是一个技能文件的模板,展示了技能的基本结构和内容组织方式。
talk-humanize
Be direct and informative. No filler, no fluff, but give enough to be useful.
search-web
使用 Evaluator-optimizer 模式进行系统性多轮网络搜索,采用结构化 Ask 流程在搜索前澄清研究目标。基于 YC Office Hours 的提问方法论,确保搜索方向清晰、结果可验证。当用户需要深入调查复杂主题、验证假设或全面收集信息时使用。
save-to-eagle
归档网络内容到 Eagle 素材库。支持:(1) Behance/Pixiv 图片归档,(2) 网页视频录制(页面动画、滚动录制)。使用方式:'归档 [URL]' 归档图片;'录制网页视频 [URL]' 录制页面动画;'滚动录制 [URL]' 自动滚动截图。支持评分如 '归档 [URL], 3/5'。
save-ob-chaos
将对话内容快速存档到 Obsidian Chaos 文件夹。触发词:"存档到 Obsidian"、"保存到 Chaos"、"ob 存档"、"记下这个"、"保存这段内容"、"存到 chaos"。
save-ob-chaos-mermaid
将 Mermaid 图表保存到 Obsidian Chaos 文件夹。触发词:"保存 mermaid 到 chaos"、"mermaid 存档"。
save-ob-chaos-excalidraw
绘制 Excalidraw 图表并存档到 Obsidian Chaos 文件夹。触发词:"画个图存到 Obsidian"、"excalidraw 存档"、"画个流程图保存"、"画图存到 chaos"、"创建图表并存档"、"画架构图到 ob"。
release-project
项目版本发布流程指导,帮助用户完成版本规划、Changelog 管理、版本号升级、Git 标签创建和 npm 首次发布准备。Use when: (1) 用户需要发布新版本 (2) 需要创建版本发布流程 (3) 需要管理版本号和 Changelog (4) 需要自动化版本发布 (5) 需要检查 release 分支同步 (6) 首次 npm 发布准备
recognize-codebase-branch-flow
识别并记忆项目 git 分支模型
rebase-commits
将零散的 commits 整合为清晰的逻辑提交,使 Git 历史更易读。 Use when: (1) 用户说 "rebase commits"、"整理提交历史"、"让历史更干净" (2) 用户想将多个相关 commits 合并为逻辑单元 (3) 完成一个功能后需要清理 commit 历史 (4) 提交历史混乱,需要重新组织
read-codebase
阅读棕地项目代码库,智能分析代码结构,递归补充其调用链上所有函数的注释。