xiaohongshu
xiaohongshu
executive-summary-formatter
Transform poorly formatted executive summaries into professionally formatted documents matching a specific brand template. Use when the user provides an executive summary (text, markdown, docx, or PDF) and wants it reformatted with precise brand styling including Work Sans fonts, branded color sc...
Full skill instructions
Transform any executive summary content into a professionally formatted .docx document matching the brand template exactly.
/mnt/user-data/outputs/| Element | Color Code | Usage |
|---|---|---|
| Section Headers | #DA291C (red) | Major section titles |
| Table Header BG | #032340 (navy) | Table header row background |
| Table Header Text | #FFFFFF (white) | Text in table headers |
| Body Text | #000000 (black) | Normal paragraph text |
| Subtitle/Caption | #808080 (gray) | Subtitle, secondary info |
| Table Borders (Data) | #CCCCCC (light gray) | Data row borders |
| Table Borders (Header) | #AAAAAA (medium gray) | Header row borders |
| Alternating Row BG | #F2F2F2 (very light gray) | Every other data row |
| Highlight Cell BG | #FFE3E3 (light pink) | Special emphasis cells |
| Hyperlink | #0563C1 (blue) | Links |
| Element | Size | Weight | Additional |
|---|---|---|---|
| Document Title | 48 (24pt) | Light | Work Sans Light, centered, NOT bold |
| Subtitle | 22 (11pt) | Regular | Italic, gray #808080, centered |
| Section Header (Large) | 48 (24pt) | Regular | Red #DA291C, NOT bold |
| Section Header (Small) | 28 (14pt) | Regular | Red #DA291C, NOT bold |
| Body Text | 22 (11pt) | Regular | Work Sans (inherited from defaults) |
| Table Header | 18 (9pt) | Bold | White on navy #032340 |
| Table Data | 18 (9pt) | Regular | Work Sans |
| Table Data (Small) | 16 (8pt) | Regular | Used in compact tables |
| Bullet Items | 22 (11pt) | Regular | Work Sans |
| Element | Before | After |
|---|---|---|
| Document Title | 0 | 120 |
| Subtitle | 0 | 400 |
| Section Header (large) | 360 | 160 |
| Section Header (small) | 360 | 160 |
| Body Paragraph | 0 | 160 |
| Bullet Item | 0 | 120 |
| Table | 240 | 240 |
[Document Title - Work Sans Light 24pt, centered]
[Subtitle - Work Sans 11pt italic gray, centered]
[Blank line]
[Section Header - Work Sans 24pt or 14pt red]
[Body paragraphs - Work Sans 11pt, 160 twips after]
[Tables as needed]
[Bullet lists as needed]
The skill uses the docx npm package. Here are working patterns:
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
Header, Footer, AlignmentType, WidthType, BorderStyle,
ShadingType, VerticalAlign, PageNumber, ImageRun,
convertInchesToTwip
} = require('docx');
const table = new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: tableBorders,
columnWidths: [1800, 850, 850, 850, 850], // REQUIRED - specify explicit widths
rows: [...]
});
Always specify columnWidths array - Without this, columns will collapse or be uneven. This is the #1 cause of table rendering issues.
Define borders once and reuse:
const tableBorders = {
top: { style: BorderStyle.SINGLE, size: 4, color: "CCCCCC" },
bottom: { style: BorderStyle.SINGLE, size: 4, color: "CCCCCC" },
left: { style: BorderStyle.SINGLE, size: 4, color: "CCCCCC" },
right: { style: BorderStyle.SINGLE, size: 4, color: "CCCCCC" },
insideHorizontal: { style: BorderStyle.SINGLE, size: 4, color: "CCCCCC" },
insideVertical: { style: BorderStyle.SINGLE, size: 4, color: "CCCCCC" }
};
Total usable width for A4 with 1" margins: ~9300 DXA
| Content Type | Recommended Width (DXA) | Examples |
|---|---|---|
| Single character / dash | 700-850 | "—", "3", "4" |
| Percentage values | 800-900 | "40%", "65%" |
| Short text (1-3 words) | 1000-1400 | "Production", "Live 2024" |
| Medium text (4-8 words) | 1600-2200 | "Shape standard & preserve IP" |
| Long text (sentences) | 2800-4500 | Full descriptions |
| Row labels (first column) | 1600-2000 | Category names |
| Highlight columns | 1000-1200 | "CDM Relevance" values |
For multi-column tables (6+ columns):
CRITICAL: Must include all three shading properties:
shading: {
fill: "F2F2F2", // The background color
type: ShadingType.CLEAR, // Required
color: "auto" // Required
}
CRITICAL: When a column uses highlight formatting (e.g., pink background for "CDM Relevance"), ALL cells in that column must use the highlight cell function, including empty cells:
// WRONG - leaves cell without highlight, breaks column consistency
createHighlightCell("", 1100)
// CORRECT - maintains column consistency with placeholder
createHighlightCell("—", 1100)
For cells with multiple lines of content, pass an array:
createDataCell(["Line 1.", "Line 2."], width, isFirstCol, isAltRow)
// Implementation adds spacing between paragraphs:
const children = paragraphs.map((para, idx) => new Paragraph({
spacing: idx > 0 ? { before: 80 } : {},
children: [new TextRun({ text: para, ... })]
}));
// Brand colors constant
const COLORS = {
RED_ACCENT: "DA291C",
NAVY_HEADER: "032340",
WHITE: "FFFFFF",
BLACK: "000000",
GRAY_SUBTITLE: "808080",
BORDER_LIGHT: "CCCCCC",
BORDER_HEADER: "AAAAAA",
ALT_ROW_GRAY: "F2F2F2",
HIGHLIGHT_PINK: "FFE3E3"
};
// Table header cell (navy background, white bold text)
function createHeaderCell(text, width) {
return new TableCell({
width: { size: width, type: WidthType.DXA },
shading: { fill: COLORS.NAVY_HEADER, type: ShadingType.CLEAR, color: "auto" },
verticalAlign: VerticalAlign.CENTER,
margins: {
top: convertInchesToTwip(0.03),
bottom: convertInchesToTwip(0.03),
left: convertInchesToTwip(0.06),
right: convertInchesToTwip(0.06)
},
children: [new Paragraph({
alignment: AlignmentType.CENTER,
children: [new TextRun({
text,
bold: true,
color: COLORS.WHITE,
size: 18,
font: "Work Sans"
})]
})]
});
}
// Data cell with alternating row support
function createDataCell(content, width, isFirstCol = false, isAlternateRow = false, centered = false) {
const paragraphs = Array.isArray(content) ? content : [content];
const children = paragraphs.map((para, idx) => new Paragraph({
alignment: centered ? AlignmentType.CENTER : AlignmentType.LEFT,
spacing: idx > 0 ? { before: 80 } : {},
children: [new TextRun({
text: para,
bold: isFirstCol,
size: 18,
font: "Work Sans"
})]
}));
const cell = new TableCell({
width: { size: width, type: WidthType.DXA },
verticalAlign: VerticalAlign.CENTER,
margins: {
top: convertInchesToTwip(0.04),
bottom: convertInchesToTwip(0.04),
left: convertInchesToTwip(0.06),
right: convertInchesToTwip(0.06)
},
shading: isAlternateRow ? { fill: COLORS.ALT_ROW_GRAY, type: ShadingType.CLEAR, color: "auto" } : undefined,
children: children
});
return cell;
}
// Highlight cell (pink background) - use for special emphasis columns
function createHighlightCell(text, width) {
return new TableCell({
width: { size: width, type: WidthType.DXA },
shading: { fill: COLORS.HIGHLIGHT_PINK, type: ShadingType.CLEAR, color: "auto" },
verticalAlign: VerticalAlign.CENTER,
margins: {
top: convertInchesToTwip(0.03),
bottom: convertInchesToTwip(0.03),
left: convertInchesToTwip(0.02),
right: convertInchesToTwip(0.02)
},
children: [new Paragraph({
alignment: AlignmentType.CENTER,
children: [new TextRun({
text: text || "—", // Always use placeholder for empty cells
bold: true,
color: COLORS.BLACK,
size: 16,
font: "Work Sans"
})]
})]
});
}
// Table width: 100% with explicit columnWidths
// Cell margins (header): top 0.03", left 0.06", bottom 0.03", right 0.06"
// Cell margins (data): top 0.04", left 0.06", bottom 0.04", right 0.06"
// Cell margins (highlight): top 0.03", left 0.02", bottom 0.03", right 0.02"
assets/media/image2.svg or image1.png (decorative header bar)assets/media/image3.png)Before outputting the document, verify:
columnWidths array specifiedtype: ShadingType.CLEAR, color: "auto"assets/media/The skill includes these brand assets in assets/media/:
image1.png - Header bar / Footer logo (fallback)image2.svg - Header decorative barimage3.png - Footer logo| Issue | Cause | Solution |
|---|---|---|
| Tables collapse/render incorrectly | Missing columnWidths | Always specify columnWidths array |
| Uneven column spacing | Widths don't match content | Use width guidelines by content type |
| Missing highlight on cells | Empty cell = no styling applied | Use "—" placeholder with highlight styling |
| Alternating rows not showing | Incomplete shading object | Include fill, type: CLEAR, and color: auto |
| Text overflow in cells | Column too narrow | Increase width, abbreviate headers if needed |
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience