用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/vamseeachanta/workspace-hub --skill openpyxl-1-memory-management命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 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 | openpyxl-1-memory-management |
| description | Sub-skill of openpyxl: 1. Memory Management (+2). |
| version | 1.0.0 |
| category | data |
| type | reference |
| scripts_exempt | true |
"""Best practices for memory-efficient Excel operations."""
# DO: Use write_only mode for large writes
wb = Workbook(write_only=True)
ws = wb.create_sheet()
for row in large_data:
ws.append(row) # Streams directly to file
wb.save('output.xlsx')
# DO: Use read_only mode for large reads
wb = load_workbook('large_file.xlsx', read_only=True)
for row in wb.active.iter_rows(values_only=True):
process_row(row)
wb.close() # Important: close when done
# DON'T: Load entire file into memory unnecessarily
# wb = load_workbook('large_file.xlsx') # Loads all into memory
"""Reuse styles for better performance."""
from openpyxl.styles import NamedStyle
# DO: Create named styles once, apply many times
header_style = NamedStyle(name="header")
header_style.font = Font(bold=True, color="FFFFFF")
header_style.fill = PatternFill(start_color="4472C4", fill_type="solid")
wb.add_named_style(header_style)
# Apply to multiple cells efficiently
for cell in ws[1]:
cell.style = "header"
# DON'T: Create style objects for each cell
# for cell in ws[1]:
# cell.font = Font(bold=True) # Creates new Font each time
"""Robust error handling for Excel operations."""
from pathlib import Path
import logging
logger = logging.getLogger(__name__)
def safe_save_workbook(wb: Workbook, output_path: str) -> bool:
"""Safely save workbook with error handling."""
try:
# Ensure directory exists
Path(output_path).parent.mkdir(parents=True, exist_ok=True)
# Check if file is locked
if Path(output_path).exists():
try:
Path(output_path).rename(output_path)
except PermissionError:
logger.error(f"File is locked: {output_path}")
return False
wb.save(output_path)
logger.info(f"Workbook saved: {output_path}")
return True
except Exception as e:
logger.exception(f"Failed to save workbook: {e}")
return False