Fword Skill
/install fword-skill
Fword — Word ↔ LaTeX Converter
You are an AI assistant equipped with the Fword skill for bidirectional Word ↔ LaTeX conversion.
When to Activate
Activate this skill when the user:
- Wants to convert a
.docx/ Word file to LaTeX - Wants to convert a
.tex/ LaTeX file back to Word - Asks you to edit a Word document (convert to LaTeX first, edit, convert back)
- Mentions "fword" by name
Setup
Before first use, ensure dependencies are installed:
bash {SKILL_DIR}/scripts/setup.sh
Check if setup is needed by testing: python3 -c "import pypandoc, anthropic, openai, docx". If this fails, run setup.
Supported AI Providers
| Provider | Env Variable | Default Model | Flag |
|---|---|---|---|
| Anthropic (Claude) | ANTHROPIC_API_KEY |
claude-sonnet-4-20250514 |
-p anthropic |
| OpenAI | OPENAI_API_KEY |
gpt-4o |
-p openai |
| Qwen (Alibaba) | DASHSCOPE_API_KEY |
qwen-plus |
-p qwen |
| Kimi (Moonshot) | MOONSHOT_API_KEY |
moonshot-v1-8k |
-p kimi |
| MiniMax | MINIMAX_API_KEY |
MiniMax-Text-01 |
-p minimax |
| DeepSeek | DEEPSEEK_API_KEY |
deepseek-chat |
-p deepseek |
| Zhipu (GLM) | ZHIPU_API_KEY |
glm-4-plus |
-p zhipu |
Any OpenAI-compatible API can also be used via --base-url.
Commands
Word → LaTeX
cd {SKILL_DIR}/scripts && python3 convert.py /absolute/path/to/document.docx /absolute/path/to/output.tex
Options:
-p, --provider PROVIDER— AI provider (default: anthropic)--model MODEL— AI model (default: provider's default)--api-key KEY— API key (or set provider's env var)--base-url URL— Custom API base URL--raw— Pandoc-only conversion, no AI refinement (no API key needed)--keep-intermediate— Save Pandoc's raw output as.raw.tex
Examples:
# Default (Anthropic Claude)
cd {SKILL_DIR}/scripts && python3 convert.py /path/to/doc.docx
# Use Qwen
cd {SKILL_DIR}/scripts && python3 convert.py /path/to/doc.docx -p qwen
# Use DeepSeek with specific model
cd {SKILL_DIR}/scripts && python3 convert.py /path/to/doc.docx -p deepseek --model deepseek-chat
# Pandoc only (no AI)
cd {SKILL_DIR}/scripts && python3 convert.py /path/to/doc.docx --raw
LaTeX → Word
cd {SKILL_DIR}/scripts && python3 back.py /absolute/path/to/document.tex /absolute/path/to/output.docx
Options:
--reference-doc PATH— Use a specific Word template for styles (overrides workspace)
Workflow
Standard conversion
- Run
convert.pyon the.docxfile — this creates a.fword/workspace and outputs.tex - The
.fword/workspace stores the original document as a style reference - Edit the LaTeX as needed
- Run
back.pyto convert back — it automatically finds the workspace and recovers styles
AI-assisted editing workflow
When the user wants to edit a Word document with AI help:
- Convert:
convert.py document.docx→ producesdocument.tex - Read the
.texfile and make the requested edits directly in LaTeX - Convert back:
back.py document.tex→ producesdocument.docxwith original styles
Quick reference
| User wants... | Action |
|---|---|
| Convert Word to LaTeX | convert.py input.docx |
| Convert with Qwen | convert.py input.docx -p qwen |
| Convert with DeepSeek | convert.py input.docx -p deepseek |
| Convert without AI | convert.py input.docx --raw |
| Convert LaTeX to Word | back.py input.tex |
| Edit Word doc with AI | convert → edit .tex → back |
Important Notes
- Always use absolute paths for input/output files
- Always
cd {SKILL_DIR}/scriptsbefore running scripts (they import each other) - Set the appropriate environment variable for your chosen provider's API key
- If no API key is available, use
--rawflag for Pandoc-only conversion - The
.fword/workspace is created next to the output file - For large documents, AI refinement processes in chunks automatically
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install fword-skill - 安装完成后,直接呼叫该 Skill 的名称或使用
/fword-skill触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Fword Skill 是什么?
AI-powered bidirectional Word ↔ LaTeX converter. Supports multiple AI providers (Anthropic, OpenAI, Qwen, Kimi, MiniMax, DeepSeek, Zhipu). Converts Word to c... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 100 次。
如何安装 Fword Skill?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install fword-skill」即可一键安装,无需额外配置。
Fword Skill 是免费的吗?
是的,Fword Skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Fword Skill 支持哪些平台?
Fword Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Fword Skill?
由 Zhengxu (Joshua) Jin(@jinzhengxu)开发并维护,当前版本 v1.1.0。