prorated-refund-calculator
Calculate the exact prorated refund when a customer cancels a BlastPass membership, and the net settlement when a defective unit is traded up to a pricier model. Use after the Store Policy Agent confirms the refund rule and the Membership MCP has returned the membership details. The skill runs a bundled Python script so the arithmetic is exact.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- prorated-refund-calculator
- description
- Calculate the exact prorated refund when a customer cancels a BlastPass membership, and the net settlement when a defective unit is traded up to a pricier model. Use after the Store Policy Agent confirms the refund rule and the Membership MCP has returned the membership details. The skill runs a bundled Python script so the arithmetic is exact.
02 资源文件 1
- 脚本blastpass_refund.py4.9 KB
03 SKILL.md 正文
Prorated Refund Calculator (BlastPass)
This skill computes the exact refund owed when a customer cancels their
BlastPass membership, and the net settlement when a defective unit is credited
toward a pricier model. The math must be exact and consistent, so you run the
bundled blastpass_refund.py script — never compute the refund in your head, and
never write your own code.
When to use
Use this skill in a BlastPass cancellation or trade-up, once you have:
- The Store Policy Agent has confirmed the member's tier and that a prorated refund (or cooling-off full refund) applies.
- The Membership MCP (
get_membership) has returned the membership record, includingannual_price,months_remaining,cancellation_fee,nonrefundable_credit, andwithin_cooling_off.
Do not invent any of these numbers. They come from the Membership MCP and the Store Policy Agent.
The refund rules (single source of truth)
- Cooling-off (full refund). If
within_cooling_offis true, refund the fullannual_price. No fee, no proration. - Prorated cancellation (the usual case). Otherwise refund the value of the whole unused months left on the 12-month term, then subtract the tier cancellation fee.
- Non-refundable credit. Subtract
nonrefundable_credit(only the MEGA tier has one). For other tiers it is 0. - The refund is never negative.
Workflow
1. Compute the membership refund
Take annual_price, months_remaining, cancellation_fee,
nonrefundable_credit, and within_cooling_off from the get_membership result,
and run:
python3 blastpass_refund.py refund \
--annual-price 129.99 --months-remaining 8 --cancellation-fee 10
Add --nonrefundable-credit <n> for MEGA members, or --within-cooling-off when
the membership is still within the cooling-off window. The script prints the
breakdown and a REFUND DUE: $... line.
Worked example: BlastPass Plus Extra, annual_price 129.99, months_remaining 8,
cancellation_fee 10 -> monthly $10.8325, prorated $86.66, minus $10 = $76.66.
2. (Trade-up only) Compute the upgrade settlement
When the cancellation happens alongside a console upgrade — the defective unit is credited under warranty and the customer puts the value toward a pricier model, applying the membership refund as store credit — run:
python3 blastpass_refund.py settle \
--defective-credit 399.99 --upgrade-price 499.99 --membership-credit 76.66
Use after (a) the Store Policy Agent confirms the defective unit is credited at its
purchase price with no restocking fee, (b) the Warehouse MCP returns the upgrade
model's price, and (c) the prorated refund above is known. The script prints the
breakdown and a NET DUE FROM CUSTOMER: $... (or REFUND TO CUSTOMER: $...) line.
Worked example: defective base console credited $399.99, MEGA edition $499.99, membership refund $76.66 applied as credit -> upgrade difference $100.00, net $23.34 due from the customer.
3. Report the result
- State the refund due and (if a trade-up) the net due / refund clearly.
- Show the breakdown lines so the associate can verify how it was derived.
- Offer to cancel the membership via the Membership MCP (
cancel_membership) and to hand the final numbers to theslip-pdf-generatorskill to print the slip.
04 同仓库更多 Skills
slip-pdf-generator
Generate a printable BlastBox return / RMA / exchange slip as a PDF for the associate to hand to the customer. Use at the end of a return, warranty swap, membership cancellation, or upgrade once all amounts are final. The skill runs a bundled Python script that renders the confirmed slip values into a real PDF file.
points-reconciliation
Reconcile a customer's BlastPoints loyalty balance after a complex visit (purchases, returns, promo multipliers, expiry) and convert the net balance to store credit. Use when an associate asks about a member's points, or after a return that should claw back previously earned points. The skill runs a bundled Python script that applies the base earn rate, promo multipliers, tier bonus, clawbacks, and expiry, then prints a points ledger and the redeemable store-credit value.
prorated-refund-calculator
Calculate the exact prorated refund when a customer cancels a BlastPass membership, and the net settlement when a defective unit is traded up to a pricier model. Use after the Store Policy Agent confirms the refund rule and the Membership MCP has returned the membership details. The skill runs a bundled Python script so the arithmetic is exact.
membership-card-png
Generate a digital BlastPass membership card as a PNG image by running the bundled card_png.py script. Use when a member self-serves a lost/stolen/damaged card replacement, or any time a card needs to be shown on screen (vs. printed). The skill takes the member details returned by the Membership MCP (get_membership) plus the new_card_serial returned by reissue_card and passes them as command-line flags to a bundled Python (matplotlib) script that renders a CR80-sized membership card to a real PNG. It only renders the card from already-retrieved values — it never looks anything up or invents data.
membership-card-png
Generate a digital BlastPass membership card as a PNG image by running the bundled card_png.py script. Use when a member self-serves a lost/stolen/damaged card replacement, or any time a card needs to be shown on screen (vs. printed). The skill takes the member details returned by the Membership MCP (get_membership) plus the new_card_serial returned by reissue_card and passes them as command-line flags to a bundled Python (matplotlib) script that renders a CR80-sized membership card to a real PNG. It only renders the card from already-retrieved values — it never looks anything up or invents data.
slip-pdf-generator
Generate a printable BlastBox return / RMA / exchange slip as a PDF for the associate to hand to the customer. Use at the end of a return, warranty swap, membership cancellation, or upgrade once all amounts are final. The skill runs a bundled Python script that renders the confirmed slip values into a real PDF file.