docx-construction
БесплатноБез исполняемых скриптовНе проверенWord document generation for construction: contracts, proposals, reports, specifications, transmittals. Template-based with dynamic content insertion.
от datadrivenconstruction★ 461 звезда на GitHubОб этом скилле
Word Document Generation for Construction
Overview
Create professional Word documents for construction workflows using python-docx. Generate contracts, proposals, reports, and specifications from templates with dynamic data.
Construction Use Cases
1. Contract Generation
Generate construction contracts from templates with project-specific data.
from docx import Document
from docx.shared import Inches, Pt
from docx.enum.text import WD_ALIGN_PARAGRAPH
from datetime import datetime
def generate_subcontract(template_path: str, contract_data: dict, output_path: str) -> str:
"""Generate subcontract from template."""
doc = Document(template_path)
# Replace placeholders
replacements = {
'{{PROJECT_NAME}}': contract_data['project_name'],
'{{CONTRACT_NUMBER}}': contract_data['contract_number'],
'{{SUBCONTRACTOR_NAME}}': contract_data['subcontractor'],
'{{SCOPE_OF_WORK}}': contract_data['scope'],
'{{CONTRACT_VALUE}}': f"${contract_data['value']:,.2f}",
'{{START_DATE}}': contract_data['start_date'],
'{{END_DATE}}': contract_data['end_date'],
'{{RETENTION_PERCENT}}': f"{contract_data['retention']}%",
}
for paragraph in doc.paragraphs:
for key, value in replacements.items():
if key in paragraph.text:
paragraph.text = paragraph.text.replace(key, value)
# Also check tables
for table in doc.tables:
for row in table.rows:
for cell in row.cells:
for key, value in replacements.items():
if key in cell.text:
cell.text = cell.text.replace(key, value)
doc.save(output_path)
return output_path
2. Proposal Document
Create professional project proposals.
def create_proposal(project_info: dict, scope_items: list, pricing: dict) -> Document:
"""Create construction proposal document."""
doc = Document()
# Title
title = doc.add_heading('Project Proposal', 0)
title.alignment = WD_ALIGN_PARAGRAPH.CENTER
# Project Info
doc.add_heading('Project Information', level=1)
doc.add_paragraph(f"Project: {project_info['name']}")
doc.add_paragraph(f"Location: {project_info['location']}")
doc.add_paragraph(f"Client: {project_info['client']}")
doc.add_paragraph(f"Date: {datetime.now().strftime('%B %d, %Y')}")
# Scope of Work
doc.add_heading('Scope of Work', level=1)
for item in scope_items:
doc.add_paragraph(item, style='List Bullet')
# Pricing Table
doc.add_heading('Pricing Summary', level=1)
table = doc.add_table(rows=1, cols=3)
table.style = 'Table Grid'
# Headers
headers = table.rows[0].cells
headers[0].text = 'Description'
headers[1].text = 'Quantity'
headers[2].text = 'Amount'
# Add line items
for item in pricing['line_items']:
row = table.add_row().cells
row[0].text = item['description']
row[1].text = str(item['quantity'])
row[2].text = f"${item['amount']:,.2f}"
# Total row
total_row = table.add_row().cells
total_row[0].text = 'TOTAL'
total_row[2].text = f"${pricing['total']:,.2f}"
# Terms
doc.add_heading('Terms & Conditions', level=1)
doc.add_paragraph(f"Payment Terms: {pricing.get('payment_terms', 'Net 30')}")
doc.add_paragraph(f"Validity: {pricing.get('validity', '30 days')}")
return doc
3. Daily Report Generation
Generate daily construction reports.
def generate_daily_report(report_data: dict, output_path: str) -> str:
"""Generate daily construction report."""
doc = Document()
# Header
doc.add_heading(f"Daily Construction Report", 0)
doc.add_paragraph(f"Project: {report_data['project_name']}")
doc.add_paragraph(f"Date: {report_data['date']}")
doc.add_paragraph(f"Report #: {report_data['report_number']}")
doc.add_paragraph(f"Weather: {report_data['weather']}")
# Workforce
doc.add_heading('Workforce On-Site', level=1)
workforce_table = doc.add_table(rows=1, cols=3)
workforce_table.style = 'Table Grid'
headers = workforce_table.rows[0].cells
headers[0].text = 'Trade'
headers[1].text = 'Company'
headers[2].text = 'Headcount'
for crew in report_data['workforce']:
row = workforce_table.add_row().cells
row[0].text = crew['trade']
row[1].text = crew['company']
row[2].text = str(crew['count'])
# Work Completed
doc.add_heading('Work Completed Today', level=1)
for item in report_data['work_completed']:
doc.add_paragraph(f"• {item}")
# Issues/Delays
if report_data.get('issues'):
doc.add_heading('Issues & Delays', level=1)
for issue in report_data['issues']:
p = doc.add_paragraph()
p.add_run(f"{issue['type']}: ").bold = True
p.add_run(issue['description'])
# Safety
doc.add_heading('Safety', leve
Установить docx-construction в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл docx-construction?
Word document generation for construction: contracts, proposals, reports, specifications, transmittals. Template-based with dynamic content insertion.
Как установить скилл docx-construction?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл docx-construction запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic