AGENT SKILL

会员卡 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
★ 0
Forks
1

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:

  1. get_membership(customer_id) confirmed the member and returned their details.
  2. The member verified their identity (last 4 of the console serial).
  3. reissue_card(customer_id, reason) deactivated the old card and returned a new_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/$1
  • extra → purple, "PLUS EXTRA", 10% off + 20% BlastPoints bonus
  • mega → 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 on matplotlib (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

microsoft
microsoft/new-copilot-studio-tech-guide-kr

退货换货单据 PDF 生成

slip-pdf-generator

生成一份可打印的 BlastBox 退货 / RMA / 换货单据(PDF 格式),供店员交给顾客。在退货、保修换货、会员取消或升级流程结束且所有金额最终确认后使用。该技能运行内置的 Python 脚本,将确认后的单据数据渲染为真实的 PDF 文件。

零售门店店员文档处理
★ 0
microsoft
microsoft/new-copilot-studio-tech-guide-kr

会员积分对账与兑换

points-reconciliation

在复杂的消费流程(购买、退货、促销倍数、过期)之后,核对客户的 BlastPoints 会员积分余额,并将净余额转换为门店购物金(store credit)。当店员询问会员积分时,或在退货后需要追回此前已发放的积分时使用。该技能运行内置的 Python 脚本,应用基础积分获取率、促销倍数、等级奖励、积分追回和过期规则,然后输出积分台账和可兑换的门店购物金金额。

零售门店店员会员忠诚度管理
★ 0
microsoft
microsoft/new-copilot-studio-tech-guide-kr

会员退款与换购结算计算

prorated-refund-calculator

计算顾客取消 BlastPass 会员时的精确按比例退款,以及将有缺陷设备换购更高价机型时的净结算金额。在门店政策智能体(Store Policy Agent)确认退款规则、Membership MCP 返回会员详情后使用。该技能运行内置的 Python 脚本以确保计算精确无误。

计费专员计费与发票管理
★ 0
microsoft
microsoft/new-copilot-studio-tech-guide-kr

会员卡 PNG 图片生成

membership-card-png

通过运行内置的 card_png.py 脚本,生成 BlastPass 电子会员卡的 PNG 图片。适用于会员自助补办丢失 / 被盗 / 损坏的卡,或任何需要在屏幕上展示卡(而非打印)的场景。该技能接收 Membership MCP(get_membership)返回的会员详情,以及 reissue_card 返回的新卡序列号 new_card_serial,将它们作为命令行参数传给内置的 Python(matplotlib)脚本,渲染出 CR80 尺寸的会员卡并生成真实 PNG。它仅根据已获取的值渲染卡面——绝不自行查询或虚构数据。

客户支持专员会员忠诚度管理
★ 0
microsoft
microsoft/new-copilot-studio-tech-guide-kr

退货换货单据 PDF 生成

slip-pdf-generator

生成可供打印的 BlastBox 退货 / RMA / 换货单据 PDF,供店员交给顾客。在退货、保修换货、会员取消或升级流程结束、所有金额最终确认后使用。该技能运行内置的 Python 脚本,将确认后的单据数据渲染为真实的 PDF 文件。

零售门店店员零售门店运营与促销执行
★ 0
microsoft
microsoft/new-copilot-studio-tech-guide-kr

销售数据分析与滞销品识别

sales-analysis

通过运行捆绑的 sales_analysis.py 脚本,将来自 Sales & Performance MCP 的原始每周销售数据和商品目录事实转化为商品分析。在季度末降价复盘中作为第一步使用,适用于经理想了解某段时期内的畅销商品和滞销/呆滞库存的情况。该 MCP 仅返回原始数据,因此脚本会计算销售速度、库存覆盖周数和利润率,然后以结构化 JSON 形式打印畅销商品和滞销商品。它不渲染任何图表(所有可视化由 merch-report-html 技能负责),也不决定折扣(将滞销商品交给 markdown-optimizer 处理)。

数据分析师数据分析与报告
★ 0