python-docx-1-basic-document-creation
Sub-skill of python-docx: 1. Basic Document Creation.
Best use case
python-docx-1-basic-document-creation is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sub-skill of python-docx: 1. Basic Document Creation.
Teams using python-docx-1-basic-document-creation should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/1-basic-document-creation/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How python-docx-1-basic-document-creation Compares
| Feature / Agent | python-docx-1-basic-document-creation | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sub-skill of python-docx: 1. Basic Document Creation.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 1. Basic Document Creation
## 1. Basic Document Creation
```python
"""
Create a basic Word document with title, paragraphs, and formatting.
"""
from docx import Document
from docx.shared import Inches, Pt, Cm
from docx.enum.text import WD_ALIGN_PARAGRAPH, WD_LINE_SPACING
from docx.oxml.ns import qn
from docx.oxml import OxmlElement
def create_basic_document(output_path: str) -> None:
"""Create a basic document with common elements."""
# Create new document
doc = Document()
# Set document properties
core_properties = doc.core_properties
core_properties.author = "Document Generator"
core_properties.title = "Sample Report"
core_properties.subject = "Automated Document Generation"
# Add title with formatting
title = doc.add_heading('Monthly Performance Report', level=0)
title.alignment = WD_ALIGN_PARAGRAPH.CENTER
# Add subtitle paragraph
subtitle = doc.add_paragraph()
subtitle_run = subtitle.add_run('January 2026')
subtitle_run.font.size = Pt(14)
subtitle_run.font.italic = True
subtitle.alignment = WD_ALIGN_PARAGRAPH.CENTER
# Add section heading
doc.add_heading('Executive Summary', level=1)
# Add paragraph with multiple runs (different formatting)
para = doc.add_paragraph()
para.add_run('This report summarizes ').font.size = Pt(11)
bold_run = para.add_run('key performance metrics')
bold_run.bold = True
bold_run.font.size = Pt(11)
para.add_run(' for the month of January 2026.')
# Add bullet points
doc.add_heading('Key Highlights', level=2)
bullets = [
'Revenue increased by 15% compared to last month',
'Customer satisfaction score reached 92%',
'New user registrations up 25%',
'Support ticket resolution time reduced by 10%'
]
for bullet in bullets:
para = doc.add_paragraph(bullet, style='List Bullet')
# Add numbered list
doc.add_heading('Action Items', level=2)
actions = [
'Review Q1 budget allocation',
'Schedule team performance reviews',
'Finalize marketing campaign for Q2'
]
for action in actions:
doc.add_paragraph(action, style='List Number')
# Save document
doc.save(output_path)
print(f"Document saved to {output_path}")
# Usage
create_basic_document('basic_report.docx')
```Related Skills
staged-issue-tree-creation-with-deduplication
Pattern for creating hierarchical GitHub issue trees from phased project plans while checking for duplicate/overlapping issues
python-import-path-mismatch-debugging
Diagnose and fix ModuleNotFoundError when a package is installed but imports still fail due to environment/path mismatches
python-import-path-debugging
Diagnose ModuleNotFoundError when a package is installed but still fails to import
multi-source-tax-document-reconciliation
Verify generated tax forms against source documents by line-by-line comparison, not just totals
documentation-contract-plan-hardening
Harden a documentation/contract plan before adversarial review by mapping every issue-scope requirement to independent acceptance criteria and tests, especially for routing/indexing contracts.
python-debugpy
Debug Python: pdb REPL + debugpy remote (DAP).
ocr-and-documents
Extract text from PDFs and scanned documents. Use web_extract for remote URLs, pymupdf for local text-based PDFs, marker-pdf for OCR/scanned docs. For DOCX use python-docx, for PPTX see the powerpoint skill.
gmail-attachment-to-document
Download attachments from Gmail threads, parse their content (Excel, PDF), extract structured data, and save to target repos with proper legal scanning.
python-project-template
Generate standardized Python project structure with pyproject.toml, UV environment, pytest configuration, and workspace-hub compliance. Creates production-ready project scaffolding.
gh-issue-creation-full-repo-and-batch-setup
Create multiple related GitHub issues safely by resolving full OWNER/REPO, checking duplicates and labels first, and verifying each created issue.
xlsx-to-python
Convert Excel calculation spreadsheets to Python code — extract formulas, build dependency graphs, generate pytest tests using cell values as assertions, and produce dark-intelligence archive YAMLs.
excel-workbook-to-python-v2
Convert engineering Excel workbooks to Python code using Codex Desktop cowork on Windows. Proven superior quality vs Linux openpyxl extraction (24 vs 7 functions, 81 vs 53 tests). Validated on Ballymore jumper installation analysis.