hydr0pon1c/skills-on-the-fly/2768
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/2768SKILL.md
The same SKILL.md was published earlier as hydr0pon1c/skills-on-the-fly/2768.
SKILL.md
When to use
Use this skill when you need to allocate available inventory (from a second sheet) to order lines (in a first sheet) based on a grouping key (e.g., Order No), with FIFO (earliest requested delivery date first) within each group, and return 0 when stock is exhausted. Key evidence to gather before acting:
- Sheets involved: Identify which sheet holds orders (Sheet1) and which holds inventory (Sheet2). Note the columns: Order No (or similar identifier), Item, Order Qty, Requested Delivery Date (or issued date) on orders; Order No, Item, Incoming Qty on inventory.
- Grouping key: The allocation runs independently per combination of Order No and Item. Common parts (e.g., “Screw”) may appear under multiple Order Nos – treat each Order No as a separate bucket, not a global pool.
- FIFO rule: When multiple order lines exist for the same Order No and Item, sort by earliest date (issued date or requested delivery date) and allocate stock in that order.
- Multiple inventory rows: Inventory for the same Order No + Item may be spread across multiple rows in Sheet2. Sum those quantities before allocating.
- Zero if no stock: If total available inventory ≤ total ordered, the earliest lines get filled up to the available quantity and later lines get
0. If inventory = 0, all lines get0.
Possible Failure Modes
- Treating all inventory as a global pool: Do not sum all “Screw” across all Order Nos. Allocate only per matching Order No.
- Ignoring multiple inventory rows: Sheet2 often has multiple rows for the same Order No + Item (e.g., two entries of “Screw” for Order 1001-A). Sum them before allocation.
- Wrong sort order: Confirm the date column (e.g., “issued date” or “Request del date”) that defines FIFO. Missing dates can break ordering – decide a fallback (e.g., treat missing as earliest).
- Not resetting inventory per group: After processing one Order No + Item, you may need to re-read the inventory sum for the next group; do not carry leftover from previous group.
- Off-by-one in cumulative allocation: Track running total of allocated quantity against the summed inventory. Stop when running total ≥ inventory; later rows get 0.
- Writing formulas vs static values: The target frequently expects static numeric results (not formulas) in the answer positions. Check the instruction’s style – formulas are used only if explicitly asked.
- Leaving cell unchanged when stock is exhausted: Must explicitly write
0or0.0(or as per target format). Do not leave blank or NaN. - Copying example data or other sheet IDs: Do not hardcode order numbers or item names from retrieved examples. The actual data is in the provided spreadsheet.
Possible procedures
- Load and inspect the workbook (using openpyxl or similar). Read both sheets to confirm column indices, header rows, and data types.
- Build inventory dictionary: For each Order No + Item combination in Sheet2, sum all
Incoming Qty. Store asinv[key] = total_qty. - Process order lines in Sheet1 within the answer range (e.g.,
Sheet1!H2:H18):
- Group rows by Order No (and optionally Item). For each group:
- Retrieve the corresponding inventory total from the dictionary (default 0).
- Sort the group rows by the FIFO date column (ascending).
- Initialize
remaining = inventory_total. - For each sorted row:
- Allocated = min(order_qty, remaining)
- Write allocated to the result cell.
- Subtract allocated from
remaining. - If a row’s Order No + Item has no inventory, write
0.
- Preserve all other cells – only modify the target answer range. Do not change any existing values outside that range.
- Use numeric values (int or float) unless the instruction explicitly asks for formulas.
- Final step: Save the workbook to the provided output path.
Decision points / recovery checks:
- If
invkey doesn’t exist, treat inventory as 0. - If date column is missing values, consider them as earliest (e.g., treat as a very early date) to maintain FIFO.
- If the answer range includes rows beyond actual data, leave them empty or as per original.
Verification Checklist
- [ ] The answer range (e.g.,
'Sheet1'!H2:H18) contains only the numeric results (no formulas unless required). - [ ] Every order line within the range has a value: either the allocated quantity or
0. - [ ] For each Order No + Item group, the sum of allocated quantities does not exceed the total inventory found for that group in Sheet2.
- [ ] Within each group, allocated quantities are non-increasing as you go down the sorted lines (FIFO: earlier rows get stock first, later rows get 0 if stock exhausted).
- [ ] All inventory rows in Sheet2 are accounted for (summed per key). No double‑counting or missed rows.
- [ ] No cells outside the answer range were modified (check by comparing to original workbook if needed).
- [ ] The output file is saved to the correct
output_path. - [ ] Recovery check: If any inventory entry has
Order NoorItemthat does not match any order line, it is ignored (no allocation leakage). - [ ] Ambiguity check: If the instruction mentions “FIFO” but does not specify the date column, confirm by reading the spreadsheet comments or header names – use the column that best matches (e.g., “issued date” or “Req del date”).
- [ ] Do not copy any numeric values, order numbers, or item names from retrieved examples – they are only evidence, not target facts.
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/2768/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/2768)