← 返回
未分类 Key 中文

Fword Skill

AI-powered bidirectional Word ↔ LaTeX converter. Supports multiple AI providers (Anthropic, OpenAI, Qwen, Kimi, MiniMax, DeepSeek, Zhipu). Converts Word to c...
AI-powered bidirectional Word ↔ LaTeX converter. Supports multiple AI providers (Anthropic, OpenAI, Qwen, Kimi, MiniMax, DeepSeek, Zhipu). Converts Word to c...
jinzhengxu
未分类 clawhub v1.1.0 1 版本 99656.4 Key: 需要
★ 0
Stars
📥 290
下载
💾 0
安装
1
版本
#latest

概述

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

ProviderEnv VariableDefault ModelFlag
--------------------------------------------
Anthropic (Claude)ANTHROPIC_API_KEYclaude-sonnet-4-20250514-p anthropic
OpenAIOPENAI_API_KEYgpt-4o-p openai
Qwen (Alibaba)DASHSCOPE_API_KEYqwen-plus-p qwen
Kimi (Moonshot)MOONSHOT_API_KEYmoonshot-v1-8k-p kimi
MiniMaxMINIMAX_API_KEYMiniMax-Text-01-p minimax
DeepSeekDEEPSEEK_API_KEYdeepseek-chat-p deepseek
Zhipu (GLM)ZHIPU_API_KEYglm-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

  1. Run convert.py on the .docx file — this creates a .fword/ workspace and outputs .tex
  2. The .fword/ workspace stores the original document as a style reference
  3. Edit the LaTeX as needed
  4. Run back.py to 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:

  1. Convert: convert.py document.docx → produces document.tex
  2. Read the .tex file and make the requested edits directly in LaTeX
  3. Convert back: back.py document.tex → produces document.docx with original styles

Quick reference

User wants...Action
------
Convert Word to LaTeXconvert.py input.docx
Convert with Qwenconvert.py input.docx -p qwen
Convert with DeepSeekconvert.py input.docx -p deepseek
Convert without AIconvert.py input.docx --raw
Convert LaTeX to Wordback.py input.tex
Edit Word doc with AIconvert → edit .tex → back

Important Notes

  • Always use absolute paths for input/output files
  • Always cd {SKILL_DIR}/scripts before 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 --raw flag for Pandoc-only conversion
  • The .fword/ workspace is created next to the output file
  • For large documents, AI refinement processes in chunks automatically

版本历史

共 1 个版本

  • v1.1.0 当前
    2026-05-07 13:28 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,226 📥 267,784
ai-agent

self-improving agent

pskoett
捕获经验教训、错误及修正内容,以实现持续改进。适用于以下场景:(1)命令或操作意外失败;(2)用户纠正Claude(如“不,那不对……”“实际上……”);(3)用户请求的功能不存在;(4)外部API或工具出现故障;(5)Claude发现自身
★ 4,081 📥 809,797
ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,378 📥 320,391