Skip to content
Back to skills

Sandbox Mammoth

ASecurity

Read a Word document as text or HTML in a Code node or CodeAct action, with mammoth running on the host

  • 552 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 1, 2026
ai-agentsgonode

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 1, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Sandbox Mammoth?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Sandbox Mammoth
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nodetool-ai-sandbox-mammoth/badge)](https://www.skillsdirectory.com/skills/nodetool-ai-sandbox-mammoth)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

```js
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

```js
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.

Files in this skill

  • SKILL.md1.4 KB
  • package.json868 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.