Templates · Health & Fitness

Log a workout from a sentence

Turn "I just ran 5K in 28 minutes" into a logged session, and know when to ask instead of guessing the activity.

Example template for a hypothetical workout tracking app. It is not taken from any shipping app. Rename the tools to match your own App Intents titles.

Tools this skill expects

  • Find Activity Types
  • Log Workout
  • Get Recent Workouts

SKILL.md

Skills.skillsbundle/Skills/log-workout/SKILL.md

---
name: log-workout
description: Log a workout the user just finished or did earlier. Use when the user says they ran, walked, cycled, swam, lifted, or trained, or asks to log, record, or add a workout. Not for planning future workouts or reading stats.
---

# Log a Workout

Work out the activity, duration, and distance from what the user said. "Just now" means it ended a few minutes ago. "This morning" means before noon today.

1. Use the Find Activity Types tool to match the activity. If the user's word fits more than one type, for example "training", ask which one.
2. Before logging, use the Get Recent Workouts tool for today. If a workout of the same type already exists within the same hour, ask whether this is a new one or the same session.
3. Use the Log Workout tool. Leave distance empty if the user didn't give one; don't estimate it.

## Don't

- Don't convert units the user didn't ask to convert.
- Don't log more than one workout from a single request unless the user listed several.
Open in validator

Or install it into your bundle: npx siriskills add log-workout --bundle MyApp/Skills.skillsbundle

View on GitHub · Improve this skill

Why this works

It defines the app’s vocabulary. “Just now” and “this morning” mean specific things in this app. That kind of context can’t live in any single tool’s metadata, which is exactly what Apple says skills are for.

It prevents duplicates. Step 2 makes the model check before writing. A tool description can say what the tool does; it can’t say “check another tool first”. That’s orchestration, and it belongs in a skill.

It says when to ask. Ambiguous words like “training” get a question, not a guess.

Adapt it

  • If your app reads workouts from HealthKit automatically, add a line telling the model to check for an imported session first.