scientific-skills/Others/word-read-write/SKILL.md
Create and read Microsoft Word (.docx) documents. Use this skill when you need to generate reports/letters/templates as .docx or extract readable text from existing .docx files.
npx skillsauth add aipoch/medical-research-skills word-read-writeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
.docx files for indexing, review, or conversion to Markdown..docx documents using the docx (docx-js) library..docx content via Pandoc conversion.^9.0.0>= 2.0 (CLI tool for extracting/converting .docx content).docx (Node.js)Install
npm i docx
create-doc.js
const fs = require("fs");
const {
Document,
Packer,
Paragraph,
TextRun,
Table,
TableRow,
TableCell,
ImageRun,
Header,
Footer,
AlignmentType,
BorderStyle,
WidthType,
ShadingType,
PageOrientation,
PageNumber,
PageBreak,
TableOfContents,
HeadingLevel,
LevelFormat,
} = require("docx");
const US_LETTER = { width: 12240, height: 15840 }; // DXA (1440 = 1 inch)
const MARGINS_1IN = { top: 1440, right: 1440, bottom: 1440, left: 1440 };
const CONTENT_WIDTH = US_LETTER.width - MARGINS_1IN.left - MARGINS_1IN.right; // 9360
const border = { style: BorderStyle.SINGLE, size: 1, color: "CCCCCC" };
const borders = { top: border, bottom: border, left: border, right: border };
const doc = new Document({
styles: {
default: {
document: {
run: { font: "Arial", size: 24 }, // 12pt
},
},
paragraphStyles: [
// Use exact IDs to override built-in Word heading styles
{
id: "Heading1",
name: "Heading 1",
basedOn: "Normal",
next: "Normal",
quickFormat: true,
run: { size: 32, bold: true, font: "Arial" },
paragraph: { spacing: { before: 240, after: 240 }, outlineLevel: 0 },
},
{
id: "Heading2",
name: "Heading 2",
basedOn: "Normal",
next: "Normal",
quickFormat: true,
run: { size: 28, bold: true, font: "Arial" },
paragraph: { spacing: { before: 180, after: 180 }, outlineLevel: 1 },
},
],
},
numbering: {
config: [
{
reference: "bullets",
levels: [
{
level: 0,
format: LevelFormat.BULLET,
text: "•",
alignment: AlignmentType.LEFT,
style: { paragraph: { indent: { left: 720, hanging: 360 } } },
},
],
},
{
reference: "numbers",
levels: [
{
level: 0,
format: LevelFormat.DECIMAL,
text: "%1.",
alignment: AlignmentType.LEFT,
style: { paragraph: { indent: { left: 720, hanging: 360 } } },
},
],
},
],
},
sections: [
{
properties: {
page: {
size: {
width: US_LETTER.width,
height: US_LETTER.height,
// For landscape: pass portrait dimensions and set orientation; docx swaps internally.
// orientation: PageOrientation.LANDSCAPE,
},
margin: MARGINS_1IN,
},
},
headers: {
default: new Header({
children: [new Paragraph({ children: [new TextRun("Sample Header")] })],
}),
},
footers: {
default: new Footer({
children: [
new Paragraph({
children: [
new TextRun("Page "),
new TextRun({ children: [PageNumber.CURRENT] }),
],
}),
],
}),
},
children: [
new Paragraph({
heading: HeadingLevel.HEADING_1,
children: [new TextRun("DOCX Creation Example")],
}),
new TableOfContents("Table of Contents", {
hyperlink: true,
headingStyleRange: "1-3",
}),
new Paragraph({
heading: HeadingLevel.HEADING_2,
children: [new TextRun("Lists")],
}),
new Paragraph({
numbering: { reference: "bullets", level: 0 },
children: [new TextRun("Bullet item")],
}),
new Paragraph({
numbering: { reference: "numbers", level: 0 },
children: [new TextRun("Numbered item")],
}),
new Paragraph({
heading: HeadingLevel.HEADING_2,
children: [new TextRun("Table")],
}),
new Table({
width: { size: CONTENT_WIDTH, type: WidthType.DXA },
columnWidths: [CONTENT_WIDTH / 2, CONTENT_WIDTH / 2],
rows: [
new TableRow({
children: [
new TableCell({
borders,
width: { size: CONTENT_WIDTH / 2, type: WidthType.DXA },
shading: { fill: "D5E8F0", type: ShadingType.CLEAR },
margins: { top: 80, bottom: 80, left: 120, right: 120 },
children: [new Paragraph("Left cell")],
}),
new TableCell({
borders,
width: { size: CONTENT_WIDTH / 2, type: WidthType.DXA },
shading: { fill: "FFFFFF", type: ShadingType.CLEAR },
margins: { top: 80, bottom: 80, left: 120, right: 120 },
children: [new Paragraph("Right cell")],
}),
],
}),
],
}),
new Paragraph({
heading: HeadingLevel.HEADING_2,
children: [new TextRun("Image")],
}),
new Paragraph({
children: [
new ImageRun({
type: "png",
data: fs.readFileSync("./image.png"),
transformation: { width: 200, height: 150 },
altText: { title: "Title", description: "Desc", name: "Name" },
}),
],
}),
new Paragraph({ children: [new PageBreak()] }),
new Paragraph({
heading: HeadingLevel.HEADING_2,
children: [new TextRun("New Page Section")],
}),
// Do not use "\n" inside TextRun; create separate Paragraphs instead.
new Paragraph({ children: [new TextRun("This is on a new page.")] }),
],
},
],
});
(async () => {
const buffer = await Packer.toBuffer(doc);
fs.writeFileSync("output.docx", buffer);
console.log("Wrote output.docx");
})();
Run
node create-doc.js
.docx text with Pandocpandoc document.docx -o output.md
.docx is a ZIP archive containing XML parts; libraries generate the required XML and package it.12240 x 15840.12240 - 1440 - 1440 = 9360 DXA.orientation: PageOrientation.LANDSCAPE.HeadingLevel.*."Heading1", "Heading2", etc.outlineLevel (H1 = 0, H2 = 1, ...), otherwise TOC may not pick up headings.\n in runs to simulate line breaks; create separate Paragraph elements.numbering.config with LevelFormat.BULLET / LevelFormat.DECIMAL.reference: same reference continues; different reference restarts.WidthType.DXA (percent widths can break in Google Docs).width and columnWidths; the sum of columnWidths must equal table width.width to match its corresponding column width (required for consistent rendering).margins are internal padding and do not add to width; they reduce usable content area.ShadingType.CLEAR to avoid unexpected black backgrounds.ImageRun requires a valid type (e.g., png, jpg) and altText fields.PageBreak must be inside a Paragraph (or use pageBreakBefore: true).tools
Generates complete conventional oncology bulk-transcriptome biomarker and hub-gene research designs from a user-provided cancer type and study direction. Always use this skill whenever a user wants to design, plan, or build a tumor bioinformatics study centered on differential expression, prognostic filtering or risk modeling, PPI-based hub-gene prioritization, diagnostic/prognostic evaluation, clinical association, immune infiltration context, methylation context, and optional tissue or cell validation. Covers five study patterns (signature-first prognostic workflow, hub-gene-first biomarker workflow, hybrid signature-to-hub workflow, immune-context biomarker workflow, translational validation workflow) and always outputs four workload configs (Lite / Standard / Advanced / Publication+) with recommended primary plan, step-by-step workflow, figure plan, validation strategy, minimal executable version, publication upgrade path...
development
Generates complete conventional non-oncology bioinformatics research designs from a user-provided disease context, process-related gene family or biological theme, and validation direction. Use when a study centers on multi-dataset bulk transcriptome integration, DEG analysis, process-gene intersection, enrichment analysis, GSEA, PPI hub-gene prioritization, TF/miRNA regulatory networks, ROC-based biomarker evaluation, and immune infiltration analysis. Covers five study patterns (process-DEG discovery, enrichment/GSEA interpretation, hub-gene prioritization, regulatory-network and immune interpretation, multi-layer public validation) and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.
tools
Plans confounder control, variable adjustment logic, and bias mitigation strategies at the protocol stage for clinical, epidemiologic, translational, observational, and biomarker studies. Always use this skill when a user needs to identify major confounders, decide which variables should or should not be adjusted for, compare matching/stratification/weighting approaches, anticipate selection or measurement bias, or pressure-test a study design before execution. Focus on bias sensing, causal structure awareness, variable-role classification, and critical design review rather than generic statistical advice.
testing
Generates complete comparative network-toxicology research designs from a user-provided exposure pair, shared toxic phenotype, and validation direction. Use when a study centers on two related exposures under one outcome and needs target collection, shared-vs-specific target decomposition, enrichment, PPI hub prioritization, docking, optional transcriptomic cross-checks, and conservative mechanistic synthesis. Covers five study patterns and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.