hydr0pon1c/skills-on-the-fly/141-20
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/141-20SKILL.md
The same SKILL.md was published earlier as hydr0pon1c/skills-on-the-fly/141-20.
SKILL.md
When to use
Use this skill when you need to solve a spreadsheet manipulation problem that requires deleting rows across one or more sheets based on a condition that involves matching column values between sheets (or within the same sheet). Typical triggers in the instruction:
- Keywords like "delete rows", "macro", "matching rows", "find and delete", "remove rows", "based on value in column X and column Y".
- Sheet-level manipulation instruction type.
answer_positiondefines a range on each sheet that should contain the final output after deletion.- The problem involves cross-referencing two separate sheets by one or more key columns and deleting the corresponding rows from both.
Before acting, gather the following evidence from the task context:
- Exact sheet names (case-sensitive) and column indices (letters or numbers) to compare.
- Whether the condition is pairwise (each row from sheet A matches exactly one row in sheet B) or set-based (delete all rows that meet a condition across sheets).
- Whether any rows are marked with a visual highlight (e.g., yellow fill) – ignore the highlight; implement the logical condition.
- The
answer_positionranges – these indicate the expected final data footprint, not a constraint on which rows to delete. - The
spreadsheet_pathandoutput_pathfor loading/saving.
Possible Failure Modes
- Matching columns by value but not by type: treat numbers and strings as distinct (e.g.,
9963547vs"9963547"). Always convert both sides to the same type (str or numeric) before comparison. - Ignoring header rows: accidentally delete the header row because it compares
Noneor a column name. Always skip header rows (row 1) when collecting data. - Deleting rows in forward order: modifying row indices while iterating forward causes misalignment. Always collect indices first, then delete in reverse order (highest row number to lowest).
- Modifying a sheet that is not the target: the instruction clearly names the sheets (e.g., "PL Recon Items" and "Statement Recon Items"). Do not modify any other sheet.
- Handling missing or empty values: matching
NoneorNaNto a numeric value is a common mistake. Use an explicit check forNoneorpd.isna()and decide whether empty cells are considered a match (usually not intended). - Forgetting to save the workbook after all modifications. Ensure the final code saves to the exact
output_path. - Assuming sorted data – the matching condition is not about row order; it's a cross-join style match. Use a dictionary or set to efficiently look up values from one sheet while iterating over the other.
- Over-deleting from the second sheet because the same key from sheet A matches multiple rows in sheet B. Only delete the rows that correspond pairwise (one-to-one) unless the instruction says otherwise.
Possible procedures
- Load workbook and sheets
Use openpyxl.load_workbook(path) with data_only=True if needed. Get references to both target sheets by name.
- Map values from one sheet
- For the first sheet (e.g., "PL Recon Items"), iterate data rows (skip header). Build a dictionary mapping a composite key (e.g.,
(invoice_no, amount)) to the row index (1‑based) of that row. - If duplicate keys exist, decide whether to delete only the first match or all. Typically, each matching pair is unique.
- Identify rows to delete in the second sheet
- Iterate rows of the second sheet. For each data row, construct the same composite key using corresponding columns.
- If the key exists in the map from step 2, record the row index from the map (first sheet) and the current row index (second sheet).
- Collect both row indices into a set for each sheet.
- Delete rows in reverse order
- For each sheet, sort the collected row indices in descending order.
- Call
ws.delete_rows(row_idx)for each. - (If using
openpyxl,delete_rowsshifts rows below upward.)
- Preserve other sheets and data
Do not touch any sheet not mentioned in the instruction. If the problem involves only two sheets, leave other sheets unchanged.
- Save the workbook to the specified
output_path.
Decision points and recovery checks
- If a column value is `None` or `NaN`: decide to skip that row (since matching requires a value) or treat as a match only if both sides are also empty (rarely intended).
- If a key appears multiple times in the first sheet: ensure you match them one-to-one (e.g., remove from the map after first match) unless the instruction says "delete all rows that have a matching counterpart".
- If the `answer_position` shows only a few rows remain: that is the expected outcome; you do not need to verify the exact row count as long as the matching logic is correct.
Verification Checklist
- [ ] Only the specified sheets are modified – no other sheets in the workbook are changed.
- [ ] Header rows are preserved in each modified sheet (row 1 stays).
- [ ] Rows are deleted in reverse order – verify the final row indices are as expected (e.g., after deletion, there should be no duplicate empty rows in the middle).
- [ ] Cross-sheet matching is correct – for every deleted row in sheet A, there is a corresponding deleted row in sheet B that satisfies the column condition. (You can print or log the pairs during development to sanity‑check.)
- [ ] No extra rows are left empty or untended: after deletion, data rows are contiguous below the header (unless a blank separator row is intended by the instruction).
- [ ] Output file is saved at the exact
output_pathprovided in the task context. - [ ] No hard‑coded paths or values from retrieved examples are copied. All sheet names, column indices, and match logic come from the current target task context.
- [ ] No unrelated state is corrupted – e.g., cell formatting, other sheets, or merge cells (if any) remain intact.
- [ ] Recovery check: if any comparison involves ambiguous types or empty cells, the code explicitly handles them (e.g.,
str(value).strip() if value is not None else None).
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingprompt_optimizer/runs/example/spreadsheet/task_skills/141-20/SKILL.md
Popularity
- Repository stars
- 3
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. 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/141-20)