openpyxl-1-memory-management

Sub-skill of openpyxl: 1. Memory Management (+2).

5 stars

Best use case

openpyxl-1-memory-management is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Sub-skill of openpyxl: 1. Memory Management (+2).

Teams using openpyxl-1-memory-management should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/1-memory-management/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/_archive/data/office/openpyxl/1-memory-management/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/1-memory-management/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How openpyxl-1-memory-management Compares

Feature / Agentopenpyxl-1-memory-managementStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Sub-skill of openpyxl: 1. Memory Management (+2).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 1. Memory Management (+2)

## 1. Memory Management


```python
"""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
```


## 2. Style Reuse


```python
"""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
```


## 3. Error Handling


```python
"""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
```

Related Skills

memory-bridge-operations

5
from vamseeachanta/workspace-hub

Operate and recover the Hermes-to-repo memory bridge: drift checks, quality gate, bridge commits, push verification, and stash recovery when pre-bridge scripts fail after generating outputs.

hermes-memory-bridge

5
from vamseeachanta/workspace-hub

Architecture and scripts for syncing Hermes memory into git-tracked .claude/memory/ so all machines get context via git pull. Covers quality gate, drift detection, topic mirroring, and cron automation.

cron-job-management

5
from vamseeachanta/workspace-hub

Patterns for creating, testing, debugging, and maintaining cron-driven automation in workspace-hub, including log strategy, failure analysis, and safe git-aware job design.

github-repo-management

5
from vamseeachanta/workspace-hub

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.

data-management

5
from vamseeachanta/workspace-hub

Comprehensive DataFrame loading, filtering, transformation, and data pipeline management from Excel, CSV, and multiple sources with YAML-driven configuration.

memory-bridge-operation

5
from vamseeachanta/workspace-hub

Manage the Hermes ↔ repo memory sync system — bridge, quality gate, compaction, health checks, and cron

memory-bridge-commit-fallbacks

5
from vamseeachanta/workspace-hub

Fallback procedures when the Hermes ↔ Codex memory bridge writes .Codex/memory outputs but the internal git commit/push path fails because of dirty, stale, or broken submodule state.

agent-memory-bridge

5
from vamseeachanta/workspace-hub

Bidirectional sync between Hermes memory and Codex auto-memory, with licensed machine bootstrap. Use when context parity across agents is needed.

task-management

5
from vamseeachanta/workspace-hub

Simple task management using a shared TASKS.md file for tracking commitments and action items.

memory-management

5
from vamseeachanta/workspace-hub

Two-tier memory system for decoding workplace shorthand, acronyms, nicknames, and internal language.

close-management

5
from vamseeachanta/workspace-hub

Manage the month-end close process with task sequencing, dependencies, and status tracking.

source-management

5
from vamseeachanta/workspace-hub

Configure and query MCP data sources for enterprise search. Use when checking which sources (chat, email, cloud storage, CRM, knowledge base) are connected, connecting new ones, or tuning query priority and rate limits.