Contents

How to use Claude to create a custom exercise program

How to use Claude to create a custom exercise program

Recently, I decided to get back into regular exercise after a long period of inactivity. Rather than following a generic workout plan from a fitness app, I wanted something personalized to my specific situation, equipment, and goals. I turned to Claude to help me create a comprehensive four-week exercise program. The results seem great so far.

Here’s how to get an AI to design something that actually works for you.

Starting with the right prompt

The key to getting a useful exercise program from Claude is being specific about your situation. I provided details about:

  • My current fitness level and recent activity history
  • My specific goals (rebuilding strength and cardio endurance)
  • Equipment I had available (resistance bands, household stairs, a yoga mat, and a Nintendo Switch with Ring Fit Adventure)
  • My constraints and needs (requiring detailed exercise descriptions since I’m a structured exercise novice)

Claude responded with a complete four-week program that included exercises, nutrition guidance, progress tracking suggestions, and motivational tips. The level of detail was just about right. Each exercise came with form instructions and links to video demonstrations.

The workout schedule

To get concrete, actionable guidance rather than generic advice, I asked for a full 28-day calendar with specific day-of-week workouts:

  • Monday, Wednesday, Friday: Strength training
  • Tuesday, Thursday: Light cardio and mobility work
  • Saturday: Optional gentle recovery
  • Sunday: Complete rest

The program also showed clear progression across the four weeks. Week 1 started with wall pushups and assisted squats to build a foundation. By Week 4, I was doing incline pushups, unassisted bodyweight squats, and using resistance bands for rows and shoulder presses.

Sometimes the exercises look a bit too easy, so I’m interested to see how this progressive schedule will work in practice. And I can always adjust the plan later if needed.

From text to calendar

The written workout schedule (and exercise descriptions, and diet advice, etc) was great, but I wanted something I could actually put in my calendar. I asked Claude to generate an .ics file that I could import into my calendar app.

Claude’s first attempt had a bug. It skipped December 25th (Christmas Day), which threw off all the subsequent dates. To avoid this kind of error and make things easier to test, fix, and update later, I asked Claude create a script to generate the calendar instead of manually coding each event.

This worked out well for a few reasons:

  1. The script was much easier to debug and verify
  2. I now have a reusable tool that I can modify if I want to adjust the schedule or create future workout programs
  3. The initial script had a small bug, but it was easy to fix through an iterative conversation with Claude.

Here’s what the core of the calendar generation script looks like:

def create_event(date, day_of_week, week_num, location='Home'):
    """Create an iCalendar event string"""
    week_key = f'week{week_num}'
    workout = WORKOUTS.get(day_of_week, {}).get(week_key)
    
    if not workout:
        return None
    
    event = ['BEGIN:VEVENT']
    
    if workout.get('all_day'):
        # All-day event for rest days
        event.append(f'DTSTART;VALUE=DATE:{format_date(date)}')
        event.append(f'DTEND;VALUE=DATE:{format_date(date)}')
    else:
        # Timed event with duration
        start_hour = 10 if day_of_week == 'saturday' else 9
        start_time = date.replace(hour=start_hour, minute=0)
        duration = workout.get('duration', 30)
        end_time = start_time + timedelta(minutes=duration)
        
        event.append(f'DTSTART:{format_datetime(start_time)}')
        event.append(f'DTEND:{format_datetime(end_time)}')
    
    # Add event details
    event.append(f'SUMMARY:{workout["summary"]}')
    event.append(f'DESCRIPTION:{workout["description"]}')
    
    return '\n'.join(event)

The script organizes workouts in a dictionary structure, making it easy to modify individual workouts without touching the calendar generation logic. Each day’s workout includes the exercises, duration, and detailed descriptions that show up in my calendar. It’s not perfect and it lacks some features and finesse, but for quick generation that’s easy to tweak, it’s exactly what I needed.

When I tried the initial script, I noticed it was using a deprecated Python function (datetime.utcnow()). After the issue was mentioned, Claude corrected it by switching to the modern timezone-aware approach:

# Old (deprecated)
datetime.utcnow()

# New (timezone-aware)
datetime.now(timezone.utc)

I’m not sure why it wasn’t correct in the first place, since Claude did run and test the code before sharing it with me. Perhaps because it was “only” a warning? In any case, Claude is pretty good at iterative improvement and this was quickly resolved.

What worked well

Personalization

The more specific I was about my context, the better the recommendations. If you want to the AI to tailor something specific for you, then has to know some specifics about you. Tell it about your equipment, experience level, and goals.

Detailed instructions

As someone without much fitness experience, I needed more than just exercise names. The AI provided form basic instructions, video links, and safety notes.

Progress tracking

Ask for suggestions around measuring improvements beyond just body weight. Like how many reps of an exercise to target or long to do things like holding a plank.

Nutrition guidance

If you’re looking to build muscle, then protein targets based on weight will help. Practical examples of how to hit those numbers throughout the day is also nice.

Code as a deliverable

Getting a Python script rather than just a static file means I have a tool I can reuse and modify. If I want to adjust the workout times or change which days are rest days, I can do that easily.

What could be better

The experience wasn’t perfect. A few observations:

Video links sometimes incorrect

The form instruction videos Claude linked to are YouTube videos that weren’t always for the exact exercise that was recommended. Fortunately, the written descriptions were often good enough to figure things out.

Claude on the web doesn’t do Ruby

While I asked for a Ruby script to generate the calendar, Claude on the web only supports Python for something it can test. In fact, it insisted on using Python when it couldn’t get Ruby to install in its sandbox. Not a big deal, but something to be aware of if you prefer a specific programming language.

The bigger picture

This experience taught me that Claude can be genuinely useful for creating structured, personalized plans in domains where you need expertise but don’t have it yourself. The key is to:

  1. Be specific about your situation and constraints
  2. Ask for deliverables in formats you can actually use (calendar files, scripts, documents)
  3. Iterate when something isn’t quite right
  4. Take what you get and make it your own
  5. It’s easy to fool yourself into thinking that the AI is doing a great job if you don’t have the expertise to evaluate the output. Be critical and test things out. If it’s medical advice, check with a professional.

It’s good to have a template now for creating custom exercise programs. Next time I want to get back into shape or continue the existing program, I can just tweak the prompt and have a new plan generated.

Speaking of templates…

Creating your own custom exercise program

If you want to create your own custom exercise program, here’s this basic template I used:

You are an expert AI personal trainer. Please create a customized
exercise plan for me.

Current fitness level: [Describe your recent activity, strength level, 
and any relevant history]

Goals: [What do you want to achieve?]

Available equipment: [List everything you have access to]

Constraints: [Time limitations, experience level, injuries, etc.]

Request: Create a [duration] exercise plan that includes:
- A daily workout schedule with specific exercises, sets, and reps
- Detailed descriptions and/or video links for proper form
- Progress tracking suggestions
- Nutritional guidance to support my goals
- Motivational tips

Please format the schedule as a table showing what to do each day.

Then, if you want a calendar file:

Create a Python script that generates an `.ics` file that I can import into my
calendar. This will be easier to debug and modify.

You can ask for the .ics file directly, but it may be more error-prone.

The nice thing about this approach is the customized nature of it. What we used to get from fitness apps was generic plans based on broad categories of users. Now, we can get something tailored to our individual needs. Not just picking from a set of predefined workout templates. And since it is tailored to you, and generated on demand, having the calendar file is also a big plus.


Illustration by VectorElements on Unsplash