skills/flympe/skills/workout-generator

workout-generator

SKILL.md

Workout Generator Skill

Generate a personalized 3-workout program (Push/Pull/Legs, 6 exercises each) powered by an AI fitness coach. The coach designs evidence-based programs with progressive overload, compound-first exercise ordering, and rep ranges tailored to your goals.

Payment (x402 Protocol)

This skill uses the x402 payment protocol. This is NOT a normal payment — do NOT broadcast a transaction on-chain yourself.

CRITICAL: How x402 Payment Works

x402 is a header-based payment protocol. The server handles settlement. You must follow this exact flow:

  1. POST to the endpoint — you will receive HTTP 402 Payment Required
  2. The 402 response body contains payment requirements (amount, recipient, asset, network)
  3. Sign a Solana transaction for the required USDC amount — but DO NOT broadcast it
  4. Base64-encode the signed transaction and attach it as the X-PAYMENT header
  5. Retry the same POST request with the X-PAYMENT header included
  6. The server's facilitator verifies the signed transaction, broadcasts it on-chain, and returns the workout data

DO NOT send money directly to the recipient wallet. The facilitator must be the one to broadcast the transaction. If you broadcast it yourself, the server will never see your payment proof and you will lose your funds without receiving data.

x402 Request Flow

# Step 1: Initial request (gets 402)
POST https://workout-rho-eight.vercel.app/api/agent/generate-workouts
Content-Type: application/json

{"userPreferences": "Full gym, hypertrophy, intermediate"}

# Response: HTTP 402 with JSON body containing payment requirements

# Step 2: Sign transaction (DO NOT BROADCAST), then retry with header
POST https://workout-rho-eight.vercel.app/api/agent/generate-workouts
Content-Type: application/json
X-PAYMENT: <base64-encoded-signed-transaction>

{"userPreferences": "Full gym, hypertrophy, intermediate"}

# Response: HTTP 200 with workout data

Endpoint

POST https://workout-rho-eight.vercel.app/api/agent/generate-workouts
Content-Type: application/json

{
  "userPreferences": "Equipment: Full gym. Goals: Hypertrophy. Experience: Intermediate. No shoulder injuries."
}

Response

{
  "workouts": [
    {
      "type": "Push",
      "exercises": ["Flat Barbell Bench Press", "Incline Dumbbell Press", "Overhead Press", "Cable Flyes", "Lateral Raises", "Tricep Pushdowns"]
    },
    {
      "type": "Pull",
      "exercises": ["Barbell Rows", "Weighted Pull-ups", "Cable Rows", "Face Pulls", "Barbell Curls", "Hammer Curls"]
    },
    {
      "type": "Legs",
      "exercises": ["Barbell Back Squats", "Romanian Deadlifts", "Leg Press", "Walking Lunges", "Leg Curls", "Calf Raises"]
    }
  ]
}

Preferences Guide

The userPreferences field is free-text. Include any of the following for better results:

  • Equipment: Gym, home, dumbbells only, bodyweight
  • Goals: Strength, hypertrophy, endurance, general fitness
  • Experience: Beginner, intermediate, advanced
  • Injuries/limitations: Any joints or movements to avoid
  • Training style: Powerlifting, bodybuilding, functional, athletic

Error Handling

  • Wallet not configured — prompt the user to set up lobster.cash before proceeding
  • Not enough balance — inform the user they need at least 0.01 USDC and ask them to fund their lobster.cash wallet
  • Payment failure — display a clear error message and allow the user to retry
  • Generation failure (500) — the AI coach occasionally fails; retry the request (payment is only settled on success)

Discovery

Skill metadata is available at:

GET https://workout-rho-eight.vercel.app/api/skill-manifest

Returns pricing, endpoint details, and facilitator information as JSON.

Weekly Installs
4
Repository
flympe/skills
First Seen
3 days ago
Installed on
openclaw3
gemini-cli3
claude-code3
github-copilot3
codex3
kimi-cli3