agentsclimarketplace

Run2 earthquake time conversion

Skill cxcscmu/SkillLearnBench/skills/b3-teacher-feedback-claude-opus-4-6/earthquake-plate-calculation/run2_earthquake-time-conversion

Converting earthquake timestamps from USGS GeoJSON format (epoch milliseconds) to ISO 8601 format for output.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill run2_earthquake-time-conversion

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

1.0 KB, 240 tokens by cl100k_base, as published. Nobody here has run it

USGS Earthquake Time Format

USGS earthquake GeoJSON data stores time as epoch milliseconds (integer). To convert to ISO 8601:

import pandas as pd

# If time is in milliseconds since epoch
time_ms = 1704067200000  # example
time_iso = pd.to_datetime(time_ms, unit='ms', utc=True).strftime('%Y-%m-%dT%H:%M:%SZ')

Handling different possible formats

def convert_time(time_val):
    """Convert USGS earthquake time to ISO 8601."""
    if isinstance(time_val, (int, float)):
        return pd.to_datetime(time_val, unit='ms', utc=True).strftime('%Y-%m-%dT%H:%M:%SZ')
    elif isinstance(time_val, str):
        return pd.to_datetime(time_val, utc=True).strftime('%Y-%m-%dT%H:%M:%SZ')
    else:
        return pd.to_datetime(time_val, utc=True).strftime('%Y-%m-%dT%H:%M:%SZ')

The output format must be: YYYY-MM-DDTHH:MM:SSZ

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,852. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.