hydr0pon1c/skills-on-the-fly/267-21
Claude Code and agent skill by hydr0pon1c/skills-on-the-fly
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install hydr0pon1c/skills-on-the-fly/267-21SKILL.md
The same SKILL.md was published earlier as hydr0pon1c/skills-on-the-fly/267-21.
SKILL.md
When to use
Use this skill when you need to consolidate data from multiple source sheets into a single summary sheet using a common key column. The scenario typically involves:
- A summary sheet (e.g., "merging") that already contains rows with key values (e.g., IDs in column B) and empty columns to be filled.
- Source sheets (e.g., monthly data like SH1, RP1) each containing the same key column and a value column to be extracted.
- The instruction specifies which column from each source sheet goes into which column of the summary sheet.
- You must handle missing keys (no match) or blank source cells by inserting a placeholder (e.g., "-").
Before acting, gather explicit evidence from the task:
- The exact key column in the summary sheet (e.g., column B).
- Which source sheets to use and which source column (e.g., QTY) corresponds to each target column.
- The target cell range defined by
answer_position(e.g.,merging'!C2:D11). - How to treat errors/blanks: often replace with
"-". - Whether the solution should be static values (direct writes) or formulas (for dynamic updates) – the instruction text may hint.
Possible Failure Modes
- Mismatched header row handling. The first row of a sheet may be a header, not data. Extracting values from header names instead of data rows (as seen in first retrieved example where header cell values like
INVOICE NOorTYPEwere captured as data). Always skip header row when building the lookup.
- Incorrect range bounds. Using
max_rowormax_columnfrom openpyxl may include extra empty rows or columns. Always read only the rows/columns that actually contain data, or clamp to theanswer_positionrange when writing.
- Key comparison mismatch. Keys may have leading/trailing whitespace, different types (string vs number), or hidden characters. Normalise keys (strip, convert to string) before matching.
- Forgetting to handle missing keys or blanks. If a key in the summary sheet does not exist in a source sheet, or the source cell is empty, you must insert the placeholder (e.g.,
"-") instead of leavingNone.
- Modifying cells outside the allowed range. The
answer_positiondefines the only cells to change; changing headers or cells beyond that range may break validation.
- Overwriting existing data that should be preserved. If the summary sheet already contains data in other columns (e.g., columns beyond C/D), do not clear them.
- Assuming source sheets have the same row count. Each source may have a different number of rows; use key-based lookup not row index.
Possible procedures
- Load the workbook using
openpyxl.load_workbook(path). Usedata_only=Trueif evaluating formulas, but here values are likely static.
- Identify the summary sheet and its key column. Usually the instruction says "look up ID from column B". Determine the column letter and convert to column number (e.g., B -> 2). The key values are in the rows within the
answer_positionrange (e.g., C2:D11 implies rows 2 to 11; column B is the key for each row).
- For each source sheet (e.g., SH1, RP1):
- Read all rows (
ws.iter_rows(min_row=2, max_row=ws.max_row)skipping header). - Build a dictionary mapping the source key column (e.g., ID) to the value column (e.g., QTY). Be careful about column positions: use the actual column headers or the context from spreadsheet_content.
- Normalise keys:
str(cell.value).strip()if not None.
- Loop over the target rows in the summary sheet within the
answer_positionrange. For each row:
- Get the key from the summary's key column (e.g., column B, row r).
- For each source sheet and its corresponding target column:
- Look up the key in the source dictionary.
- If found and value is not None: write the value to the target cell.
- Else: write the placeholder (e.g.,
"-").
- Preserve unrelated cells. Only write to the columns specified by
answer_positionfor each row. Do not clear or overwrite any other cells.
- Save the workbook to
output_path.
Decision point: dynamic formulas vs static values
If the instruction asks for "updates as new data is added", you might need to use Excel formulas (e.g., IFERROR(INDEX(...), "-") or XLOOKUP). However, in benchmark tasks, static direct writes are usually sufficient because the answer_position is a fixed range. Check the instruction wording: if it specifically asks for formulas or dynamic updates, write formulas; otherwise, write values.
Recovery checks
- After building a source dictionary, print a few sample keys to verify you are reading from the data rows, not headers.
- Verify the
answer_positionrange is correct: e.g.,C2:D11means columns 3 and 4, rows 2 to 11.
Verification Checklist
- [ ] Key column reading: The summary sheet's key column (e.g., B) is read correctly; keys are normalised (stripped, string type) and match source sheet keys.
- [ ] Source lookup completeness: Every row in the summary sheet (within
answer_positionrange) gets a value or placeholder for each target column. - [ ] Placeholder insertion: Any missing key or blank source cell results in
"-"(or the specified placeholder), notNoneor empty string. - [ ] Range restriction: Only cells inside
answer_positionare modified; no other cells (including headers, other columns, or rows outside the range) are changed or cleared. - [ ] No copy of retrieved example facts: The solution uses the target task's sheet names, column names, and values – not paths, sheet names, or IDs from retrieved examples.
- [ ] No data loss: Existing data in the summary sheet that is not part of the
answer_position(e.g., columns A, B, or rows beyond) remains unaltered. - [ ] Error recovery: If a source sheet does not exist or a key column is missing, the code either exits with a clear error or handles it gracefully (e.g., fills with placeholder for all rows).
- [ ] Output file saved correctly: The workbook is saved to the exact
output_pathprovided, with no extra files created. - [ ] Format preservation: If the original workbook has formatting (number format, font, etc.), using
openpyxlpreserves it (unless overwriting cells – that may lose formatting, which is acceptable as values are the primary requirement).
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingprompt_optimizer/runs/example/spreadsheet/task_skills/267-21/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hydr0pon1c/skills-on-the-fly/267-21)