Bruce Doc Converter logo

Bruce Doc Converter

Community
bruc3van
bruce-doc-converter

双向文档转换工具,将 Word (.docx)、Excel (.xlsx)、PowerPoint (.pptx) 和 PDF (.pdf) 转换为 AI 友好的 Markdown,或将 Markdown (.md) 转换为 Word (.docx)(支持 Mermaid 图表自动渲染为 PNG)。当用户请求文档转换、导出、读取、分析 Office/PDF/Markdown 文件,或上传这些格式并询问内容时使用。

Overview

Publisherbruc3van
Repositoryagent-skills-guard
Skill namebruce-doc-converter
Stars
391
Forks
35
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by bruc3van on GitHub. Read the source before you install it.

Installation

Install the Bruce Doc Converter AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/bruc3van/agent-skills-guard/tree/main/test/test-skills/positive-real/agents-doc-converter
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/bruc3van/agent-skills-guard.git /tmp/agent-skills-guard
mkdir -p .claude/skills
cp -r /tmp/agent-skills-guard/test/test-skills/positive-real/agents-doc-converter .claude/skills/bruce-doc-converter
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Bruce Doc Converter in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Bruce Doc Converter on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Bruce Doc Converter is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Bruce Doc Converter

Agent-facing document converter CLI..

When to use

Use this skill when the user asks to:

  • Convert .docx, .xlsx, .pptx, .pdf, or .md files.
  • Read, summarize, inspect, or analyze Office/PDF documents.
  • Export Markdown as Word.
  • Process uploaded document files whose content the agent cannot directly read.

Setup and version check

Run this first — it checks installation status and current version in one step:

bash
bdc --help-json
  • Command not found → not installed. Install using one of the methods below, then re-run.
  • Returns JSON with cli_version → installed. Compare against the latest on PyPI:
    bash
    pip index versions bruce-doc-converter 2>/dev/null | head -1
    If the versions differ, upgrade (see Upgrade section), then re-run bdc setup-node if Markdown to Word was previously set up.

Install (if not already installed)

Try the following in order — stop at the first that succeeds:

bash
# 1. pipx (preferred — isolated, bdc lands in PATH)
pipx install bruce-doc-converter

# 2. uv (if available — fast, isolated, bdc lands in PATH)
uv tool install bruce-doc-converter

# 3. pip --user (most universally available, bdc lands in PATH)
pip3 install --user bruce-doc-converter  # macOS/Linux
pip install --user bruce-doc-converter   # Windows
# or universally: python3 -m pip install --user bruce-doc-converter (use `python` on Windows)

# 4. venv fallback (works everywhere, but bdc will NOT be in PATH)
python3 -m venv .venv
.venv/bin/pip install bruce-doc-converter
# Windows: .venv\Scripts\pip install bruce-doc-converter

venv note: If you used the venv fallback, replace every bdc command below with .venv/bin/bdc (macOS/Linux) or .venv\Scripts\bdc (Windows).

Windows note: Use python instead of python3 if the former is not recognized.

Command

Run:

bash
bdc convert "<file>"

For Markdown files with Mermaid diagrams, PNG rendering defaults to scale 4. Increase or decrease it when needed:

bash
bdc convert "<file.md>" --mermaid-scale 5

For batch conversion:

bash
bdc batch "<directory>"
bdc batch "<directory>" --mermaid-scale 5

For Markdown to Word, initialize the Node.js dependencies explicitly before first use:

bash
bdc setup-node

If the Markdown contains Mermaid diagrams (```mermaid blocks), they will be automatically rendered as PNG images embedded in the Word document. The CLI automatically detects and uses the user's local Chrome / Edge / Chromium during conversion, launching it headlessly with a temporary browser profile, so do not install a bundled browser unless local browser detection fails.

If no local browser is available, explicitly install Puppeteer's dedicated browser:

bash
bdc setup-node --install-browser

If your environment specifically requires npm lifecycle scripts, run:

bash
bdc setup-node --allow-scripts --install-browser

Linux note: Mermaid rendering is disabled by default on Linux sandboxed environments. Set BRUCE_DOC_CONVERTER_ALLOW_CHROMIUM_NO_SANDBOX=1 if your environment requires it and you understand the risk.

The CLI prints JSON to stdout by default. Progress logs may appear on stderr.

Output handling

Parse stdout as JSON.

On success:

  • success is true.
  • output_path points to the generated file.
  • Office/PDF inputs include markdown_content for direct analysis.
  • .md inputs produce a .docx file and may omit markdown_content.

On failure:

  • success is false.
  • Use error_code, retryable, optional next_command, error, and optional suggestion to decide the next step.
  • Do not pre-check Python dependencies. Run the command first and react to JSON failure.
  • If Markdown to Word returns DEPENDENCY_INSTALL_REQUIRED, run next_command when present, otherwise run bdc setup-node, then retry.
  • bdc setup-node is idempotent and may return already_installed: true with install_action: "skipped".

Upgrade

To upgrade to the latest version, use the same tool you used to install:

bash
pipx upgrade bruce-doc-converter          # if installed via pipx
uv tool upgrade bruce-doc-converter       # if installed via uv
pip install --user --upgrade bruce-doc-converter   # if installed via pip --user
.venv/bin/pip install --upgrade bruce-doc-converter  # if installed in a venv (macOS/Linux)
.venv\Scripts\pip install --upgrade bruce-doc-converter  # venv on Windows

After upgrading, re-run bdc setup-node if you use Markdown to Word conversion, as Node.js dependencies may also have been updated.

Troubleshooting installation

ErrorCauseFix
SOCKS support / proxy connection errorall_proxy or http_proxy env vars setRun unset all_proxy http_proxy https_proxy (macOS/Linux) or set all_proxy= (Windows CMD), then retry
command not found: pipxpipx not installedTry uv tool install or pip install --user instead
externally-managed-environmentPython 3.11+ system Python forbids global pipUse pipx, uv tool install, or the venv fallback
Permission deniedNo write access to install locationAdd --user flag, or use venv fallback
bdc: command not found after venv installvenv bin not in PATHUse full path:.venv/bin/bdc (macOS/Linux) or .venv\Scripts\bdc (Windows)

Supported formats

InputOutput
.docxMarkdown
.xlsxMarkdown
.pptxMarkdown
.pdfMarkdown
.mdWord .docx

Frequently asked questions

What does the Bruce Doc Converter AI skill do?

双向文档转换工具,将 Word (.docx)、Excel (.xlsx)、PowerPoint (.pptx) 和 PDF (.pdf) 转换为 AI 友好的 Markdown,或将 Markdown (.md) 转换为 Word (.docx)(支持 Mermaid 图表自动渲染为 PNG)。当用户请求文档转换、导出、读取、分析 Office/PDF/Markdown 文件,或上传这些格式并询问内容时使用。

Why use Bruce Doc Converter on TypingMind?

Because you install it once and use it with any model. Bruce Doc Converter is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Bruce Doc Converter in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/bruc3van/agent-skills-guard/tree/main/test/test-skills/positive-real/agents-doc-converter. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Bruce Doc Converter?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Bruce Doc Converter?

As many as you like. As long as a model supports skills, you can use Bruce Doc Converter with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Bruce Doc Converter AI skill free?

Yes. It is published on GitHub by bruc3van under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇