Install
$ agentstack add skill-hasna-skills-doc-generate ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
--topic "Project Proposal for Mobile App Development" -o proposal.docx
Generate DOCX
Create professional Microsoft Word documents from markdown content, plain text, or let AI generate complete documents from a topic or outline.
> This is a CLI skill. It requires the skills CLI to execute. Install it with npm install -g @hasna/skills, then run the commands below.
Features
- Markdown to DOCX: Convert markdown files to Word documents
- AI Generation: Generate complete documents from topics/prompts
- Rich Formatting: Headers, lists, tables, code blocks, quotes
- Custom Styling: Fonts, colors, margins, spacing
- Templates: Professional templates (report, letter, memo, resume)
- Table of Contents: Auto-generated TOC
- Headers/Footers: Page numbers, dates, custom text
- Images: Embed images from local files or URLs
Installation
skills install generate-docx
Quick Start
From Markdown
# Convert markdown to Word
skills run generate-docx -- document.md -o output.docx
# With custom styling
skills run generate-docx -- document.md --template report --font "Times New Roman"
AI Generation
# Generate from topic
skills run generate-docx -- --topic "Project Proposal for Mobile App Development" -o proposal.docx
# With more control
skills run generate-docx -- --topic "Employee Handbook" \
--sections 10 \
--style formal \
--template report \
-o handbook.docx
From Text/Prompt
# Generate from prompt
skills run generate-docx -- --prompt "Write a cover letter for a software engineer position at Google" -o cover-letter.docx
Options
Input Options
| Flag | Description | | ----------------- | ------------------------------- | | ` | Input markdown file | | --topic | Topic for AI to write about | | --prompt | Direct prompt for AI generation | | --text ` | Plain text content |
AI Options
| Flag | Default | Description | | ----------------- | ------------ | --------------------------------------------- | | --sections | 5 | Number of sections to generate | | --style | professional | Style: professional, casual, formal, academic | | --tone | neutral | Tone: neutral, friendly, authoritative | | --length | medium | Length: short, medium, long, comprehensive |
Output Options
| Flag | Default | Description | | --------------------- | --------------- | ---------------- | | -o, --output | auto | Output file path | | --dir | .skills/exports | Output directory |
Template Options
| Flag | Default | Description | | ------------------- | ------- | -------------------------------------------------------- | | --template | default | Template: default, report, letter, memo, resume, article | | --title | auto | Document title | | --author | - | Author name | | --company | - | Company name | | --date | today | Document date |
Styling Options
| Flag | Default | Description | | ----------------------- | ------------- | ----------------------- | | --font | Calibri | Font family | | --font-size | 11 | Base font size | | --heading-font | Calibri Light | Heading font | | --line-spacing | 1.15 | Line spacing multiplier | | --margins | 1 | Page margins | | --page-size | letter | Page: letter, a4, legal |
Content Options
| Flag | Default | Description | | ----------------- | ------- | ------------------------- | | --toc | false | Include table of contents | | --page-numbers | true | Include page numbers | | --header | - | Header text | | --footer | - | Footer text |
Templates
default
Clean, minimal document with standard formatting.
report
Professional report with title page, TOC, headers/footers.
letter
Business letter format with date, addresses, signature block.
memo
Internal memo format with To/From/Subject/Date header.
resume
CV/Resume format with sections for experience, education, skills.
article
Article/essay format with abstract and section numbering.
Examples
Example 1: Simple Markdown Conversion
skills run generate-docx -- notes.md -o notes.docx
Example 2: Professional Report
skills run generate-docx -- \
--topic "Q4 2024 Sales Analysis" \
--template report \
--sections 8 \
--style formal \
--toc \
--author "Sales Team" \
--company "Acme Corp" \
-o q4-report.docx
Example 3: Business Letter
skills run generate-docx -- \
--prompt "Write a business letter declining a partnership offer politely" \
--template letter \
--author "John Smith" \
--company "Tech Solutions Inc" \
-o decline-letter.docx
Example 4: Resume from Markdown
skills run generate-docx -- resume.md \
--template resume \
--font "Garamond" \
--margins 0.75 \
-o my-resume.docx
Example 5: Academic Paper
skills run generate-docx -- paper.md \
--template article \
--font "Times New Roman" \
--font-size 12 \
--line-spacing 2 \
--toc \
-o research-paper.docx
Example 6: Company Memo
skills run generate-docx -- \
--prompt "Write a memo announcing the new remote work policy" \
--template memo \
--author "HR Department" \
-o remote-work-memo.docx
Markdown Support
The skill supports standard markdown plus extensions:
# Heading 1
## Heading 2
### Heading 3
Regular paragraph text with **bold**, _italic_, and `code`.
- Bullet list item 1
- Bullet list item 2
- Nested item
1. Numbered list
2. Second item
> Block quote text
| Column 1 | Column 2 |
| -------- | -------- |
| Cell 1 | Cell 2 |
---
Horizontal rule above
Environment Variables
# Required for AI generation
export OPENAI_API_KEY="sk-..."
Credits
- Base conversion: 3 credits
- AI generation: +5 credits
Troubleshooting
Document won't open
- Ensure .docx extension is used
- Try opening in Google Docs or LibreOffice
Formatting looks wrong
- Different Word versions render slightly differently
- Try adjusting font and spacing options
Images not appearing
- Use absolute paths for local images
- Ensure image files exist
AI generation failed
- Check OPENAIAPIKEY is set
- Use markdown input instead of --topic
Related Skills
generate-pdf- Create PDF documentsgenerate-slides- Create presentationsparse-pdf- Extract content from PDFs
Support
For issues or feature requests, visit skills.md/skills/generate-docx
## Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- **Author:** [hasna](https://github.com/hasna)
- **Source:** [hasna/skills](https://github.com/hasna/skills)
- **License:** Apache-2.0
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.