{"skill":{"slug":"bruce-doc-converter","displayName":"bruce-doc-converter-skill","summary":"双向文档转换工具，将 Word (.docx)、Excel (.xlsx)、PowerPoint (.pptx) 和 PDF (.pdf) 转换为 AI 友好的 Markdown，或将 Markdown (.md) 转换为 Word (.docx)。当用户请求文档转换、导出、读取、分析 Office/PDF/Ma...","description":"---\nname: bruce-doc-converter\ndescription: 双向文档转换工具，将 Word (.docx)、Excel (.xlsx)、PowerPoint (.pptx) 和 PDF (.pdf) 转换为 AI 友好的 Markdown，或将 Markdown (.md) 转换为 Word (.docx)。当用户请求文档转换、导出、读取、分析 Office/PDF/Markdown 文件，或上传这些格式并询问内容时使用。\n---\n# Bruce Doc Converter\n\nAgent-facing document converter CLI.\n\n## When to use\n\nUse this skill when the user asks to:\n\n- Convert `.docx`, `.xlsx`, `.pptx`, `.pdf`, or `.md` files.\n- Read, summarize, inspect, or analyze Office/PDF documents.\n- Export Markdown as Word.\n- Process uploaded document files whose content the agent cannot directly read.\n\n## Installation\n\nFirst, check if `bdc` is already available:\n\n```bash\ncommand -v bdc        # macOS / Linux\nwhere bdc             # Windows\n```\n\nIf not installed, try the following in order — stop at the first that succeeds:\n\n```bash\n# 1. pipx (preferred — isolated, bdc lands in PATH)\npipx install bruce-doc-converter\n\n# 2. uv (if available — fast, isolated, bdc lands in PATH)\nuv tool install bruce-doc-converter\n\n# 3. pip --user (most universally available, bdc lands in PATH)\npip install --user bruce-doc-converter   # or: python3 -m pip install --user bruce-doc-converter\n\n# 4. venv fallback (works everywhere, but bdc will NOT be in PATH)\npython3 -m venv .venv\n.venv/bin/pip install bruce-doc-converter\n# Windows: .venv\\Scripts\\pip install bruce-doc-converter\n```\n\n> **venv note:** If you used the venv fallback, replace every `bdc` command below with `.venv/bin/bdc` (macOS/Linux) or `.venv\\Scripts\\bdc` (Windows).\n\n> **Windows note:** Use `python` instead of `python3` if the former is not recognized.\n\n## Command\n\nRun:\n\n```bash\nbdc convert \"<file>\"\n```\n\nFor batch conversion:\n\n```bash\nbdc batch \"<directory>\"\n```\n\nFor Markdown to Word, initialize the Node.js dependencies explicitly before first use:\n\n```bash\nbdc setup-node\n```\n\nThe CLI prints JSON to stdout by default. Progress logs may appear on stderr.\n\n## Output handling\n\nParse stdout as JSON.\n\nOn success:\n\n- `success` is `true`.\n- `output_path` points to the generated file.\n- Office/PDF inputs include `markdown_content` for direct analysis.\n- `.md` inputs produce a `.docx` file and may omit `markdown_content`.\n\nOn failure:\n\n- `success` is `false`.\n- Use `error_code`, `retryable`, optional `next_command`, `error`, and optional `suggestion` to decide the next step.\n- Do not pre-check Python dependencies. Run the command first and react to JSON failure.\n- If Markdown to Word returns `DEPENDENCY_INSTALL_REQUIRED`, run `next_command` when present, otherwise run `bdc setup-node`, then retry.\n- `bdc setup-node` is idempotent and may return `already_installed: true` with `install_action: \"skipped\"`.\n\n## Troubleshooting installation\n\n| Error | Cause | Fix |\n| --- | --- | --- |\n| `SOCKS support` / proxy connection error | `all_proxy` or `http_proxy` env vars set | Run `unset all_proxy http_proxy https_proxy` (macOS/Linux) or `set all_proxy=` (Windows CMD), then retry |\n| `command not found: pipx` | pipx not installed | Try `uv tool install` or `pip install --user` instead |\n| `externally-managed-environment` | Python 3.11+ system Python forbids global pip | Use `pipx`, `uv tool install`, or the venv fallback |\n| Permission denied | No write access to install location | Add `--user` flag, or use venv fallback |\n| `bdc: command not found` after venv install | venv bin not in PATH | Use full path: `.venv/bin/bdc` (macOS/Linux) or `.venv\\Scripts\\bdc` (Windows) |\n\n## Supported formats\n\n| Input | Output |\n| --- | --- |\n| `.docx` | Markdown |\n| `.xlsx` | Markdown |\n| `.pptx` | Markdown |\n| `.pdf` | Markdown |\n| `.md` | Word `.docx` |\n","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":346,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1778151879474,"updatedAt":1778492872010},"latestVersion":{"version":"1.0.0","createdAt":1778151879474,"changelog":"- Initial release of bruce-doc-converter.\n- Converts Word (.docx), Excel (.xlsx), PowerPoint (.pptx), and PDF (.pdf) files to AI-friendly Markdown.\n- Converts Markdown (.md) to Word (.docx).\n- Supports batch processing and direct analysis of Office/PDF document content.\n- Includes installation, usage, output handling, and troubleshooting instructions.","license":"MIT-0"},"metadata":null,"owner":{"handle":"bruc3van","userId":"s17an43c301m4vkr29gvy4mhg983hqms","displayName":"Bruce Van","image":"https://avatars.githubusercontent.com/u/10140863?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1780090757880}}