ShreySomwanshi

Hotel Booking Agent — Data skill for Claude Code

Data community

Conversational hotel booking agent: Claude (tool use) + SQLite room database.

How to install Hotel Booking Agent

This entry records only its repository, not the path inside it, so there is no exact command to give. Open ShreySomwanshi/hotel-booking-agent and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Hotel Booking Agent does

Conversational hotel booking agent: Claude (tool use) + SQLite room database. Checks availability, confirms exact matches, suggests alternatives, and handles edge cases like sold-out dates and invalid input.

Alternatives in Data

  • Cost Of Remembering — The Cost of Remembering: filesystem memory matches long-context accuracy on LongMemEval while reading 97% fewe 32 ★
  • Feature Data Flow — Build a full backend-backed feature (DTOs, entities, use cases, state, UI) 24 ★
  • Franken Snowflake — Clean-room, Rust-first, Asupersync-native Snowflake SQL API connector built for coding agents 6 ★

README

Hotel Aurora – Booking Agent

A conversational booking assistant for one hotel. Claude handles the dialogue; a SQLite database and a set of tools handle the facts (availability, prices, bookings). The LLM never invents rooms or prices.

Files

File Role
db.py Schema, seed data (22 rooms + date-range bookings), availability check, suggestion logic, booking, rate card
tools.py Tool schemas shown to the LLM + dispatch() that runs them; mock email (writes to outbox/)
agent.py Chat loop, system prompt, tool-use loop
tests.py Offline tests of every scenario (no API key needed)

Architecture

Guest ⇄ agent.py (chat loop) ⇄ Claude API  ── tool_use ──▶ tools.dispatch() ──▶ db.py ──▶ SQLite (hotel.db)
                                    ◀─────── tool_result (JSON) ────────────────┘
                                                                  └─▶ outbox/BK-XXXX.txt (mock email)

**How the LLM and the tools interact**

  1. agent.py prints a fixed greeting (the exact question from the brief) and seeds it into the history.
  2. Each guest message goes to Claude along with the system prompt and four tool definitions.
  3. Claude extracts the slots (dates, bed, breakfast, guests) and emits a check_availability tool call. The system prompt requires this on every room request or preference change, so a mid-chat change ("actually, double with breakfast") simply triggers a new call with fresh arguments.
  4. tools.dispatch() runs the call against SQLite and returns JSON with a status. The loop feeds it back and Claude writes the reply from that data only:
status Meaning Agent behaviour
exact bed + breakfast + capacity match Present room no., type, price/night, breakfast, stay total; ask for name + email
alternatives no exact match, but other rooms are free Offer the 1–2 closest with a why_suggested reason; guest picks or declines
none nothing free