为 Claude Code / OpenClaw 添加双向文档转换能力。支持 Word/Excel/PPT/PDF ↔ Markdown,导出精美 Word 文档。
SaferSkills independently audited bruce-doc-converter (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Run the local bdc CLI through a command execution tool. It prints JSON on stdout; progress logs may appear on stderr.
Check installation and updates the first time you convert in a session; later conversions reuse the same entry point without checking again.
bdc --help-json. If the command is missing, look for an existing virtual environment (.venv/bin/bdc, or .venv\Scripts\bdc on Windows) before concluding it is not installed; otherwise install it following Install and update.cli_version and install (source, auto_upgrade, upgrade_command). CLIs before 0.2.2 have no install field; identify the installation as described in the reference.python -m pip index versions bruce-doc-converter (first line). Compare semantic versions, not strings; never downgrade or choose a pre-release.auto_upgrade: true (pipx, uv tool, pip --user): run upgrade_command, re-run bdc --help-json to confirm, and tell the user the old and new versions.venv: this may be a project dependency. Tell the user an update exists and run upgrade_command only after they agree.system or source (a development checkout): tell the user; do not modify it.After an upgrade, the next Markdown to Word conversion may return DEPENDENCY_INSTALL_REQUIRED; run its next_command (bdc setup-node) and retry.
Office/PDF to Markdown
bdc convert "<file>"
bdc convert "<file>" --content preview # large files: return a preview, full text is still written
bdc convert "<file>" --extract-images true # also save embedded images
bdc batch "<directory>"Read markdown_content directly for analysis. Output goes to a Markdown/ directory beside the source unless --output-dir is given.
Markdown to Word
.md file. When writing a new report, save it as UTF-8 Markdown first so the source stays editable.bdc setup-node. Office/PDF conversion does not need Node.js. bdc convert "docs/报告.md" --strictThe file goes to a Word/ directory beside the source unless --output-dir is given. Existing files are never overwritten; a numbered name such as 报告.2.docx is used instead, so read the real path from output_path.
output_path exists and is not empty, then report that exact path. Files live on the machine that ran the command; attach them only when the host provides attachments, and never invent download links.warnings and diagnostics. Each diagnostic has code, severity, message, and a location when known (line for Markdown, page for PDF, sheet/cell for Excel). warning items mean missing or degraded content and fail --strict; info items are advisory.CONTENT_INCOMPLETE, nothing was written. Fix the source at the reported lines and rerun the same strict command. Do not drop --strict for a final deliverable unless the user accepts degraded output, and then say exactly what is missing. If the same failure repeats with nothing new to fix, stop and explain what material or environment is needed.error_code, retryable, next_command and suggestion. See Diagnostics and errors for every code.A strict success only means no content loss was detected. It does not prove the facts are right or the layout was checked; if you did not open or render the document, say that pagination and visual layout are unchecked.
[text](#heading) links jump to the matching heading.$...$, \(...\), $$...$$ and \[...\] become editable Word equations. Custom macros, \label/\ref/\tag, colors and manual spacing are not supported and keep their source with MATH_NOT_CONVERTED. Escape currency as \$ when a line could be read as a formula.[^label] footnotes become Word footnotes; repeated references reuse the first number. Inline ^[...] footnotes stay literal.data: URIs. Remote URLs, absolute paths and file: links are not embedded.--mermaid-scale, default 4). Unsupported syntax keeps the source with a visible notice and MERMAID_NOT_RENDERED.3. is not preserved.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.