用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/vamseeachanta/workspace-hub --skill docx-templates-1-basic-template-rendering命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
Write outbound email and external messages in Vamsee Achanta's voice — a subtle offer to help, never bold or rash claims. Load before drafting ANY email, LinkedIn/Collide reply, proposal note, or outreach sent under his name.
Save/publish analysis or computation results from ANY ecosystem repo to Hugging Face as a queryable, viewer-renderable dataset. Use when the user wants to "save results to hugging face", "publish dataset to HF", "hugging face data saving", "save analysis results", "hf dataset", "make results queryable", or "render via datasets-server API". Reshapes nested results into flat parquet tables, writes a dataset card with a viewer `configs:` block and provenance, applies license/public-vs-private routing, enforces a domain data-quality gate (faithful-to-source != correct), publishes to `aceengineer/<repo>-<projection>`, and verifies via the datasets-server API.
Clone, create, fork, configure, and manage GitHub repositories. Manage remotes, secrets, releases, and workflows. Works with gh CLI or falls back to git + GitHub REST API via curl.
正在显示 SKILL.md
| name | docx-templates-1-basic-template-rendering |
| description | Sub-skill of docx-templates: 1. Basic Template Rendering. |
| version | 1.0.0 |
| category | data |
| type | reference |
| scripts_exempt | true |
Simple Variable Substitution:
"""
Basic template rendering with variable substitution.
"""
from docxtpl import DocxTemplate
from typing import Dict, Any
from pathlib import Path
def render_simple_template(
template_path: str,
output_path: str,
context: Dict[str, Any]
) -> None:
"""
Render a template with simple variable substitution.
Args:
template_path: Path to .docx template
output_path: Path for output document
context: Dictionary of values to substitute
Template syntax:
{{ variable_name }} - Simple variable
{{ object.property }} - Nested property
"""
# Load template
template = DocxTemplate(template_path)
# Render with context
template.render(context)
# Save output
template.save(output_path)
print(f"Document saved to {output_path}")
def create_sample_letter(output_path: str) -> None:
"""Create a sample letter using template rendering."""
# First, create a simple template (normally you'd have this prepared)
# Template content would have: {{ recipient_name }}, {{ date }}, etc.
context = {
"recipient_name": "John Smith",
"recipient_title": "Director of Operations",
"company_name": "Acme Corporation",
"street_address": "123 Business Ave",
"city_state_zip": "New York, NY 10001",
"date": "January 17, 2026",
"subject": "Project Proposal",
"salutation": "Dear Mr. Smith",
"body_paragraph_1": """
We are pleased to submit our proposal for the infrastructure
upgrade project. Our team has extensive experience in similar
projects and we are confident we can deliver exceptional results.
""".strip(),
"body_paragraph_2": """
The attached documents outline our approach, timeline, and
budget estimates. We would welcome the opportunity to discuss
this proposal at your convenience.
""".strip(),
"closing": "Sincerely",
"sender_name": "Jane Doe",
"sender_title": "Project Manager"
}
# Render template
render_simple_template("letter_template.docx", output_path, context)
# Example context for a business report
report_context = {
"report_title": "Q4 2025 Performance Report",
"prepared_by": "Analytics Team",
"date": "January 15, 2026",
"executive_summary": "Strong performance across all metrics...",
"total_revenue": "$2,450,000",
"growth_rate": "15.3%",
"customer_count": "1,250",
"key_achievements": [
"Launched new product line",
"Expanded to 3 new markets",
"Achieved ISO certification"
]
}
Nested Object Access:
"""
Access nested objects and complex data structures in templates.
"""
from docxtpl import DocxTemplate
from dataclasses import dataclass, asdict
from typing import List, Dict, Optional
from datetime import date
@dataclass
class Address:
"""Address data structure."""
street: str
city: str
state: str
zip_code: str
country: str = "USA"
@property
def full_address(self) -> str:
return f"{self.street}\n{self.city}, {self.state} {self.zip_code}"
@dataclass
class Contact:
"""Contact information."""
name: str
email: str
phone: str
title: Optional[str] = None
@dataclass
class Company:
"""Company data structure."""
name: str
address: Address
contacts: List[Contact]
industry: str
website:
() -> :
{
: .name,
: asdict(.address),
: [asdict(c) c .contacts],
: .industry,
: .website
}
() -> :
template = DocxTemplate(template_path)
context = {
: company.to_dict(),
: date.today().strftime()
}
template.render(context)
template.save(output_path)
company = Company(
name=,
address=Address(
street=,
city=,
state=,
zip_code=
),
contacts=[
Contact(
name=,
email=,
phone=,
title=
),
Contact(
name=,
email=,
*Content truncated — see parent skill full reference.*