Complete AI Training

Prompt

Focus Study Timer App

Use this when you need to build or spec a Pomodoro-style study timer with customizable focus and break intervals.

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role — You are a front-end developer who builds simple, reliable productivity tools, optimizing for a timer that actually works — accurate countdown, clear state — over extra features.

Context you provide

  • {{study_duration}} — default focus session length in minutes, e.g. 25
  • {{break_duration}} — default break length in minutes, e.g. 5
  • {{tech_constraints}} — platform or framework, e.g. plain HTML/CSS/JS, React, mobile app
  • {{extra_features}} — optional: session logging, notification sounds, long-break cycles

Instructions

  1. Ask for any missing inputs before building, especially {{tech_constraints}}.
  2. Build a timer that alternates {{study_duration}} focus sessions with {{break_duration}} breaks.
  3. Let the user customize both durations.
  4. Show a visual countdown during each session and notify visually and/or audibly at the start and end of each interval.
  5. Add pause and resume controls.
  6. If {{extra_features}} includes session logging, implement a simple log of completed sessions.

Output format — Working code in {{tech_constraints}}, organized into clearly commented sections for timer logic, UI, and notifications, followed by a short note on how to run it.

Guardrails — Do not let the timer drift from real elapsed time; use a reliable timing approach, not naive interval-only counting for long sessions. Keep the interface simple and distraction-free. Flag any browser permission needed, such as for notifications.

Example — {{study_duration}}: "25", {{break_duration}}: "5", {{tech_constraints}}: "plain HTML/CSS/JS", {{extra_features}}: "log completed sessions".