Overview
Python python-docx Library-based DOCX generation + Claude brand-tone modern design system.
Supports Korean official documents, corporate reports, contracts, and proposals, and ensures results are not "AI-generated-looking clichéd design" but instead come out as
professional visual draftswith built-in color palettes, typographic hierarchy, spacing, and structural patterns.
Trigger Keywords
Word, docx, Word document, contract, official document, report generation, document editing, draft document, proposal, official letter, cooperation letter, plan
Design System — Claude Modern Doc Theme
references/modern-design-system.mddetailed colors, typography, spacing, and heading hierarchy are defined.
Color Palette (Claude Brand Tone)
| Role | 색 | hex | Usage |
|---|---|---|---|
| Primary | Anthropic Orange | #d97757 |
Emphasis headings, chart highlight, dividers |
| Secondary | Anthropic Blue | #6a9bcc |
Secondary emphasis, quotes, table headers |
| Background | Light Beige | #faf9f5 |
Body background (#ffffff also possible instead) |
| Surface | White | #ffffff |
Table and code block background |
| Text Primary | Dark | #141413 |
Body text (replace with #000) |
| Text Secondary | Mid Gray | #b0aea5 |
Captions, meta information |
| Border | Light Gray | #e8e6dc |
Table borders, dividers |
Typography — Korean/English Pairing
| Hierarchy | Korean Font | English Font | Size | weight |
|---|---|---|---|---|
| Body cover | Pretendard | Inter | 28pt | Bold |
| H1 | Pretendard | Inter | 22pt | Bold |
| H2 | Pretendard | Inter | 18pt | SemiBold |
| H3 | Pretendard | Inter | 14pt | SemiBold |
| Body | Pretendard | Inter / Lora* | 11pt | Regular |
| Caption | Pretendard | Inter | 9pt | Regular |
| Code/Mono | Goorm Sans Code | Goorm Sans Code | 10pt | Regular |
* Lora is Anthropic's official body font. Recommended for quotes and excerpt areas.
Spacing and Margins
- Page: A4 (210×297 mm)
- Margins: 30 mm top/bottom · 25 mm left/right (official document standard) / 25 mm top/bottom · 22 mm left/right (modern report)
- Line spacing: body 1.5× · caption 1.2×
- Heading top/bottom: H1 top 24 pt, bottom 12 pt · H2 top 18 pt, bottom 9 pt · H3 top 12 pt, bottom 6 pt
- Paragraph spacing: 6 pt
- Table cell padding: 6 pt left/right, 4 pt top/bottom
Workflow
Step 1: Determine Document Type
| Type | Design Tone | Recommended Palette Variation |
|---|---|---|
| Korean official document | Formal/traditional | Classic Mono (Dark + White만) |
| Corporate report | Trust/data-centered | Claude Classic (Orange + Beige + Dark) |
| Contract | Formal/neutral | Mono Strict (Dark + White) |
| Proposal | Active/visual | Claude Coral (Crail + Pampas) |
| Plan | Creative/exploratory | Claude Blue (Blue + Beige) |
| Business plan | Impact/confidence | Claude Bold (Orange Highlight + Dark) |
Step 2: Collect and Structure Content
Standard structure by document type (see references/modern-templates.md):
Official Document: Recipient·Subject·Body (numbering)·Issuing Organization·Person in Charge·Contact·Date — Preamble/Body/Conclusion structure·item numbering system·붙임 n부. 끝.·Approval box follows the moai-officer:doc-hwp의 references/kr-official-forms.md(Korean-style form SSOT), and for Korean-style layout examples, see references/templates/korean-report.md·references/templates/korean-proposal.md reference
Contract: Party A·Party B indication·Contract purpose·Scope·Term·Payment·Intellectual Property Rights·Confidentiality·Termination·Dispute Resolution·Signature block
Proposal: Cover·Executive Summary·Current Status·Proposal·Expected Effects·Schedule·Budget·Team
Report: Summary·Background·Analysis·Conclusion·Recommendations·Appendix
Planning Document: Background·Objectives·Strategy·Action Plan·KPI·Risks
Step 3: Generate document with python-docx
from docx import Document
from docx.shared import Pt, Cm, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.oxml.ns import qn
from docx.oxml import OxmlElement
doc = Document()
# 페이지 설정 — A4 + 모던 여백
section = doc.sections[0]
section.page_height = Cm(29.7)
section.page_width = Cm(21.0)
section.top_margin = Cm(2.5)
section.bottom_margin = Cm(2.5)
section.left_margin = Cm(2.2)
section.right_margin = Cm(2.2)
# Claude 톤 색
CLAUDE_ORANGE = RGBColor(0xD9, 0x77, 0x57)
CLAUDE_DARK = RGBColor(0x14, 0x14, 0x13)
CLAUDE_MID = RGBColor(0xB0, 0xAE, 0xA5)
# H1 스타일
h1 = doc.styles['Heading 1']
h1.font.name = 'Pretendard'
h1.font.size = Pt(22)
h1.font.bold = True
h1.font.color.rgb = CLAUDE_DARK
# 강조 헤딩 (Primary Orange 사용)
title = doc.add_heading('2026 Q1 사업 보고서', level=0)
for run in title.runs:
run.font.color.rgb = CLAUDE_ORANGE
run.font.size = Pt(28)
For the full code pattern, see references/modern-templates.md reference.
Step 4: Apply formatting and output file
- Paragraph styles (Heading 1-3·Body·Quote·Caption)
- Tables (header shading Light Beige, borders Light Gray, zebra striping on row change)
- Images (logo·chart·signature) + automatic caption placement
- Headers/Footers (page number bottom right, publisher bottom left)
- Batch replacement of placeholders (
{변수명}→ actual values)
Step 5: Review (10-step checklist)
references/qa-checklist.mdAutomatically/semi-automatically check the 10 steps of:
- No empty placeholders (
{변수명}pattern remaining check) - Page numbers displayed on all pages
- Continuous heading hierarchy (no skipping from H1 → H3)
- Consistent table borders (unified border color·thickness)
- No font corruption (verify Pretendard·Malgun Gothic system fonts)
- Color contrast 4.5:1 or higher (Body Dark on Light Beige = 13.5:1 PASS)
- Consistent image captions (position·format)
- Consistent spacing between paragraphs (do not use manual blank lines)
- Normal text wrapping in table cells (no overflow)
- No AI slop expressions (innovative·next-generation·redefining, etc. —
moai-designer:design-slop-checkchaining recommended)
6 Modern Design Patterns
Pattern 1 — Executive Summary Box
1-page summary box on the first page of reports·proposals.
┌────────────────────────────────────────┐
│ Executive Summary │ ← Orange 강조선
│ ────────────────────────────────── │
│ [4-5줄 핵심 요약 — 본문보다 약간 큰 ]│
│ [폰트, 좌측 Orange 강조선 4pt] │
└────────────────────────────────────────┘
Pattern 2 — Pull Quote
Emphasis of quotes in the middle of the body.
┃ "[인용문 — Lora 세리프 16pt 이탤릭]"
┃ — 출처 (Mid Gray, 11pt)
Anthropic Blue #6a9bcc Left border 4pt + Lora Italic.
Pattern 3 — Stat Callout
Number emphasis area.
[37%] [2.4배] [₩1.2억]
매출 증가 ROI 개선 예상 절감
Numbers: Orange 36pt Bold · Labels: Mid Gray 11pt.
Pattern 4 — Comparison Table
Good/Bad·Existing/Proposed comparison.
| 기준 | 기존 | 제안 |
| --- | --- | --- |
| Beige 헤더 | White cell | Orange tint |
Pattern 5 — Sidebar Note
Memo·annotation box beside the body (Light Beige background).
Pattern 6 — Section Divider
Visual separation between sections.
─── ⬢ ────────────────────────────────
Section 2 — 시장 분석
Orange small shape + Mid Gray horizontal line + section number.
Usage Examples
- "Create a service contract DOCX (Party A: Company A, Party B: Company B, contract amount 10 million KRW)" → Mono Strict palette
- "Create the Q1 quarterly report in a modern tone" → Claude Classic palette + Executive Summary Box + Stat Callout 3
- "30-page startup business plan" → Claude Bold palette + utilize 6 patterns
- "Administrative agency cooperation official document" → Classic Mono palette + standard official document format
- "Make an internal planning document usable for presentations too" → Claude Blue palette + Pull Quote + Stat Callout
Output format
- File format:
.docx(Microsoft Word 2007+ compatible) - Page setup: A4 (210mm × 297mm)
- Margins: Top/bottom 25-30mm, left/right 22-25mm (by document type)
- Font: Pretendard (Korean) + Inter/Lora (English) · For official documents, Gulim·Malgun Gothic
- Color encoding: sRGB
- Encoding: UTF-8
Precautions
Claude tone color usage rules
- Primary Orange only for emphasis — do not plaster it all over the body text
- Per document: Primary + Secondary + Background = 3 colors + Dark/Light neutrals only
- Use color only when it has meaning (not decoration)
Using the HWPX alternative
In environments without Hancom Office, DOCX can be used as a substitute when an official document is needed. If Hancom conversion is needed, see the moai-officer:doc-hwp skill.
Official document regulation compliance
Complies with the format based on the Ministry of the Interior and Safety's "Official Document Drafting Regulations." For formal official documents, do not use Orange·Blue accent colors; use Mono Strict (Dark + White only).
Fonts and distribution
When distributing, embedding fonts or converting to PDF is recommended. Pretendard is open source, so embedding is unrestricted. Lora is free from Google Fonts.
Digital signature
Supports inserting a digital signature field. After converting to an Adobe Acrobat-compatible PDF, a digital signature is recommended.
Security
For sensitive documents such as contracts, password protection is recommended. You can set a document open password and an edit password separately.
Troubleshooting
| Situation | Solution |
|---|---|
| File creation failure | pip install python-docx Retry after installation |
| Colors not showing | Check whether RGBColor is used (docx.shared.RGBColor) |
| Broken fonts | Install Pretendard on the system or convert to PDF |
| Heading style not applied | doc.styles['Heading 1'] Edit directly |
| Korean compatibility | Gulim·Malgun Gothic fallback recommended |
| Table cell color not changing | _tc.get_or_add_tcPr() + OxmlElement('w:shd') Use |
| Page numbers not inserted | In the header/footer area, field insert object |
For detailed troubleshooting and code examples, see references/modern-templates.md .
Related skills / self-review
When document generation is complete, reopen the produced .docx file and self-reviewfor remaining placeholders, insufficient pages/length, Korean fonts, broken encoding, and broken tables, and if there are issues, automatically fix and regenerate, then report the final PASS/FAIL result (for review items, see references/qa-checklist.md ).
| Skill | When to use |
|---|---|
moai-officer:doc-pptx |
Generate presentation slides (sharing the same Claude tone design system) |
moai-officer:doc-hwp |
Generate Hancom Hangeul documents (HWPX) |
moai-officer:doc-xlsx |
Excel data sheet |
moai-officer:doc-pdf |
PDF conversion · multilingual PDF |
moai-writer:korean-humanize |
Copy AI slop naturalization |
moai-coworker:ai-slop-reviewer |
Text output slop review |
moai-designer:design-slop-check |
Claude Design tone and consistency review |
Technical reference
- python-docx official: https://python-docx.readthedocs.io/
- Ministry of the Interior and Safety official document drafting regulations: https://www.mois.go.kr/
- Anthropic Brand Guidelines: The colors and typography of this skill are based on the official Anthropic brand guide
- Microsoft Word file format: ECMA-376 Office Open XML
Detailed reference
| File | Load condition |
|---|---|
| references/modern-design-system.md | When the full set of color, typography, and spacing design tokens is needed |
| references/modern-templates.md | When modern template structures and code patterns for the 6 major document types are needed |
| references/qa-checklist.md | During 5-step review (10-step checklist) |
| references/document-generator.md | When a guide for generating Korean business documents is needed (existing material, maintained) |
| references/templates/korean-report.md | When a Korean-style report DOCX layout (margins, fonts, structure) is needed |
| references/templates/korean-proposal.md | When a Korean-style proposal DOCX layout is needed |