hydr0pon1c/skills-on-the-fly/230-16
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/230-16SKILL.md
The same SKILL.md was published earlier as hydr0pon1c/skills-on-the-fly/230-16.
SKILL.md
When to use
Use this skill when a spreadsheet task requires extracting a substring from each cell in a column (based on a pattern such as "starting from the first letter") and moving that substring to an adjacent column, while removing it from the original cell. This is common in macro requests where text is split into parts (e.g., a timestamp and a subsequent message). The binding contract is the instruction, spreadsheet path, sheet name, and answer position (range of cells to modify). Before acting, gather:
- Which sheet(s) are involved and which column contains the source text.
- The exact pattern or condition for the substring (e.g., "first letter" means the first alphabetical character, ignoring numbers/dates at the start).
- The target column for the extracted substring (usually the next column to the right or a named column).
- The answer position: modify only that range; do not add or delete rows/columns outside it unless explicitly required.
- Confirm if the operation should be applied to all rows in the range (including empty cells).
Possible Failure Modes
- Incorrect identification of "first letter": For cells starting with a datetime followed by text, "first letter" might be misinterpreted as the first character of the datetime (e.g., '2') rather than the first alphabetical character of the text part (e.g., 'e' in "event_type"). Use string methods or regex to find the first alphabetical character index.
- Off-by-one errors when deleting or overwriting: After extracting the substring, removing it from the original cell may leave trailing spaces or incomplete cleanup. Ensure the original cell retains only the prefix (e.g., the timestamp).
- Modifying cells outside answer_position: The answer_position gives the exact range (e.g.,
'Before'!A1:A12). Do not alter cells outside that range, and do not add extra columns or rows beyond it. - Applying operation to empty cells: If a cell is empty or lacks the expected pattern, the macro should either leave it unchanged or skip it, not produce errors or insert bogus substrings.
- Assuming column indexing: When writing to column B (adjacent), ensure the target column exists and that its content is not overwritten inadvertently if it already contains values (unless the task requires overwriting).
- Not considering multiple rows with different formats: Some cells may have slightly different timestamp formats; the extraction logic must be robust to variations.
- Failure to save to output_path: The final code must save the modified workbook to the given output_path; losing the workbook or saving to a wrong path will fail the evaluation.
Possible procedures
- Load workbook and select sheet: Use
openpyxl.load_workbookwith the given spreadsheet_path. Access the sheet by name (from instruction or content). - Read column A values within answer_position range: Determine the row range from the answer_position (e.g., A1:A12) and iterate over those rows. For each cell in column A:
- Retrieve the cell value (if
Noneor empty, skip). - Identify the start index of the first alphabetical character (using a regex like
[a-zA-Z]orisalpha()). This is the beginning of the substring to extract. - Extract two parts: the prefix (everything before that index) and the substring (from that index to the end).
- Write to column B: For the same row, set the cell in column B to the extracted substring. If column B already has content, decide whether to overwrite based on the instruction (often the "string1" column is initially NaN and should be filled).
- Update column A: Set the original cell in column A to the prefix (the part before the first letter). If the prefix is empty, the cell should become empty or be cleared.
- Handle edge cases:
- If no alphabetical character is found (e.g., all numeric), skip or leave unchanged.
- Ensure empty cells are not processed to avoid overwriting with empty strings.
- Use correct openpyxl methods:
ws.cell(row=r, column=1).valuefor reading/writing. For writing formulas vs. values: the instruction asks for a macro (VBA), but the solution is implemented in Python. Write values directly (not formulas) unless the instruction explicitly asks for a formula. - Delete or keep original data: The target task says "delete these strings in column A". After extracting the substring, replace the original cell value with only the prefix (the part before the substring). This effectively removes the substring from column A.
- Save workbook: Use
wb.save(output_path)at the end. Ensure no other modifications to the workbook.
Verification Checklist
- [ ] The output workbook exists at the specified
output_pathand is a valid.xlsxfile. - [ ] Only cells within the
answer_positionrange (e.g.,'Before'!A1:A12) have been modified; cells outside that range remain unchanged. - [ ] For each row in the range, column A now contains only the prefix (text before the first alphabetical character if applicable) and column B contains the extracted substring.
- [ ] No extra rows or columns were added or deleted.
- [ ] Empty cells in column A remain empty (or unchanged) in both columns A and B.
- [ ] The extracted substring starts exactly from the first letter (alphabetical character) of the original cell's text, not from a number or symbol.
- [ ] The original cell's value is not a duplicate of the substring; the substring has been removed from column A.
- [ ] The solution does not copy concrete values or patterns from retrieved examples; it is generalized to the target instruction.
- [ ] If the task involves moving to a named column (e.g., "string1"), that column's header row is preserved (if applicable).
- [ ] The code uses the correct sheet name from the instruction (not hardcoded from retrieved examples).
- [ ] Execute the code without errors and verify no traceback appears in the final output.
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/230-16/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/230-16)