agentleFS
abalmeoabalmeo/claude-skill-japan-recs/travel-map/SKILL.md

travel-map

Skill1 starsChanged 9 months agoMITView on GitHub

Generate a color-coded KML map from a Google Sheet with travel data (itinerary, restaurants, bars, shopping). Produces a file importable into Google My Maps.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. drolosoft/immich-photo-manager★ 62same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository2 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. About 0 are common, 9 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read a travel planning Google Sheet and generate a color-coded KML file that can be imported into Google My Maps.

    line 12
  2. Very specific:

    Add an <ExtendedData> element to each Placemark with a category field:

    line 20
  3. Distinctive:

    After importing, the user clicks the layer's style dropdown → "Style by" → "category" to get 6 groups, then assigns colors per group.

    line 30
  4. Distinctive:

    ID: If it's a long alphanumeric string (with hyphens/underscores), use directly

    line 64
  5. Distinctive:

    Name search: Search Google Drive:

    line 65
  6. Distinctive:

    Only create placemarks from rows that have BOTH a name/activity AND an address

    line 117
  7. Distinctive:

    Use the most recent day header as context in the placemark description

    line 118
  8. Distinctive:

    Write parsed data to a temp JSON file, then run an inline Python script.

    line 128
  9. Very specific:

    ExtendedData: Add <ExtendedData><Data name="category"><value>Category</value></Data></ExtendedData> to each placemark

    line 136
  10. Very specific:

    If coordinates found → use <Point><coordinates>lng,lat,0</coordinates></Point>

    line 143
  11. Very specific:

    If no coordinates but address exists → use <address> element

    line 144
  12. Distinctive:

    If neither (only a search query URL) → skip the placemark and warn (Google My Maps cannot geocode query-only URLs)

    line 145
  13. Very specific:

    Only include fields that have values.

    line 158
  14. Very specific:

    Output: Write to ~/Desktop/{sanitized_title}.kml where sanitized_title strips unsafe filesystem characters.

    line 160
  15. Distinctive:

    After generating the KML, print:

    line 164
  16. Very specific:

    Always pass params via a variable to avoid !

    line 178

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Travel Map — KML Generator from Google Sheets

Read a travel planning Google Sheet and generate a color-coded KML file that can be imported into Google My Maps.

Style & Color-Coding Reference

Google My Maps ignores standard KML <Style> blocks for color-coding in most real-world imports (large files, nested folders, address-based placemarks). After extensive testing, the reliable approach uses two complementary methods:

Method 1: ExtendedData "category" field (primary — enables "Style by" in Google My Maps)

Add an <ExtendedData> element to each Placemark with a category field:

<ExtendedData>
  <Data name="category">
    <value>Restaurant</value>
  </Data>
</ExtendedData>

After importing, the user clicks the layer's style dropdown → "Style by" → "category" to get 6 groups, then assigns colors per group.

Method 2: Name prefix (secondary — visual fallback)

Prefix each placemark name with the category: [Restaurant] Fuunji, [Reservation] ★ Muscle Girls [BOOKED], [Bar] Bar Rpm, etc. This makes categories visible even without color-coding.

Method 3: KML Style + StyleMap (included but unreliable)

Include Google My Maps proprietary styles as a best-effort fallback. These work in small files but not reliably in large imports:

  • Icon URL: https://www.gstatic.com/mapspro/images/stock/503-wht-blank_maps.png
  • Style ID convention: icon-1899-{HEX}-normal / icon-1899-{HEX}-highlight
  • StyleMap: pairs normal + highlight; Placemarks reference via <styleUrl>#icon-1899-{HEX}</styleUrl>
  • Color format: ff + RRGGBB (NOT standard KML AABBGGRR)
  • hotSpot: <hotSpot x="32" xunits="pixels" y="64" yunits="insetPixels" />

Color Mapping

CategoryPrefixColorHex
reservation[Reservation]RedDB4437
planned[Planned]OrangeFF8B00
restaurant[Restaurant]YellowF4EB37
bar[Bar]Purple7B1FA2
shopping[Shopping]Blue0288D1
accommodation[Accommodation]Green0F9D58

Workflow

Step 1: Resolve Spreadsheet

Parse the user's argument to get a spreadsheet ID:

  • URL: Extract ID via regex from https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/...
  • ID: If it's a long alphanumeric string (with hyphens/underscores), use directly
  • Name search: Search Google Drive:
    gws drive files list --params '{"q": "name contains '\''ARG'\'' and mimeType = '\''application/vnd.google-apps.spreadsheet'\''", "fields": "files(id, name)"}'

Validate access and get metadata (title + tab names):

PARAMS='{"spreadsheetId":"SHEET_ID","fields":"properties.title,sheets.properties"}'
gws sheets spreadsheets get --params "$PARAMS"

Step 2: Classify Tabs

Auto-classify each tab by keyword matching on the tab name (case-insensitive):

Keywords in tab nameCategoryPin Color
restaurant, food, dining, eatrestaurantYellow
bar, drink, nightlife, pub, hopbarPurple
shop, shopping, storeshoppingBlue
itinerary, schedule, plan, activityplannedOrange
accommodation, hotel, airbnb, stayaccommodationGreen
flight, train, transport, expense, budget, cost, question, reference, old, checklistskip—

Rules:

  • Hidden tabs (hidden: true in sheet properties) → skip by default
  • Unmatched tabs → ask the user to classify or skip
  • Present the full classification to the user for confirmation before proceeding

Step 3: Read & Parse Data

For each included tab, read all values:

PARAMS='{"spreadsheetId":"SHEET_ID","range":"TAB_NAME"}'
gws sheets spreadsheets values get --params "$PARAMS"

Column detection — Find the header row (first row with 3+ non-empty cells), then match columns case-insensitively:

Data fieldColumn name matches
Name"name", "activity", "place" — or fall back to first text column
Address"address", "location"
Google Maps URL"google maps", "maps", "map link", "google maps link"
Status"status", "booking"
Notes"notes", "known for", "description"
Price"price", "cost"
Time"time"
Area"area", "neighborhood"

Itinerary tab special handling (tabs classified as planned):

  • Detect day headers: rows matching day-of-week patterns like "FRIDAY", "SATURDAY", "DAY 1", etc.
  • Only create placemarks from rows that have BOTH a name/activity AND an address
  • Use the most recent day header as context in the placemark description
  • Skip section headers, audible/backup lists, and reference-only rows

Row skip logic (apply to ALL tabs):

  • Skip rows where name AND address are both empty
  • Skip rows that look like category headers (emoji + uppercase text with no address)
  • Skip rows that are just notes/lists without a place name

Step 4: Generate KML via Python

Write parsed data to a temp JSON file, then run an inline Python script.

The Python script MUST:

  1. Use xml.etree.ElementTree for all XML generation — NO string concatenation for XML content. This prevents escaping bugs with &, <, > in names/descriptions.
  2. Color-coding — apply all three methods from the Style Reference:
    • Name prefix: Prefix each placemark name with [Category] (e.g., [Restaurant] Fuunji)
    • ExtendedData: Add <ExtendedData><Data name="category"><value>Category</value></Data></ExtendedData> to each placemark
    • KML styles: Generate Style + StyleMap blocks at Document level using gstatic icon + color tint (best-effort; see Style Reference for details)
  3. Reservation override: Any row where the Status column matches (case-insensitive) "booked", "reserved", or "confirmed" gets #reservation style — regardless of which tab/category it came from. This is CRITICAL.
  4. Coordinate extraction from Google Maps URLs:
    • Try regex @(-?\d+\.\d+),(-?\d+\.\d+) to extract lat/lng from the URL
    • If coordinates found → use <Point><coordinates>lng,lat,0</coordinates></Point>
    • If no coordinates but address exists → use <address> element
    • If neither (only a search query URL) → skip the placemark and warn (Google My Maps cannot geocode query-only URLs)
  5. Folder organization:
    • One KML <Folder> per tab
    • For restaurant tabs: if category header rows exist (emoji + uppercase text like "🍜 RAMEN"), create sub-<Folder> elements for each category group
  6. Description assembly: Build from available columns:
    Time | Price | Area
    Notes/Known For
    Status: {status}
    Maps: {google_maps_url}
    Only include fields that have values. Use <description> with CDATA or properly escaped text.
  7. Output: Write to ~/Desktop/{sanitized_title}.kml where sanitized_title strips unsafe filesystem characters.

Step 5: Report Results

After generating the KML, print:

  • Output file path
  • Placemark counts by category/color (table format)
  • Any rows skipped and why (missing address, vague location, etc.)
  • Warnings for vague addresses matching patterns like "Near X", single ward name, just "Tokyo, Japan"
  • Import instructions:
To import: Google My Maps → Create new map → Import → upload the KML file

GWS CLI Reference

Shell escaping

Always pass params via a variable to avoid ! escaping issues:

PARAMS='{"spreadsheetId":"SHEET_ID","range":"TabName!A1"}'
gws sheets spreadsheets values get --params "$PARAMS"

Get spreadsheet metadata

PARAMS='{"spreadsheetId":"SHEET_ID","fields":"properties.title,sheets.properties"}'
gws sheets spreadsheets get --params "$PARAMS"

Read tab data

PARAMS='{"spreadsheetId":"SHEET_ID","range":"Tab Name"}'
gws sheets spreadsheets values get --params "$PARAMS"

Read multiple ranges at once

PARAMS='{"spreadsheetId":"SHEET_ID","ranges":["Tab1","Tab2","Tab3"]}'
gws sheets spreadsheets values batchGet --params "$PARAMS"

Search Google Drive for spreadsheets

gws drive files list --params '{"q": "name contains '\''SEARCH_TERM'\'' and mimeType = '\''application/vnd.google-apps.spreadsheet'\''", "fields": "files(id, name)"}'

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.