A OpenClaw plugin that turns any group chat into a Strava fitness competition. ClawDrill acts as a charismatic coach — tracking active minutes, running a live leaderboard, and trash-talking the bottom of the pack with love.
- Auto-created agent — installs itself as a
clawdrillagent on first gateway start - Group leaderboard — ranks members by active minutes in the last 7 days (from Strava)
- Auto-sync — refreshes Strava data in the background when it goes stale
- Secure token storage — Strava OAuth2 tokens are encrypted at rest with AES-256-GCM
- Editable persona — change the coach's voice without touching any code
- OpenClaw gateway
- A Strava API application (free)
openclaw plugins install /path/to/clawdrillFor local development, use --link so OpenClaw references the folder directly instead of copying it:
openclaw plugins install --link /path/to/clawdrillStep 1 — Create a Strava app (once, by the bot owner)
- Go to https://www.strava.com/settings/api and create an application
- Note your Client ID and Client Secret
Step 2 — Configure ClawDrill in chat
Send the credentials to the ClawDrill agent in chat:
Set up Strava: client ID is
12345, client secret isabc...xyz
The first person to do this becomes the admin — their sender ID is stored and only they can update the credentials later. No config file editing needed.
Step 3 — Each competitor connects their Strava account
Each user completes the Strava OAuth flow to get their personal refresh_token, then shares it in chat:
Connect my Strava:
abc...xyz
ClawDrill calls clawdrill_connect_strava and immediately syncs their activities.
Edit persona/coach.txt to change the coach's personality, rules, and tone. Plain text — no code required. Restart the gateway to apply changes.
Edit clawdrill.config.ts:
| Setting | Default | Description |
|---|---|---|
STALE_THRESHOLD_MINUTES |
30 |
How long before Strava data is re-synced automatically |
PERSONA_FILE |
./persona/coach.txt |
Path to the coach persona file |
clawdrill/
├── index.ts # Plugin entry point — hooks and tools
├── clawdrill.config.ts # User-editable settings
├── persona/
│ └── coach.txt # Coach personality (edit freely)
└── src/
├── crypto.ts # AES-256-GCM token encryption
├── storage.ts # Data model and file I/O
├── strava.ts # Strava OAuth2 and activities API
└── leaderboard.ts # Leaderboard logic and formatting
| Tool | Description |
|---|---|
clawdrill_setup |
Save Strava app credentials — first caller becomes admin, only they can change them later |
clawdrill_save_name |
Save a member's display name |
clawdrill_connect_strava |
Connect a Strava account via refresh token |
clawdrill_sync_activities |
Manually refresh Strava data (me or all) |
- Strava tokens and the app client secret are encrypted with AES-256-GCM before being written to disk
- The encryption key is stored at
{stateDir}/clawdrill/.keywith0o600permissions - Credentials are entered via chat and never stored in config files
- Group data files are written with
0o600permissions via OpenClaw's atomic file writer
MIT