电子会员卡 PNG 生成
membership-card-png
通过运行内置的 card_png.py 脚本,生成电子 BlastPass 会员卡的 PNG 图片。适用于会员自助补办遗失/被盗/损坏的卡片,或任何需要在屏幕上展示卡片(而非打印)的场景。该技能接收 Membership MCP(get_membership)返回的会员详情,以及 reissue_card 返回的 new_card_serial,并将它们作为命令行参数传递给内置的 Python(matplotlib)脚本,渲染出 CR80 尺寸的会员卡并生成真实的 PNG 文件。它仅根据已获取的值渲染卡片——从不自行查询任何信息或编造数据。
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 21
- Forks
- 18
01 前言 Front Matter
- name
- membership-card-png
- description
- 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.
03 SKILL.md 正文
BlastPass Membership Card PNG Generator
This skill produces a digital BlastPass membership card as a shareable image by
running the bundled card_png.py script. It is the self-serve companion to
membership-card-pdf: when a member reissues a lost, stolen, or damaged card, you
mint a new serial via the Membership MCP and hand the member a PNG to save to their
phone while the physical card ships.
You do not write any Python. You take the member record you already pulled from
the Membership MCP (get_membership) and the new serial returned by
reissue_card, then run the bundled script with those values as CLI flags.
Never invent a member, tier, or serial number — every value on the card comes from the MCP results. The script only draws the card; it does not decide anything.
When to use
Use this skill in the self-serve card reissue scenario, after:
get_membership(customer_id)confirmed the member and returned their details.- The member verified their identity (last 4 of the console serial).
reissue_card(customer_id, reason)deactivated the old card and returned anew_card_serial.
Use the PDF skill instead when an in-store associate needs a printable card. Use this PNG skill when the member needs an on-screen / saveable card.
Inputs (map MCP results → CLI flags)
| Script flag | Source |
|---|---|
--member-name |
get_membership.member_name |
--member-id |
get_membership.customer_id |
--tier |
get_membership.tier (e.g. "BlastPass Plus Extra") |
--tier-code |
get_membership.tier_code (plus | extra | mega) — drives accent color & perks |
--card-serial |
reissue_card.new_card_serial (the freshly minted card; falls back to get_membership.card_serial if not a reissue) |
--console-serial |
get_membership.console_serial |
--member-since |
get_membership.activation_date |
--valid-through |
get_membership.term_end_date |
--out |
optional output path (default blastpass_card.png) |
The --tier-code selects the card's accent color, header badge, and the perks line
printed beneath the card:
plus→ blue, "PLUS", 5% off + 10 BlastPoints/$1extra→ purple, "PLUS EXTRA", 10% off + 20% BlastPoints bonusmega→ orange, "MEGA!!!", 15% off + 50% BlastPoints + day-one exclusives
Workflow
1. Gather the confirmed values
From get_membership (tier, dates, console serial, name, id) and from
reissue_card (new_card_serial). Do not pass any value the MCP didn't return.
2. Run the bundled script
Pass the confirmed values as flags. The script writes blastpass_card.png to the
working directory (or --out) and prints a one-line confirmation:
python3 card_png.py \
--member-name "Jordan Pixel" \
--member-id MEGA-BLAST-1024 \
--tier "BlastPass Plus Extra" \
--tier-code extra \
--card-serial BLAST-A1B2-1024 \
--console-serial OMEGA-7F3A-1024 \
--member-since 2026-02-26 \
--valid-through 2027-02-26
--card-serial must be the new serial from reissue_card — never the old
(now-deactivated) one.
3. Hand back the image
Tell the member their new digital card is ready (blastpass_card.png), read back
the new card serial and tier so they can confirm it, and remind them the old
card is now deactivated and the physical replacement ships in ~7 days.
Notes
- The bundled script is
card_png.py, validated against the four mock members in the Membership MCP. It depends only onmatplotlib(available in the runtime). - The card serial shown is the new one from
reissue_card; the old serial is already deactivated server-side, so it must never appear on the card. - The barcode is decorative (deterministic from the card serial) — it is not a real scannable symbology.
- All data is mock; the card is for demo purposes only.
04 同仓库更多 Skills
退货换货单 PDF 生成
slip-pdf-generator
生成一份可打印的 BlastBox 退货 / RMA / 换货单据 PDF,供店员交给客户。在退货、保修换货、会员取消或升级流程结束且所有金额最终确定后使用。该技能运行内置的 Python 脚本,将确认后的单据数据渲染为真实的 PDF 文件。
会员积分对账与兑换
points-reconciliation
在复杂的消费流程(购买、退货、促销倍数、过期)之后,核对客户的 BlastPoints 会员积分余额,并将净余额转换为店铺消费额度。当店员询问某会员的积分时,或在应追回此前已赚取积分的退货之后使用。该技能运行内置的 Python 脚本,按基础赚取率、促销倍数、等级奖励、积分追回和过期规则计算,然后输出积分账目和可兑换的店铺消费额度。
按比例退款与换购结算
prorated-refund-calculator
当客户取消 BlastPass 会员资格时计算精确的分摊退款,以及瑕疵品换购更高价机型时的净结算金额。在商店策略代理(Store Policy Agent)确认退款规则且会员 MCP 返回会员详情后使用。该技能运行内置的 Python 脚本以确保计算精确。
电子会员卡 PNG 生成
membership-card-png
通过运行内置的 card_png.py 脚本,生成电子 BlastPass 会员卡的 PNG 图片。适用于会员自助补办遗失/被盗/损坏的卡片,或任何需要在屏幕上展示卡片(而非打印)的场景。该技能接收 Membership MCP(get_membership)返回的会员详情,以及 reissue_card 返回的 new_card_serial,并将它们作为命令行参数传递给内置的 Python(matplotlib)脚本,渲染出 CR80 尺寸的会员卡并生成真实的 PNG 文件。它仅根据已获取的值渲染卡片——从不自行查询任何信息或编造数据。
退货换货单据 PDF 生成
slip-pdf-generator
生成可打印的 BlastBox 退货 / RMA / 换货单据 PDF,供店员交给顾客。在退货、保修换货、会员取消或升级流程结束、所有金额最终确定后使用。该技能运行内置的 Python 脚本,将已确认的单据信息渲染为真实的 PDF 文件。
销售数据分析
sales-analysis
通过运行内置的 sales_analysis.py 脚本,将 Sales & Performance MCP 返回的原始每周销售数据和商品目录事实转化为商品分析数据。在季度末降价复盘中作为第一步使用,当经理想要了解某段时间内的畅销品和滞销/死库存时。MCP 仅返回原始数据,因此脚本会计算销售速度、库存周转周数和利润率,然后将畅销品和滞销品以结构化 JSON 格式打印输出。它不渲染任何图表(所有可视化由 merch-report-html 技能负责),也不决定折扣(将滞销品交由 markdown-optimizer 处理)。