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

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/120-24

SKILL.md

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

SKILL.md

When to use

This skill applies when you need to conditionally update cell values and apply formatting in an Excel spreadsheet based on multiple column criteria. The target task context will provide:

  • A specific output column (e.g., BN) to overwrite.
  • A set of conditions linking values from several other columns (e.g., BL, BG, AY).
  • A mapping from condition combinations to replacement strings.
  • Possibly a formatting requirement (e.g., fill color) on one of the condition columns when certain criteria hold.

Before acting, gather:

  • The exact column letters and row range from the answer_position (e.g., 'Sheet1'!BN2:BN45).
  • The instruction’s condition logic (order of checks, fallback, and any special cases).
  • The spreadsheet’s actual data (especially headers, data types, and any irrelevant columns) to correctly map column indices.

Possible Failure Modes

  • Off-by-one row indexing – the answer_position range is 1‑based (Excel notation). Common errors: iterating from row 1 when data starts at row 2, or forgetting to include the last row.
  • Incorrect column mapping – treating a letter as a number (e.g., AY is column 51, not 50). Confirm mapping with openpyxl.utils.column_index_from_string.
  • Missing fallback/else case – the instruction may say “otherwise, change to X” only when certain conditions are met. Not updating cells that do not match any condition (leaving original) is often correct, but verify.
  • Applying formatting to wrong cells – color fill specified for column BL, but accidentally applied to BN or entire row. Also, ensure the fill color hex is exactly as stated (e.g., #0070C0 → start_color='0070C0' in openpyxl).
  • Treating string comparisons as case-sensitive – the instruction may imply exact match (e.g., 'LAG' vs 'Lag'). Normalize with .strip() and exact equality unless instructed otherwise.
  • Overwriting cells outside the answer range – only modify cells within answer_position (and only the column mentioned). Other columns must remain untouched.
  • Forgetting to handle empty/None cells – a condition cell may be None; comparisons should guard against that to avoid errors.
  • Mixing up which BG strings trigger each branch – carefully read the nested logic: first check BL and BG, then further branch on AY.

Possible procedures

  1. Load workbook and sheet

Use openpyxl.load_workbook() and select the sheet by name from the instruction (often "Sheet1").

  1. Map columns to indices

Use ws.cell(row=r, column=col_index). Compute indices:

  • BL → 64 (B=2, L=12 → 2*26 + 12 = 64, but confirm manually: B=2, L=12, but Excel columns after Z are AA=27, AB=28, ... AY=51, AZ=52, BA=53, BB=54, BC=55, BD=56, BE=57, BF=58, BG=59, BH=60, BI=61, BJ=62, BK=63, BL=64). Double-check with column_index_from_string.
  • BG → 59, AY → 51, BN → 66. Always compute to avoid off-by-one.
  1. Iterate over the answer range rows

Determine start_row and end_row from answer_position. For 'Sheet1'!BN2:BN45, rows 2 to 45 inclusive. Use for row in range(start_row, end_row+1).

  1. Implement the condition logic in order:
  • Read bl_val = ws.cell(row=r, column=bl_col).value
  • Read bg_val = ws.cell(row=r, column=bg_col).value
  • Read ay_val = ws.cell(row=r, column=ay_col).value
  • If bl_val equals 'LAG' and bg_val is one of the two specified strings:
  • If ay_val equals 'BOA_033E' or 'BOA_011G' → set BN to first replacement string (e.g., 'OCOGS - Spares - Transfer Price Overhead').
  • Else → set BN to second replacement string (e.g., 'OFSS - ORCL Consulting Prod Cost I/C').
  • If above conditions not met, do not change BN (leave original value, even if None).
  • Use exact string comparisons, trimming whitespace with .strip().
  1. Apply formatting to BL column

For each row in the same answer range (or entire sheet? The instruction says “any cell in BL” – likely only rows where BL is ‘LAG’ and BN is populated):

  • If bl_val == 'LAG' and bn_val is not None (after possible update), set fill of ws.cell(row=r, column=bl_col).fill = PatternFill(start_color='0070C0', end_color='0070C0', fill_type='solid').
  • If condition not met, leave existing fill unchanged.
  1. Handle none/empty gracefully – if bg_val is None, skip. If ay_val is None, treat as not matching.
  1. Save the workbook to the provided output_path.

Verification Checklist

  • [ ] Row range exact – Did you iterate only over the rows in answer_position (e.g., 2 to 45) and only modify column BN?
  • [ ] Column indices correct – Verify each column letter (BL, BG, AY, BN) maps to the right integer using column_index_from_string or a chart.
  • [ ] Condition logic order – The “otherwise” branch (when AY is not one of the two values) only applies when BL==‘LAG’ AND BG matches. If BL≠LAG or BG doesn’t match, BN should not be changed.
  • [ ] String comparison – Use == after .strip(); confirm case sensitivity matches the instruction (likely exact case).
  • [ ] Formatting applied correctly – Only fill column BL cells where BL==‘LAG’ AND BN is not None. Fill color hex exactly 0070C0 (without # in code).
  • [ ] No side effects – Cells outside the answer range (including column H, etc.) untouched. Any “column H should be empty” requirement from the instruction is not present here – but verify no accidental changes.
  • [ ] Edge cases covered – Rows where BL is not ‘LAG’, where BG is None, where AY is None, where BN originally has a value but conditions not met.
  • [ ] Output saved – Confirm the modified workbook is saved to the exact output_path.
  • [ ] If error occurs – Catch and investigate; do not silently skip. Ensure numeric handling not needed here (no whole-number check).

Recovery check: If any evidence (e.g., spreadsheet content) seems ambiguous, re-read the instruction to disambiguate the condition hierarchy. Do not copy concrete strings or columns from retrieved examples – they are transferable patterns only.

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/120-24/badge)](https://verified-skill.com/skills/hydr0pon1c/skills-on-the-fly/120-24)

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