strava-api/SKILL.md
Universal Strava API integration for fitness data management. Use when working with Strava activities, athlete profiles, segments, routes, clubs, or any fitness tracking data. Triggers on requests to get/create/update activities, analyze training stats, export routes, explore segments, or interact with Strava data programmatically.
npx skillsauth add kdoronin/claude_code_skills strava-apiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Direct integration with Strava API v3 for fitness data management.
IMPORTANT: All secrets are stored in system keychain (macOS Keychain / Linux Secret Service).
~/.strava/metadata.jsonThis design ensures your API credentials are never exposed to AI agents.
When user requests Strava data for the first time:
python3 scripts/strava_api.py athlete
If error "Strava not configured" → proceed to Step 2. If success → skip to "Using the API" section.
Guide user to create API application:
http://localhostlocalhostpython3 scripts/setup_oauth.py
Script will:
~/.strava/metadata.jsonpython3 scripts/strava_api.py athlete
Should display athlete profile JSON.
# Get athlete profile
python3 scripts/strava_api.py athlete
# Get athlete stats
python3 scripts/strava_api.py stats
# List recent activities
python3 scripts/strava_api.py activities --limit 20
# Get specific activity
python3 scripts/strava_api.py activity 12345678
# Explore segments in area
python3 scripts/strava_api.py segments "37.7,-122.5,37.8,-122.4" --type running
# Raw API request
python3 scripts/strava_api.py raw GET /athlete/zones
python3 scripts/strava_api.py raw POST /activities --data '{"name":"Test","sport_type":"Run","start_date_local":"2024-01-15T10:00:00Z","elapsed_time":1800}'
from scripts.strava_api import StravaClient
client = StravaClient() # Auto-loads from keychain, refreshes token if needed
# Get athlete
athlete = client.get_athlete()
# List activities
activities = client.list_activities(per_page=50)
# Create activity
new_activity = client.create_activity(
name="Morning Run",
sport_type="Run",
start_date_local="2024-01-15T07:30:00Z",
elapsed_time=1800,
distance=5000
)
Tokens refresh automatically. Check status:
# Check token status
python3 scripts/refresh_token.py --status
# Force refresh
python3 scripts/refresh_token.py --force
User Request
├── First time / "setup strava" → Run setup_oauth.py
├── "Get my profile/stats" → strava_api.py athlete/stats
├── "List my activities" → strava_api.py activities
├── "Get activity details" → strava_api.py activity {id}
├── "Create/log activity" → client.create_activity()
├── "Update activity" → client.update_activity()
├── "Get training data/streams" → client.get_activity_streams()
├── "Find segments nearby" → strava_api.py segments {bounds}
├── "Export route" → raw GET /routes/{id}/export_gpx
└── "Token expired" → Auto-handled by client
| Item | Value |
|------|-------|
| Secrets storage | System Keychain (secure) |
| Metadata location | ~/.strava/metadata.json |
| Base URL | https://www.strava.com/api/v3 |
| Rate limits | 100 req/15min, 1000 req/day |
| Token lifetime | 6 hours (auto-refresh) |
References:
Run, TrailRun, VirtualRunRide, MountainBikeRide, GravelRide, EBikeRideSwim, Walk, Hike, Workout, WeightTraining, Yoga| Status | Meaning | Action | |--------|---------|--------| | 401 | Token expired | Auto-handled by client | | 403 | Insufficient scope | Re-run setup_oauth.py | | 404 | Resource not found | Check ID | | 429 | Rate limit | Wait 15 min |
data-ai
Setup and use text-to-SQL capabilities for SQL databases (SQLite, PostgreSQL, MySQL, MariaDB, etc.). Use when: (1) User wants to query databases using natural language, (2) User asks to setup text-to-sql project, (3) User mentions extracting data from database, (4) User has .sqlite/.db file or database credentials and wants to work with data. This skill sets up project structure, extracts database schema, and enables natural language to SQL conversion.
development
This skill orchestrates programming tasks by analyzing available Claude Code skills and creating execution plans. It should be used when working on any coding task that could benefit from multiple specialized skills. The skill supports two execution modes selected by user - manual (Claude executes with explicit skill references) or delegated (tasks sent to sub-agents with skills).
tools
Bootstrap new or existing local projects for AI-assisted development by creating an `AGENTS.md` for Codex or a `CLAUDE.md` for Claude Code from the bundled rules template, wiring project-local MCP servers for Playwright and shadcn/ui, and initializing Git with a first checkpoint commit when needed. Use whenever the user asks to start a project with agent instructions, scaffold a repo for Codex or Claude Code, add local MCP servers to a project, or standardize an AI-ready project workspace before implementation begins.
development
Template for creating Claude Code skills. Replace this description with a clear explanation of what this skill does and when it should be used. Be specific about triggers and use cases.