How I Built 50+ Dynamic Greetings Using Claude Code
Replacing 8 static words with time-aware messages — and learning why iteration beats perfection
Ingredients
- Claude Code — terminal-based AI for direct file editing and iteration ($200/yr)
- Next.js — React framework with client-side hooks (free)
- 8 static words — “finance background, product focus / using AI to build” (free to replace)
- Patience for copy iteration — first drafts are never the keepers (priceless)
The Problem: Static Text Is Boring
The homepage hero had 8 words that never changed: “finance background, product focus / using AI to build.” Accurate, but lifeless. Every visitor saw the exact same text whether they landed at 7am on a Tuesday or midnight on Saturday. No personality. No context. No Goose.
The idea: replace those 8 words with time-aware greetings that acknowledge what’s actually happening — morning coffee, midday work, afternoon dog walks, evening wind-down, late-night building. Weekday greetings could reference markets and meetings. Weekend greetings could be about beach trips and trail runs. Make the site feel alive.
The Build: 45 Minutes of Code, 90 Minutes of Copy
Pace: Code was fast. Copy took 6 rounds of iteration. Worth every minute.
Round 1: The Overenthusiastic First Draft
I gave Claude Code the brief: create 5 time-based greetings (morning, midday, afternoon, evening, night) with weekday and weekend variants. Mention markets on weekdays, adventures on weekends. Reference Goose, daily activities, keep it warm and slightly playful.
Claude Code generated 50 greetings in one response. They were... enthusiastic:
- “Good morning! Markets are opening at 9:30 — coffee’s brewing, ideas are flowing, and Goose is eyeing his breakfast bowl while Jose’s thinking about the first build of the day.”
- “Evening. Markets closed for the day. Time for dinner (myperfectpet fresh food for Goose), maybe some guitar or drums, and then building whatever sparked curiosity today.”
- “Late night. Markets won’t open for hours. Goose is asleep, dreaming of Bocce’s treats. You should probably be sleeping too, but if you’re still building things... same.”
Problem: The original text was 8 words. These were 25-35 words. Way too verbose. Trying to say everything in every greeting.
First drafts overcompensate. You give AI context about your life (markets, hobbies, dog treats), and it tries to pack all of it into every sentence. Trim ruthlessly.
Round 2: Cutting the Cruise Control
Feedback to Claude Code: “These are way too long. The original was 8 words. Keep it to 8-12 words max. One idea per greeting.”
New batch:
- “Morning. Markets warming up. Coffee brewing. Goose eyeing breakfast.”
- “Evening. Markets closed. Dinner first. Building second.”
- “Late night. Markets dark. Goose asleep. Maybe you should be too.”
Better! But now they felt choppy. Too staccato. And every single greeting mentioned markets. That’s not the vibe — I’m not a day trader checking the S&P every hour.
Round 3: The Market Problem
Feedback: “Market mentions are overwhelming. Only mention markets 20% of the time on weekdays, and never on weekends. Also, you can’t reference exact market times (9:30am) because visitors are in different timezones. Make it vague.”
Claude Code updated the logic: out of 5 weekday variants per time bucket, only 1 mentions markets. Weekend variants dropped all market references and shifted to beach trips, hiking, city exploring, farmers markets.
This felt more human. Not everything is about the NYSE.
When you give AI a theme (“acknowledge markets”), it defaults to mentioning it constantly. You have to explicitly set limits: 20% of the time, vague references only, weekdays only.
Round 4: Fixing the Wordiness (Again)
Even at 8-12 words, some greetings were trying to do too much. Example: “Morning. Iced matcha ready, run done, building mode, Goose supervising.” Four activities in one sentence.
Feedback: “You’re still trying to mention all my hobbies. Pick one. Keep it natural.”
Revised:
- “Morning run done. Building mode. The schnauzer’s supervising.”
- “Afternoon. Walk time. Goose knows the schedule better than anyone.”
- “Evening. Dog fed. Reading time. Goose judges from the couch.”
Now they breathed. One activity, one vibe, one moment.
Round 5: Time Window Adjustments
The initial time buckets felt off. Night started at 10pm, which meant evening greetings (6-10pm) were talking about dinner at 9:45pm. Dinner happens around 6-7pm, not late evening.
Feedback: “Shift all time windows up 2 hours. Night should start at midnight.”
Claude Code adjusted the logic and moved dinner-related greetings from evening to afternoon (4-8pm). Evening (8pm-midnight) became post-dinner wind-down — reading, music, late-night building.
Better daily rhythm. The greetings now matched real life.
Round 6: The Final Polish
Last round of tweaks:
- “Coffee” → “Iced matcha” or “Flat white” (actual preferences)
- “myperfectpetfood” → “myperfectpet fresh food” (correct brand name)
- Night greetings got cheekier: “Late. Goose is asleep. You should be too.”
- Removed workaholic vibes — added reading, guitar, drums, plant watering
After 6 rounds of iteration, we had 50 greetings (5 time periods × weekday/weekend × 5 variants) that felt personal, natural, and appropriately concise.
6 rounds of iteration in Claude Code — edit, refresh browser, give feedback, repeat.
Good copy doesn’t happen in one shot. The first draft gives you material to react to. The second draft fixes the obvious problems. Rounds 3-6 are where personality emerges.
The Code: Simpler Than the Copy
Once the copy was right, the actual code change was small — about 110 lines of JavaScript that detects the visitor’s local time, checks if it’s a weekend, picks the right bucket of greetings, and returns a random one. The hard part was never the code; it was getting 50 greetings to feel natural.
🔧 Developer section: Greeting logic implementation
- Add
“use client”at the top (client-side React hooks needed) - Create a
greetingsobject with all 50 variants organized by weekday/weekend and time of day - Write a
getGreeting()function that detects the visitor’s local time, checks if it’s a weekend, picks the right time bucket, and returns a random greeting - Use
useStateanduseEffectto set the greeting on page load - Replace the static hero text with the dynamic greeting
Total lines of code: ~110. Total time to write the code: ~15 minutes. The hard part wasn’t the JavaScript — it was getting 50 greetings to feel natural, personal, and not annoying.
Deployment: One Command (And One Fix)
Tested locally at localhost:3000 by refreshing at different times of day (and manually changing my system clock to test all time buckets). When everything felt right, one command to Claude Code: “Push it live.”
Claude Code ran git add, git commit, and git push.Vercel detected the push and started building. Then: email notification with subject line “Failed production deployment.”
The error: TypeScript couldn’t verify that timeOfDay was one of the valid greeting keys. The npm run dev local server doesn’t run strict TypeScript checks, so the issue only surfaced during Vercel’s production build.
Local dev servers are forgiving. Production builds are not. Even terminal-based AI doesn’t catch everything first try — npm run build locally before pushing saves the round-trip to Vercel.
Fix: one line. Added a TypeScript union type to timeOfDay:
let timeOfDay: “morning” | “midday” | “afternoon” | “evening” | “night”;
Ran npm run build locally. Build passed. Pushed again. Vercel deployed in 60 seconds. Done.
Final Output
A homepage at joseandgoose.com that greets every visitor with a different message based on their local time and day of week. 50+ greeting variants covering weekdays and weekends, morning matcha and midnight sleep nudges, market references and beach trips, dog dinner and guitar practice — built in 2 hours 15 minutes, iterated 6 times, deployed with one command.
What went fast
- Code implementation (15 minutes — React hooks, time detection, random selection)
- First draft generation (Claude Code wrote all 50 greetings in one response)
- Iteration cycles (screenshot → feedback → refresh loop was instant with Claude Code)
- Deployment (one command, Vercel auto-deployed in 60 seconds)
What needed patience
- Copy refinement (6 rounds to go from 25-word sentences to 8-12 word greetings)
- Balancing themes (markets vs hobbies vs dog content — had to set explicit ratios)
- Time window tuning (dinner at 9pm felt wrong, shifted everything up 2 hours)
- Tone calibration (playful but not cutesy, personal but not oversharing, cheeky but not annoying)
The biggest lesson? Writing 50 variants of “good morning” teaches you more about your own voice than writing one perfect sentence. Iteration isn’t a bug in the process — it is the process. The greetings that landed weren’t the ones Claude Code generated first. They were the ones that survived 6 rounds of “shorter, less markets, more Goose.”
And now the homepage says something different to everyone. A visitor at 7am on Tuesday sees matcha and morning runs. A visitor at midnight on Saturday gets a gentle sleep nudge. The schnauzer supervises in all 50 variants. That’s the goal.