AGENT SKILL

两地距离计算

distance-calculator

计算两个地点之间的大圆距离。当用户想知道两个城市、城镇或地点相距多远时使用。该技能会询问两个地点,通过网络搜索查询其地理坐标,然后用 Python 脚本计算距离。

适用职业普通用户
License 许可
MIT
最近更新
2026-11-14
Stars
★ 0
Forks
1

01 前言 Front Matter

name
distance-calculator
description
Calculate the great-circle distance between two locations. Use when the user wants to know how far apart two cities, towns, or places are. The skill asks for two locations, looks up their geographic coordinates via web search, then computes the distance with a Python script.

02 资源文件 1

03 SKILL.md 正文

Distance Calculator

This skill helps you calculate the distance between two locations on Earth.

When to use

Use this skill whenever the user asks something like:

  • "How far is it from Paris to Tokyo?"
  • "What's the distance between two cities?"
  • "Calculate the distance from A to B."

Workflow

Follow these steps in order.

1. Ask for the two locations

If the user has not already provided both locations, ask them:

Which two locations would you like to measure the distance between? Please give me a starting location and a destination (city, town, or place name — include the country/state if it might be ambiguous).

Do not guess. Wait until you have both locations clearly identified.

2. Find the coordinates

For each location, search the web to find its latitude and longitude in decimal degrees.

  • Search for something like: "<location name>" latitude longitude decimal degrees.
  • Record the latitude and longitude for each location.
  • Latitude is positive for North, negative for South.
  • Longitude is positive for East, negative for West.
  • If a location is ambiguous (multiple matches), ask the user to clarify before continuing.

3. Calculate the distance

Run the bundled distance.py script, passing the four coordinates:

python3 distance.py <lat1> <lon1> <lat2> <lon2>

For example, Paris (48.8566, 2.3522) to Tokyo (35.6762, 139.6503):

python3 distance.py 48.8566 2.3522 35.6762 139.6503

The script prints the distance in both kilometers and miles.

4. Report the result

Tell the user the distance in kilometers and miles, and restate the two locations and the coordinates you used so they can verify the lookup was correct.

Notes

  • The script computes the great-circle (as-the-crow-flies) distance using the haversine formula. It is not driving distance.
  • The Earth is modeled as a sphere with radius 6371 km, which is accurate to within ~0.5% for most purposes.

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

会员卡 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