Agent Skillsnodetool-ai/nodetool › sandbox-mammoth

sandbox-mammoth

GitHub

提供在沙箱环境中读取Word文档的功能,支持将.docx转换为纯文本或HTML。适用于需要解析文档内容而非渲染的场景,限制单文件10MB且仅支持读取操作。

packages/sandbox-packs/sandbox-mammoth/SKILL.md nodetool-ai/nodetool

Trigger Scenarios

需要将Word文档内容提取为纯文本 需要将Word文档转换为HTML格式

Install

npx skills add nodetool-ai/nodetool --skill sandbox-mammoth -g -y
More Options

Non-standard path

npx skills add https://github.com/nodetool-ai/nodetool/tree/main/packages/sandbox-packs/sandbox-mammoth -g -y

Use without installing

npx skills use nodetool-ai/nodetool@sandbox-mammoth

指定 Agent (Claude Code)

npx skills add nodetool-ai/nodetool --skill sandbox-mammoth -a claude-code -g -y

安装 repo 全部 skill

npx skills add nodetool-ai/nodetool --all -g -y

预览 repo 内 skill

npx skills add nodetool-ai/nodetool --list

SKILL.md

Frontmatter
{
    "name": "sandbox-mammoth",
    "description": "Read a Word document as text or HTML in a Code node or CodeAct action, with mammoth running on the host"
}

Word documents in the sandbox (reading)

Specifier: @nodetool-ai/sandbox-mammoth. Import it at the top of the body.

mammoth reads a .docx buffer through Node's own zip/XML stack; it will never be a guest module. This pack is a host module: the import resolves to a generated facade over NodeTool's own implementation.

extractRawText — docx bytes to plain text

import { extractRawText } from "@nodetool-ai/sandbox-mammoth";

const bytes = await workspace.readBytes("report.docx");
const text = await extractRawText(bytes);

Formatting is discarded — this is the fast path when you only need the words.

convertToHtml — docx bytes to HTML

import { convertToHtml } from "@nodetool-ai/sandbox-mammoth";

const html = await convertToHtml(bytes);

Headings, lists, tables, bold/italic runs, and embedded images (as base64 data URIs) survive the conversion. Track changes, headers/footers, footnotes, and exact visual layout do not — mammoth targets semantic HTML, not a pixel-exact render.

Get the bytes from workspace.readBytes, or from a fetched body with await response.bytes().

Gotchas

  • Both exports are async.
  • 10 MB per document. Larger input is refused by name.
  • Reading only. To build a .docx, use @nodetool-ai/sandbox-docx instead.

Version History

  • a6a7e57 Current 2026-08-20 09:52

Same Skill Collection

.claude/skills/ask-matt/SKILL.md
.claude/skills/ast-grep-outline/SKILL.md
.claude/skills/ast-grep/SKILL.md
.claude/skills/codebase-design/SKILL.md
.claude/skills/companion-clis/SKILL.md
.claude/skills/diagnosing-bugs/SKILL.md
.claude/skills/domain-modeling/SKILL.md
.claude/skills/flash/SKILL.md
.claude/skills/implement/SKILL.md
.claude/skills/improve-codebase-architecture/SKILL.md
.claude/skills/nodetool-api-reference/SKILL.md
.claude/skills/nodetool-browser-agent/SKILL.md
.claude/skills/nodetool-chat-cli/SKILL.md
.claude/skills/nodetool-custom-node-developer/SKILL.md
.claude/skills/nodetool-deployment/SKILL.md
.claude/skills/nodetool-model-provider-config/SKILL.md
.claude/skills/nodetool-rag-indexing/SKILL.md
.claude/skills/nodetool-troubleshooter/SKILL.md
.claude/skills/nodetool-workflow-builder/SKILL.md
.claude/skills/prototype/SKILL.md
.claude/skills/research/SKILL.md
.claude/skills/resolving-merge-conflicts/SKILL.md
.claude/skills/setup-matt-pocock-skills/SKILL.md
.claude/skills/tdd/SKILL.md
.claude/skills/to-spec/SKILL.md
.claude/skills/to-tickets/SKILL.md
.claude/skills/triage/SKILL.md
.claude/skills/wayfinder/SKILL.md
.claude/skills/wizard/SKILL.md
.claude/skills/yts806379-everything-claude-code-e2e-testing/SKILL.md
packages/sandbox-packs/sandbox-aws/SKILL.md
packages/sandbox-packs/sandbox-chrono/SKILL.md
packages/sandbox-packs/sandbox-color/SKILL.md
packages/sandbox-packs/sandbox-csv/SKILL.md
packages/sandbox-packs/sandbox-dates/SKILL.md
packages/sandbox-packs/sandbox-decimal/SKILL.md
packages/sandbox-packs/sandbox-diff/SKILL.md
packages/sandbox-packs/sandbox-docx/SKILL.md
packages/sandbox-packs/sandbox-dsl/SKILL.md
packages/sandbox-packs/sandbox-epub/SKILL.md
packages/sandbox-packs/sandbox-exif/SKILL.md
packages/sandbox-packs/sandbox-expr/SKILL.md
packages/sandbox-packs/sandbox-fabric/SKILL.md
packages/sandbox-packs/sandbox-flow/SKILL.md
packages/sandbox-packs/sandbox-gif/SKILL.md
packages/sandbox-packs/sandbox-html/SKILL.md
packages/sandbox-packs/sandbox-ics/SKILL.md
packages/sandbox-packs/sandbox-jmespath/SKILL.md
packages/sandbox-packs/sandbox-markdown/SKILL.md

Metadata

Files
0
Version
a6a7e57
Hash
e41c37cb
Indexed
2026-08-20 09:52

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 09:52
浙ICP备14020137号-1 $방문자$