Claude Skill

spreadsheet-workbook-forensics

Edit, repair, or generate spreadsheet workbooks with structure-preserving Python. Use for Excel or spreadsheet tasks involving .xlsx/.xlsm files, formulas, lookup tables, summaries, formatting preservation, target ranges, workbook QA, or any task where cells must be computed, wri

LLM Mart · 0 points · 3 views 0 listing impressions 0 install-command copies
Download markoblogo-abvx-agent-skills-skills_spreadsheet-workbook-forensics-37a7146.zip · 2 KB

Install

skills CLI npx skills add https://github.com/markoblogo/abvx-agent-skills/tree/main/skills/spreadsheet-workbook-forensics
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install markoblogo-abvx-agent-skills@llmmart
Git git clone https://github.com/markoblogo/abvx-agent-skills.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole markoblogo/abvx-agent-skills collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Spreadsheet Workbook Forensics

Use this skill for workbook edits where preserving structure and verifying target cells matters.

Workflow

  1. Inspect the actual workbook, not only a preview: sheet names, dimensions, merged cells, headers, formulas, named ranges, and nearby examples.
  2. Locate source tables and destination ranges by labels, headers, surrounding structure, and requested ranges, not fixed coordinates unless explicitly given.
  3. Write a small script with INPUT_PATH and OUTPUT_PATH constants.
  4. Use openpyxl for structure-preserving read/write. Use pandas only for in-memory transformation, then write back with openpyxl.
  5. Execute the script.
  6. Reopen the saved workbook and verify representative and boundary target cells.

Workbook Rules

  • Preserve unrelated sheets, cells, formulas, formatting, widths, borders, and named ranges.
  • Clear only the instructed output range before writing new results.
  • Do not insert/delete rows, sort source records, or relocate tables unless explicitly requested.
  • Copy style/number format from nearby template rows when adding outputs.
  • Delete rows bottom-to-top if deletion is explicitly required.

Formula And Value Rules

  • openpyxl does not calculate formulas or update cached formula results.
  • If the grader or user needs cell values, compute results in Python and write literal values unless live formulas are explicitly required.
  • Load a second workbook with data_only=True when existing formulas are inputs:
wb = openpyxl.load_workbook(INPUT_PATH)
wb_values = openpyxl.load_workbook(INPUT_PATH, data_only=True)
  • Treat existing formulas as semantic specifications: referenced ranges, criteria, lookup keys, and error handling should guide the Python computation.
  • Do not leave unevaluated formulas in target cells unless the deliverable explicitly asks for formulas.

Matching And Normalization

  • Normalize text by trimming, collapsing whitespace/NBSPs, and casefolding.
  • Normalize numeric-looking IDs consistently: 330, 330.0, and "330" may be the same key when context says so.
  • Parse numbers after removing currency symbols and commas while preserving signs and decimals.
  • Normalize dates deliberately across datetime, Excel serials, and date-like strings.
  • Build explicit single or composite keys for joins, lookups, deduplication, grouping, and interval matches.

Output Verification

Before finalizing:

  • Run the script once and fix syntax/runtime errors.
  • Reopen OUTPUT_PATH.
  • Check first, last, blank-sensitive, no-match, total, and representative target rows.
  • Confirm expected target cells contain non-formula literals when values are expected.
  • Confirm stale formulas or values were cleared from the target range.
  • Avoid quoting large raw workbook contents in the final response if cells may contain sensitive text.
Files (abvx-agent-skills)
  • agents
    • openai.yaml 215 B
      Loading…
  • SKILL.md 3.3 KB
    ---
    name: spreadsheet-workbook-forensics
    description: Edit, repair, or generate spreadsheet workbooks with structure-preserving Python. Use for Excel or spreadsheet tasks involving .xlsx/.xlsm files, formulas, lookup tables, summaries, formatting preservation, target ranges, workbook QA, or any task where cells must be computed, written, and verified rather than guessed from previews.
    license: MIT
    metadata:
      abvx_status: experimental
      abvx_origin: original
    ---
    
    # Spreadsheet Workbook Forensics
    
    Use this skill for workbook edits where preserving structure and verifying target cells matters.
    
    ## Workflow
    
    1. Inspect the actual workbook, not only a preview: sheet names, dimensions, merged cells, headers, formulas, named ranges, and nearby examples.
    2. Locate source tables and destination ranges by labels, headers, surrounding structure, and requested ranges, not fixed coordinates unless explicitly given.
    3. Write a small script with `INPUT_PATH` and `OUTPUT_PATH` constants.
    4. Use `openpyxl` for structure-preserving read/write. Use `pandas` only for in-memory transformation, then write back with `openpyxl`.
    5. Execute the script.
    6. Reopen the saved workbook and verify representative and boundary target cells.
    
    ## Workbook Rules
    
    - Preserve unrelated sheets, cells, formulas, formatting, widths, borders, and named ranges.
    - Clear only the instructed output range before writing new results.
    - Do not insert/delete rows, sort source records, or relocate tables unless explicitly requested.
    - Copy style/number format from nearby template rows when adding outputs.
    - Delete rows bottom-to-top if deletion is explicitly required.
    
    ## Formula And Value Rules
    
    - `openpyxl` does not calculate formulas or update cached formula results.
    - If the grader or user needs cell values, compute results in Python and write literal values unless live formulas are explicitly required.
    - Load a second workbook with `data_only=True` when existing formulas are inputs:
    
    ```python
    wb = openpyxl.load_workbook(INPUT_PATH)
    wb_values = openpyxl.load_workbook(INPUT_PATH, data_only=True)
    ```
    
    - Treat existing formulas as semantic specifications: referenced ranges, criteria, lookup keys, and error handling should guide the Python computation.
    - Do not leave unevaluated formulas in target cells unless the deliverable explicitly asks for formulas.
    
    ## Matching And Normalization
    
    - Normalize text by trimming, collapsing whitespace/NBSPs, and casefolding.
    - Normalize numeric-looking IDs consistently: `330`, `330.0`, and `"330"` may be the same key when context says so.
    - Parse numbers after removing currency symbols and commas while preserving signs and decimals.
    - Normalize dates deliberately across `datetime`, Excel serials, and date-like strings.
    - Build explicit single or composite keys for joins, lookups, deduplication, grouping, and interval matches.
    
    ## Output Verification
    
    Before finalizing:
    
    - Run the script once and fix syntax/runtime errors.
    - Reopen `OUTPUT_PATH`.
    - Check first, last, blank-sensitive, no-match, total, and representative target rows.
    - Confirm expected target cells contain non-formula literals when values are expected.
    - Confirm stale formulas or values were cleared from the target range.
    - Avoid quoting large raw workbook contents in the final response if cells may contain sensitive text.
    
  • SKILL_CARD.md 1.4 KB
    Loading…

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.