用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/vamseeachanta/workspace-hub --skill python-docx-1-document-structure命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
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
基于 SOC 职业分类
| name | python-docx-1-document-structure |
| description | Sub-skill of python-docx: 1. Document Structure (+3). |
| version | 1.0.0 |
| category | data |
| type | reference |
| scripts_exempt | true |
"""Best practices for document organization."""
# DO: Create reusable document builders
class ReportBuilder:
def __init__(self, template_path=None):
self.doc = Document(template_path) if template_path else Document()
def add_title(self, text):
self.doc.add_heading(text, level=0)
return self
def add_section(self, title, content):
self.doc.add_heading(title, level=1)
self.doc.add_paragraph(content)
return self
def save(self, output_path):
self.doc.save(output_path)
# DO: Use context managers for cleanup
from contextlib import contextmanager
@contextmanager
def document_context(output_path):
doc = Document()
try:
yield doc
finally:
doc.save(output_path)
# Usage
with document_context('report.docx') as doc:
doc.add_heading('Title', level=0)
doc.add_paragraph('Content')
"""Maintain consistent styling across documents."""
# DO: Define style constants
class DocumentStyles:
FONT_HEADING = 'Georgia'
FONT_BODY = 'Calibri'
SIZE_TITLE = Pt(24)
SIZE_HEADING1 = Pt(18)
SIZE_HEADING2 = Pt(14)
SIZE_BODY = Pt(11)
COLOR_PRIMARY = RGBColor(0x2E, 0x74, 0xB5)
COLOR_SECONDARY = RGBColor(0x59, 0x59, 0x59)
# DO: Create style factory functions
def apply_heading_style(paragraph, level=1):
run = paragraph.runs[0] if paragraph.runs else paragraph.add_run()
run.font.name = DocumentStyles.FONT_HEADING
run.font.bold = True
run.font.color.rgb = DocumentStyles.COLOR_PRIMARY
if level == 1:
run.font.size = DocumentStyles.SIZE_HEADING1
elif level == 2:
run.font.size = DocumentStyles.SIZE_HEADING2
"""Robust error handling for document operations."""
from pathlib import Path
import logging
logger = logging.getLogger(__name__)
def safe_generate_document(template_path, output_path, data):
"""Generate document with comprehensive error handling."""
try:
# Validate inputs
if not Path(template_path).exists():
raise FileNotFoundError(f"Template not found: {template_path}")
# Ensure output directory exists
Path(output_path).parent.mkdir(parents=True, exist_ok=True)
# Generate document
doc = Document(template_path)
# ... processing ...
doc.save(output_path)
logger.info(f"Document generated: {output_path}")
return {"success": True, "path": output_path}
except FileNotFoundError as e:
logger.error(f"File not found: {e}")
return {"success": False, "error": str(e)}
except PermissionError as e:
logger.error(f"Permission denied: {e}")
return {"success": False, "error": "Permission denied"}
except Exception e:
logger.exception()
{: , : (e)}
"""Optimize document generation performance."""
# DO: Reuse Document objects when generating similar documents
class DocumentPool:
def __init__(self, template_path):
self.template_path = template_path
def generate(self, data, output_path):
# Load fresh copy of template for each generation
doc = Document(self.template_path)
# Process...
doc.save(output_path)
# DO: Use streaming for large documents
def generate_large_table(doc, data_generator, chunk_size=1000):
"""Generate large table in chunks to manage memory."""
table = None
headers_added = False
for chunk in data_generator:
if table is None:
headers = list(chunk[0].keys())
table = doc.add_table(rows=1, cols=len(headers))
for i, header in enumerate(headers):
table.rows[0].cells[i].text = header
headers_added = True
for row_data in chunk:
row = table.add_row()
for i, value in enumerate(row_data.values()):
row.cells[i].text = str(value)