export-docx

export-docx is a skill for Claude Code, Codex from Zaoqu-Liu/ScienceClaw. It costs 61 tokens per session (1,424 once invoked), scanned A, original, MIT.

A workflow that converts a ScienceClaw research report and its figures into a formatted Word document. DOCX is the editable document format used by Microsoft Word.

In plain words
What is it for?
Use it to create formatted research reports for collaborators, review, or submission.
Why use it?
It removes the manual work of transferring report sections, figures, methods, and references into a shareable document.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create formatted research reports for collaborators, review, or submission.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zaoqu-liu/scienceclaw/export-docx
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Zaoqu-Liu/ScienceClaw --skill export-docx
Clone the repo
git clone --depth 1 https://github.com/Zaoqu-Liu/ScienceClaw

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for export-docx

README.md
[![agentmods](https://agentmods.dev/badge/skills/zaoqu-liu/scienceclaw/export-docx/github.svg)](https://agentmods.dev/skills/zaoqu-liu/scienceclaw/export-docx)
Your own site
<a href="https://agentmods.dev/skills/zaoqu-liu/scienceclaw/export-docx"><img src="https://agentmods.dev/badge/skills/zaoqu-liu/scienceclaw/export-docx/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for export-docx

Your own site · 80×15
<a href="https://agentmods.dev/skills/zaoqu-liu/scienceclaw/export-docx"><img src="https://agentmods.dev/badge/skills/zaoqu-liu/scienceclaw/export-docx.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,424 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00061 $0.01424
Opus 5 $0.00030 $0.00712
Sonnet 5 $0.00012 $0.00285
Haiku 4.5 $0.00006 $0.00142

Measured 6d ago against content hash af99a63d7d7f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

export-docx scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/export-docx/SKILL.md · 158 lines

How it starts

The opening of the file, as written. The whole thing — 158 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Export to Word (.docx)

Convert a ScienceClaw project's report and figures into a formatted Word document using python-docx.

When to Use

  • User says "/export word", "导出 Word", "转 docx", "生成 Word 报告"
  • User wants to share findings with collaborators who use Word
  • User needs a formatted document for submission or review

Workflow

  1. Identify the project directory from ACTIVE_PROJECT.md or the most recent project
  2. Read the main report from reports/ directory (markdown)
  3. Collect figures from figures/ directory
  4. Read METHODS.md if present
  5. Generate .docx using python-docx with proper formatting
  6. Save to reports/<project_name>_report.docx

Code Template

pip install -q python-docx Pillow 2>/dev/null && python3 << 'DOCXEOF'
import os, re, glob
from docx import Document
from docx.shared import Inches, Pt, Cm, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.enum.style import WD_STYLE_TYPE

PROJECT_DIR = os.path.expanduser("PROJECT_DIR_PLACEHOLDER")
REPORT_FILE = "REPORT_FILE_PLACEHOLDER"
OUTPUT_FILE = os.path.join(PROJECT_DIR, "reports", "OUTPUT_NAME_PLACEHOLDER.docx")

doc = Document()

# --- Page setup ---
section = doc.sections[0]
section.top_margin = Cm(2.54)
section.bottom_margin = Cm(2.54)
section.left_margin = Cm(3.18)
section.right_margin = Cm(3.18)

# --- Styles ---
style = doc.styles['Normal']
font = style.font
font.name = 'Times New Roman'
font.size = Pt(11)
font.color.rgb = RGBColor(0x33, 0x33, 0x33)
style.paragraph_format.line_spacing = 1.5
style.paragraph_format.space_after = Pt(6)

for level in range(1, 4):
    hs = doc.styles[f'Heading {level}']
    hs.font.name = 'Arial'
    hs.font.color.rgb = RGBColor(0x3C, 0x54, 0x88)
    hs.font.size = Pt(16 - level * 2)
    hs.font.bold = True

# --- Read report markdown ---
report_path = os.path.join(PROJECT_DIR, "reports", REPORT_FILE)
with open(report_path, 'r', encoding='utf-8') as f:
    lines = f.readlines()

fig_dir = os.path.join(PROJECT_DIR, "figures")

# --- Parse and convert ---
for line in lines:
    line = line.rstrip('\n')

    # Headings
    if line.startswith('### '):
        doc.add_heading(line[4:], level=3)
    elif line.startswith('## '):
        doc.add_heading(line[3:], level=2)
    elif line.startswith('# '):
        doc.add_heading(line[2:], level=1)
    # Figure references
    elif '![' in line:
        m = re.search(r'!\[.*?\]\((.*?)\)', line)
        if m:
            img_path = m.group(1)
            if not os.path.isabs(img_path):
                img_path = os.path.join(PROJECT_DIR, img_path)
            if os.path.exists(img_path):
                doc.add_picture(img_path, width=Inches(5.5))
                last_p = doc.paragraphs[-1]
                last_p.alignment = WD_ALIGN_PARAGRAPH.CENTER
    # Table rows (simple pipe tables)
    elif line.startswith('|') and '---' not in line:
        cells = [c.strip() for c in line.split('|')[1:-1]]
        if cells:
            # Check if this is first row of a table
            if not hasattr(doc, '_current_table') or doc._current_table is None:
                doc._current_table = doc.add_table(rows=0, cols=len(cells))
                doc._current_table.style = 'Table Grid'
            row = doc._current_table.add_row()
            for i, cell_text in enumerate(cells):
                if i < len(row.cells):
                    row.cells[i].text = cell_text
    elif line.startswith('|') and '---' in line:
        pass  # skip separator rows
    else:
        # End current table if any
        if hasattr(doc, '_current_table'):
            doc._current_table = None
        # Regular paragraph
        if line.strip():
            p = doc.add_paragraph()
            parts = re.split(r'(\*\*.*?\*\*)', line)
            for part in parts:
                if part.startswith('**') and part.endswith('**'):
                    run = p.add_run(part[2:-2])
                    run.bold = True
                else:
                    p.add_run(part)

# --- Embed remaining figures at the end ---
if os.path.isdir(fig_dir):
    pngs = sorted(glob.glob(os.path.join(fig_dir, '*.png')))
    if pngs:
        doc.add_heading('Figures', level=1)
        for png in pngs:
            fname = os.path.basename(png)
            doc.add_heading(fname.replace('.png', '').replace('_', ' ').title(), level=3)
            doc.add_picture(png, width=Inches(5.5))
            last_p = doc.paragraphs[-1]
            last_p.alignment = WD_ALIGN_PARAGRAPH.CENTER
            doc.add_paragraph('')

# --- Append METHODS if present ---
methods_path = os.path.join(PROJECT_DIR, "METHODS.md")
if os.path.exists(methods_path):
    doc.add_page_break()
    doc.add_heading('Methods', level=1)
    with open(methods_path, 'r', encoding='utf-8') as f:
        for line in f:
            line = line.strip()
            if line and not line.startswith('#'):
                doc.add_paragraph(line)

os.makedirs(os.path.dirname(OUTPUT_FILE), exist_ok=True)
doc.save(OUTPUT_FILE)
print(f"Saved: {OUTPUT_FILE}")
DOCXEOF

Read the full file on GitHub · 158 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 158 lines · 61 tokens per session scan A af99a63d7d7f

Subscribe to this mod's changes

export-docx is a skill published in the GitHub repository Zaoqu-Liu/ScienceClaw (60 stars, last pushed 5mo ago), licensed MIT. It adds 61 tokens to every session and 1,424 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

clinical-case-report

Structured medical case presentation for clinical rounds, conferences, and documentation. Generates SOAP-format or narrative case reports with physiologically accurate vitals, labs, and evidence-based plans. Use when the brief mentions "case report", "case presentation", "SOAP note", "clinical case", "ward rounds"…

nexu-io/open-design · 73 tokens

instrument-data-to-allotrope

Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full…

anthropics/knowledge-work-plugins · 123 tokens

pydicom

Use pydicom to read, inspect, write, transform, and safely preflight local DICOM datasets and pixel data. Applies to DICOM metadata, transfer syntaxes, compression plugins, frames, private elements, JSON, and bounded de-identification review.

K-Dense-AI/scientific-agent-skills · 56 tokens

nature-experiment-log

A workflow for turning experiment notes, images, audio, or text into structured Markdown laboratory logs with YAML metadata. It can also organize raw attachments and optionally connect the logs to Feishu or Obsidian.

Yuan1z0825/nature-skills · 45 tokens

nature-paper2ppt

A workflow for turning a scientific paper, preprint, PDF, article, figure legends, or reading notes into a complete Chinese PowerPoint presentation. It is designed for journal clubs, group meetings, thesis seminars, conferences, defences, and paper-sharing talks.

Yuan1z0825/nature-skills · 177 tokens

parsing-ccda-documents

Parses C-CDA / CCD XML clinical documents to extract human-readable section narrative plus coded entries, keyed by section LOINC codes and templateIds. Use before OpenMed processing when ingesting C-CDA R2.1 documents (CCD, Discharge Summary, H&P, Consultation Note) exported from an EHR and you need the narrative…

maziyarpanahi/openmed · 152 tokens