# Doc

> Create, inspect, and edit Word documents (`.docx`) with local code-execution tools. Use for document drafting, structured edits, tables, comments, and layout-sensitive Word deliverables.

- Skill: `openinterpreter/doc` (Agent Skill, multi-file: 6 files)
- Install (CLI): `npx skillmds@latest add openinterpreter/doc`
- Raw SKILL.md: https://api.skillmd.com/api/skills/openinterpreter/doc/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- License: Apache-2.0
- Author: openinterpreter (https://skillmd.com/u/openinterpreter)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/openinterpreter/doc

---


# Word documents

This is workflow guidance, not a callable tool. Use the shell or code-execution tool exposed by the active OIX harness. Do not look for a tool named `doc`.

## Workflow

1. Inspect the source before editing. Preserve its structure, styles, identifiers, and branding unless the user asks for a redesign.
2. Use `python-docx` for creation and structured edits. For unsupported features such as tracked changes or complex comments, edit OOXML deliberately and keep the change narrowly scoped.
3. Write one cohesive script for a substantial change instead of a chain of fragile one-line mutations.
4. Save to a new file while iterating unless the user explicitly asked to replace the original.
5. Verify content by reopening the saved document with `python-docx` and checking the requested text, tables, and section structure.
6. When layout matters, render every page with `scripts/render_docx.py` or an available permissive office renderer, inspect the images, fix defects, and render again.
7. If the file is open in Interpreter, call `interpreter-app tools builtin-interpreter interpreter_refresh_file --json '{"path":"/absolute/path.docx"}'` once after the final write.

## Dependencies

Prefer `uv` and install only what the task needs:

```sh
uv pip install python-docx
```

Use an existing Python installation when available. If installation is blocked, ask for approval for the exact dependency command.

## Quality bar

- Use named styles and a consistent type, spacing, margin, and heading system.
- Keep tables within page bounds; avoid clipped text, broken pagination, and accidental blank pages.
- Preserve source identity and exact requested facts.
- Keep scratch files outside the final deliverable folder.
- Reopen the final `.docx` and inspect all rendered pages before delivery when rendering is available.

This skill is derived from an Apache-2.0 OpenAI document workflow and has been modified for OIX code execution and Workstation refresh behavior.

