agentleFS
xcrrrxcrrr/claude-skills/skills/files/docx/SKILL.md

docx

Skill6 starsChanged 8 months agoMITView on GitHub

Use this skill when generating, planning, or describing structured Word-compatible documents from outlines, raw content, or templates including heading hierarchy, table structures, and formatting conventions. Not for editing existing DOCX files programmatically. Not for PDF layout or presentation slide design.

194 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use Video Generation, VLM and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • huang-x-hSkill

    Video Generation

    Implement AI-powered video generation capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to generate videos from text prompts or images, create video content programmatically, or build applications that produce video outputs. Supports asynchronous task management with status polling and result retrieval.

    Also in 6 projects that use this

  • huang-x-hSkill

    VLM

    Implement vision-based AI chat capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to analyze images, describe visual content, or create applications that combine image understanding with conversational AI. Supports image URLs and base64 encoded images for multimodal interactions.

    Also in 6 projects that use this

  • dav-niu474Skill

    gift-evaluator

    The PRIMARY tool for Spring Festival gift analysis and social interaction generation. Use this skill when users upload photos of gifts (alcohol, tea, supplements, etc.) to inquire about their value, authenticity, or how to respond socially. Integrates visual perception, market valuation, and HTML card generation.

    Also in 5 projects that use this

  • dav-niu474Skill

    Podcast Generate

    Generate podcast episodes from user-provided content or by searching the web for specified topics. If user uploads a text file/article, creates a dual-host dialogue podcast (or single-host upon request). If no content is provided, searches the web for information about the user-specified topic and generates a podcast. Duration scales with content size (3-20 minutes, ~240 chars/min). Uses z-ai-web-dev-sdk for LLM script generation and TTS audio synthesis. Outputs both a podcast script (Markdown) and a complete audio file (WAV).

    Also in 5 projects that use this

  • Liang-MHSkill

    stock_analysis

    获取 A 股、基金和港股的实时行情和技术分析数据

    Also in 5 projects that use this

  • SeifBenayedSkill

    file-reading

    Use this skill when a file has been uploaded but its content is NOT in your context — only its path at /mnt/user-data/uploads/ is listed in an uploaded_files block. This skill is a router: it tells you which tool to use for each file type (pdf, docx, xlsx, csv, json, images, archives, ebooks) so you read the right amount the right way instead of blindly running cat on a binary. Triggers: any mention of /mnt/user-data/uploads/, an uploaded_files section, a file_path tag, or a user asking about an uploaded file you have not yet read. Do NOT use this skill if the file content is already visible in your context inside a documents block — you already have it.

    Also in 5 projects that use this

  • +1 more from huang-x-h
  • +5 more from dav-niu474

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 189 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    H4 (Sub-subsections): Only if necessary; avoid going deeper than H4

    line 50
  2. Distinctive:

    Always define heading styles before writing content — consistent styles enable auto-TOC and navigation

    line 209
  3. Distinctive:

    Use built-in Word/python-docx styles rather than manual formatting — they are portable and maintainable

    line 210
  4. Distinctive:

    Keep tables simple — avoid merged cells when possible.

    line 211
  5. Distinctive:

    Place the executive summary at the front — decision-makers often read only this section

    line 212
  6. Distinctive:

    Use numbered sections for formal documents (government, legal, technical specs).

    line 213
  7. Very specific:

    Use docxtpl for template-based generation — fill a Word template with Jinja2 syntax, much easier than building from scratch

    line 226
  8. Very specific:

    Use styles.xml in the DOCX to define a corporate style guide once and reuse across documents

    line 230

“Common” is measured: kept by at least 6 in 10 of the 189 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

DOCX

Overview

This skill covers the design and generation of structured Microsoft Word-compatible documents (.docx format). It helps users translate raw content, outlines, or requirements into well-organized professional documents with consistent heading hierarchy, table structures, numbered sections, formatting conventions, headers/footers, styles, and page layout. This skill applies whether the output is a narrative document written in prose form (for human formatting in Word) or a structured description intended for programmatic generation using libraries like python-docx.

When to Use

  • Generating a complete DOCX document from an outline or brief
  • Planning the structure and section hierarchy for a business report or proposal
  • Describing table layouts, heading structures, and content for Word documents
  • Converting raw meeting notes, bullet points, or data into a polished document
  • Creating templates for recurring document types (reports, proposals, contracts)
  • Planning multi-section documents with front matter, body, and appendices
  • Describing DOCX structure for programmatic generation via python-docx or docxtpl

When NOT to Use

  • Editing an existing DOCX file's binary content (use Word application or python-docx directly)
  • Designing a PDF layout with precise page positioning (use pdf skill)
  • Creating presentation slides (use pptx skill)
  • Generating spreadsheet workbooks (use xlsx skill)
  • Writing long-form articles or blog posts without specific document structure requirements

Quick Reference

TaskApproach
Define document structureUse heading levels H1 (title), H2 (sections), H3 (subsections)
Format tablesSpecify column headers, data rows, alignment, and whether header row is bold/shaded
Add front matterCover page, table of contents, executive summary before body sections
Number sectionsUse "1. Introduction", "1.1 Background", "1.1.1 Context" hierarchy
Style body textSpecify font (Calibri 11pt default), line spacing (1.15 or 1.5), paragraph spacing
Insert figures/chartsDescribe position (inline vs float), caption text, and reference in body
Page layoutSpecify margins (Normal: 1in all sides), orientation (portrait/landscape), page size

Instructions

  1. Define the document purpose and audience — Before writing, clarify: Who will read this document? What decisions should it support? What is the expected length? This determines the appropriate formality, section depth, and level of detail required.
  2. Plan the document hierarchy — Outline the heading structure first:
    • H1 (Title/Document Title): One per document, on the cover page
    • H2 (Main Sections): Major divisions (e.g., Executive Summary, Background, Methodology)
    • H3 (Subsections): Supporting content within each H2 section
    • H4 (Sub-subsections): Only if necessary; avoid going deeper than H4
  3. Structure the front matter — Professional documents typically include: cover page (title, author, date, version), table of contents (auto-generated in Word from heading styles), and an executive summary (1–2 pages for decision-makers who won't read the full document).
  4. Write section content — For each section, plan: opening paragraph (what this section covers), body content (details, analysis, data), and closing statement or transition. Use numbered paragraphs for regulatory or legal documents; use flowing prose for reports and proposals.
  5. Design tables — For each table: provide a title/caption, define column headers and their alignment (left, center, right), specify data types per column, and indicate if the header row should have background shading. Mark any cells that should be merged.
  6. Plan visual elements — For figures, charts, or images: write the caption text, specify where in the text the figure is referenced, and describe the content. In a description for programmatic generation, also specify the image file path or chart data source.
  7. Add lists and callouts — Bullet lists for unordered items (features, considerations), numbered lists for ordered items (steps, rankings), and callout boxes or shaded text boxes for important notes, warnings, or key findings.
  8. Define headers and footers — Specify: left/center/right content in the header (company logo, document title, section name), left/center/right content in the footer (confidentiality notice, page number, date), and whether the first page has a different header/footer.
  9. Specify styles and formatting — Define the style guide: body font (Calibri 11pt or Times New Roman 12pt), heading fonts and sizes, line spacing, paragraph spacing before/after, color scheme for headings. Consistent styles make the document look professional and are critical if others will extend the template.
  10. Add back matter — Include as needed: appendices (labeled A, B, C), references/bibliography, glossary of terms, and revision history table.

Examples

Example 1: Project Proposal Document

Input: A consulting firm needs a project proposal for a client presenting a 6-month data platform modernization engagement.

Output:

Document structure:

Cover Page
  Title: "Data Platform Modernization: Project Proposal"
  Client: Acme Corp
  Prepared by: TechConsult LLC
  Date: [Month Year]
  Version: 1.0 | Confidential

Table of Contents (auto-generated)

1. Executive Summary (H2)
   One-page summary of the problem, proposed solution, timeline, and investment.

2. Background and Context (H2)
   2.1 Current State Assessment (H3)
       Description of existing data infrastructure, pain points.
   2.2 Business Drivers (H3)
       Why this project is necessary; business KPIs affected.

3. Proposed Solution (H2)
   3.1 Solution Architecture (H3)
       High-level architecture diagram (Figure 1). Description of components.
   3.2 Technology Stack (H3)
       Table: Component | Selected Technology | Rationale
   3.3 Data Migration Approach (H3)

4. Project Plan (H2)
   4.1 Phases and Milestones (H3)
       Table: Phase | Duration | Deliverables | Key Milestones
   4.2 Assumptions and Dependencies (H3)
   4.3 Risk Register (H3)
       Table: Risk | Likelihood | Impact | Mitigation

5. Team and Governance (H2)
   Table: Role | Name | Responsibility | Allocation (%)

6. Investment (H2)
   6.1 Fee Summary (H3)
       Table: Phase | Professional Fees | Expenses | Total
   6.2 Payment Terms (H3)

7. Terms and Conditions (H2)

Appendix A: Team Biographies
Appendix B: Client References
Appendix C: Revision History
  Table: Version | Date | Author | Changes

Formatting conventions:

Body text: Calibri 11pt, 1.15 line spacing, 6pt spacing after paragraph
H2 headings: Calibri 16pt Bold, Dark Blue (#1F3864), 12pt space before
H3 headings: Calibri 13pt Bold, Medium Blue (#2E75B6), 6pt space before
Table header rows: Bold, light blue background (#D6E4F0), centered
Page margins: 1 inch all sides
Header: Left = company logo | Right = "Confidential"
Footer: Left = document title | Center = page number | Right = date

Example 2: Business Report with Executive Summary — python-docx Generation

Input: Generate a monthly operations report programmatically using python-docx.

Output:

python-docx implementation:

from docx import Document
from docx.shared import Inches, Pt, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.oxml.ns import qn
import datetime

def create_operations_report(month: str, data: dict) -> Document:
    doc = Document()

    # Set page margins
    section = doc.sections[0]
    section.top_margin = Inches(1)
    section.bottom_margin = Inches(1)
    section.left_margin = Inches(1.25)
    section.right_margin = Inches(1.25)

    # Title
    title = doc.add_heading(f'Operations Report — {month}', level=0)
    title.alignment = WD_ALIGN_PARAGRAPH.CENTER

    # Metadata
    doc.add_paragraph(f'Prepared: {datetime.date.today().strftime("%B %d, %Y")}')
    doc.add_paragraph(f'Department: Operations | Status: FINAL')
    doc.add_page_break()

    # Executive Summary
    doc.add_heading('Executive Summary', level=1)
    doc.add_paragraph(data['executive_summary'])

    # KPI Summary Table
    doc.add_heading('Key Performance Indicators', level=2)
    table = doc.add_table(rows=1, cols=4)
    table.style = 'Table Grid'
    headers = ['Metric', 'Target', 'Actual', 'Status']
    hdr_cells = table.rows[0].cells
    for i, header in enumerate(headers):
        hdr_cells[i].text = header
        hdr_cells[i].paragraphs[0].runs[0].bold = True

    for kpi in data['kpis']:
        row_cells = table.add_row().cells
        row_cells[0].text = kpi['metric']
        row_cells[1].text = str(kpi['target'])
        row_cells[2].text = str(kpi['actual'])
        row_cells[3].text = '✓' if kpi['met'] else '✗'

    # Operational Highlights
    doc.add_heading('Operational Highlights', level=1)
    for highlight in data['highlights']:
        doc.add_paragraph(highlight, style='List Bullet')

    # Issues and Risks
    doc.add_heading('Issues and Risks', level=1)
    for issue in data['issues']:
        p = doc.add_paragraph(style='List Number')
        p.add_run(issue['title']).bold = True
        p.add_run(f' — {issue["description"]}')

    return doc

# Usage
report = create_operations_report('January 2025', report_data)
report.save('operations_report_jan2025.docx')

Best Practices

  • Always define heading styles before writing content — consistent styles enable auto-TOC and navigation
  • Use built-in Word/python-docx styles rather than manual formatting — they are portable and maintainable
  • Keep tables simple — avoid merged cells when possible; they are hard to read and maintain
  • Place the executive summary at the front — decision-makers often read only this section
  • Use numbered sections for formal documents (government, legal, technical specs); prose headings for business reports
  • Include a revision history table in all documents that will go through multiple review cycles
  • Set Track Changes expectation up front if the document will be edited collaboratively

Common Mistakes

  • Inconsistent heading levels — skipping from H2 to H4 breaks table of contents and navigation
  • Using manual bold/font changes instead of styles — breaks when the template is updated
  • Overly wide tables that don't fit the page margins — always verify column widths sum to page width minus margins
  • Forgetting page breaks between major sections — makes the document look unprofessional
  • Using spaces for indentation instead of paragraph indent settings — breaks on different printers and screen sizes
  • Creating a table of contents manually instead of using Word's auto-generate feature

Tips & Tricks

  • Use docxtpl for template-based generation — fill a Word template with Jinja2 syntax, much easier than building from scratch
  • For complex tables, design in Excel first, then describe the structure for DOCX
  • The python-mammoth library converts DOCX to clean HTML for web publishing
  • Word's "Navigation Pane" is the best test: if headings show correctly there, the structure is right
  • Use styles.xml in the DOCX to define a corporate style guide once and reuse across documents
  • For very long documents, split into multiple DOCX files and use Word's Master Document feature
  • PDF export from Word preserves all styles and is the safest format for sharing with external parties

Related Skills

  • pdf
  • pptx
  • xlsx

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.