AGENT SKILL
voucher-budget
Applies platform or shop voucher arithmetic to a product set.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-22
- Stars
- ★ 19
- Forks
- 8
01 前言 Front Matter
- name
- voucher-budget
- description
- Applies platform or shop voucher arithmetic to a product set.
03 SKILL.md 正文
You are solving a shopping task with voucher-budget constraints.
Goal:
- Use shopping tools to find products that match every user-requested attribute.
- Recommend product IDs in the correct order.
- Crucially, before recommending, explicitly verify voucher feasibility using:
- minimum spend threshold,
- discount type,
- discount cap,
- final payable amount versus the user’s budget,
- same-shop requirement.
Input format:
- The user asks for one or more products, each with attribute constraints such as category, color, size, quantity/pack type, service tags (e.g. COD, LazMall, LazFlash, free delivery), capacity, material, etc.
- The user also gives:
- a total budget,
- voucher rules:
- same-shop only or equivalent wording,
- minimum subtotal threshold,
- discount type and value (currently percentage discount in examples),
- discount cap.
Required workflow:
- Parse all requested product slots and all required attributes for each slot.
- Search with shopping tools for each slot using targeted queries.
- Inspect candidate product details with product-information tools before deciding.
- Build a bundle that satisfies the user’s requested attributes.
- Check voucher eligibility across the entire bundle:
- All recommended items must come from the same shop if the voucher says so.
- Compute subtotal before discount.
- Confirm subtotal exceeds/meets the voucher threshold exactly as stated.
- Compute discount according to the voucher type.
- For percentage discount: discount = percentage × subtotal.
- Apply the cap: actual discount = min(computed discount, cap).
- Compute final payable = subtotal - actual discount.
- Confirm final payable is within the user’s budget.
- Only then recommend the ordered product IDs.
- Call
recommend_productafter selecting a valid bundle, then callterminateon the next tool step. Do not emit user-facing prose during the tool phase.
Output requirements:
- After termination, the runtime requests a separate user-facing answer.
- Include the final recommended product IDs in exact requested order and do not mention alternative product IDs.
- In that final answer, provide a concise voucher-check explanation showing:
- shop consistency,
- subtotal,
- threshold check,
- raw discount,
- capped discount,
- final payable,
- whether it fits the budget.
- If no valid bundle exists, terminate without inventing a match. Explain the blocking constraint only in the post-termination final answer.
Tool-use expectations:
- You must use shopping tools (e.g. search + product detail inspection) before recommending.
- Do not recommend unverified product IDs.
- Avoid repetitive or aimless searches; refine queries based on missing attributes.
- Inspect enough product details to confirm requested constraints and shop IDs.
Important task-specific lessons from prior failures:
- Do not return user-facing text before termination.
- Do not omit prices, shop matching, or voucher math.
- Do not recommend items unless you have evidence they satisfy the requested attributes and voucher constraints.
- Do not recommend or terminate with unsupported product IDs.
- The main evaluation is sensitive to voucher-budget reasoning, so always show the threshold, discount type, cap, final budget calculation, and same-shop check before recommending.
Post-termination final-answer structure:
- Short summary of matched items.
- Voucher check:
- Same shop: yes/no
- Subtotal: X
- Threshold needed: Y
- Discount: Z% of subtotal = A
- Cap: B
- Actual discount: min(A, B) = C
- Final payable: subtotal - C = D
- Budget: E
- Result: within budget / not within budget
- recommended_product_ids: [ ... ] in exact requested order
- Terminate
If no valid bundle:
- State no valid recommendation found.
- Briefly state the blocking constraint(s).
- recommended_product_ids: []
- Terminate
04 同仓库更多 Skills
knowledge-shopping
Resolves a factual clue before searching for a matching product.
★ 19
voucher-budget
Applies platform or shop voucher arithmetic to a product set.
★ 19
same-shop
Finds multiple requested products sold by one shared shop.
★ 19
product-selection
Selects one catalog product for a constrained shopping request.
★ 19
knowledge-shopping
Resolves a factual clue before searching for a matching product.
★ 19
knowledge-shopping
Resolves a factual clue before searching for a matching product.
★ 19