AGENT SKILL

distance-calculator

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.

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

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.

文档处理
★ 0
microsoft
microsoft/new-copilot-studio-tech-guide-kr

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.

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

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.

Skill与智能体开发
★ 0
microsoft
microsoft/new-copilot-studio-tech-guide-kr

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.

图像与多媒体Skill与智能体开发
★ 0
microsoft
microsoft/new-copilot-studio-tech-guide-kr

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.

图像与多媒体Skill与智能体开发
★ 0
microsoft
microsoft/new-copilot-studio-tech-guide-kr

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.

文档处理
★ 0