hydr0pon1c/skills-on-the-fly/24-23

Claude Code and agent skill by hydr0pon1c/skills-on-the-fly

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Install

npx vskill@latest install hydr0pon1c/skills-on-the-fly/24-23

SKILL.md

The same SKILL.md was published earlier as hydr0pon1c/skills-on-the-fly/24-23.

SKILL.md

When to use

Apply this skill when you need to delete rows from an Excel sheet based on multiple criteria values in a specific column (especially column A) and the dataset is large (thousands of rows), so performance matters. The instruction will mention filtering a column for certain labels and removing matching rows. You must:

  • Identify the column (e.g., column A) and the exact target labels (likely provided as strings; note case, spaces, special characters).
  • Understand that the task is sheet-level manipulation (whole sheet or a large range) and requires modifying the file in place.
  • Gather evidence: read the first few rows and the full column with unique values to confirm label spelling and any hidden characters.
  • Decide between row-by-row deletion (slow) and batch deletion using pandas filtering + openpyxl reverse delete (fast).

Possible Failure Modes

  • Mismatched row indexing between pandas (0‑based) and openpyxl (1‑based): forgetting to add 2 (header row) when converting indices can delete wrong rows.
  • Case sensitivity: labels like '@9T' might appear as '@9T' exactly, but strings may have leading/trailing spaces or mixed case (e.g., '@9t'). Always normalize with .str.strip() and compare exactly as they appear in the data.
  • Performance trap: deleting rows one by one forward (lowest to highest) causes openpyxl to shift indices undetected. Always delete in reverse order (highest row number first).
  • Preserving header row: ensure row 1 (header) is never deleted. The deletion loop must start from row 2.
  • Unintended row deletion: using an overly broad condition (e.g., substring match) may delete rows that only partially match. Only use exact equality or a list of allowed values.
  • Ignoring the `answer_position` hint: the range given (e.g., A2:D207) tells you the data area. Deleting rows outside this range might affect the evaluator’s view, but the main deletion must happen within the logical data area. Usually the header is row 1 and the data starts at row 2.
  • Not verifying final row count: after deletion, check that the expected number of rows remains (total rows minus number of matches). A common mistake is deleting too many or too few due to off‑by‑one errors.

Possible procedures

1. Understand the data structure
  • Load the workbook and read the specified sheet.
  • Print the first few rows to see column names and the header row.
  • Check the exact content of column A (the filtering column) – print unique values to confirm label spellings.
2. Plan the deletion logic with speed in mind
  • Use pandas.read_excel() to quickly load the data (or use openpyxl but pandas is faster for filtering).
  • Create a mask: df[col_A].isin([target1, target2, target3]). For large data, avoid iterating cells.
  • Get the indices of rows to delete (pandas 0‑based). Convert to Excel row numbers: excel_row = idx + 2 (because header is row 1, data starts row 2).
3. Execute deletion efficiently
  • Use openpyxl to delete rows. Open the workbook directly (not through pandas) to preserve all formatting.
  • Delete in reverse order using a sorted list descending.
  • If the sheet has many rows, this approach is fast because openpyxl only shifts rows once per deletion (still O(n) but acceptable). For extreme performance, consider collecting all row numbers and using a range delete (e.g., ws.delete_rows(min_row, max_row-min+1)) with contiguous blocks, but reverse row‑by‑row is simpler and safe.
4. Save and verify
  • Save the workbook to the specified output path.
  • Re‑open and read the file to count remaining rows and confirm the target labels no longer exist.
Decision points
  • Is the column index known? If column A, use column 1. If other, map from header name or use pandas column index.
  • Are the labels case‑sensitive? Use exact match after .str.strip() or compare with the same case as they appear in the unique‑values inspection.
  • Is there an existing VBA macro? You are replacing it with Python; do not attempt to modify the VBA directly.

Verification Checklist

  • [ ] Output format: The final file is saved exactly to the provided output_path. No extra files are created.
  • [ ] Row deletion count: Open output file and ensure the number of rows deleted equals the count of rows in the original that matched the criteria. (Use a quick check.)
  • [ ] Header preserved: Row 1 (headers) still exists and contains the original column names.
  • [ ] Criteria columns only affected: Only rows that match the exact labels in column A are gone; rows with other labels are intact.
  • [ ] No extra data outside answer_position: For sheet‑level tasks, the entire sheet may be changed, but ensure the deletion does not corrupt cells outside the stated range (usually safe if you only delete rows).
  • [ ] No copying from retrieved examples: The solution must use the target’s exact labels and column, not copied from other tasks.
  • [ ] Recovery check: If the code fails (e.g., file not found), print an error and re‑read the file before retrying. Do not assume success.
  • [ ] Performance acceptable: For 13,000 rows, pandas filtering plus openpyxl reverse delete should complete in a few seconds. If slower, consider using pandas and saving with to_excel (but that loses formatting). Prefer openpyxl for formatting retention.
  • [ ] String normalization: Applied .str.strip() and possibly .str.upper() if the data has inconsistent casing. Verify after deletion that the conditions match the actual cell values.

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/hydr0pon1c/skills-on-the-fly/24-23/badge)](https://verified-skill.com/skills/hydr0pon1c/skills-on-the-fly/24-23)

Something wrong with this skill or its page? Tell us.