resources/boost/skills/zap-availability/SKILL.md
# Laravel Zap - Availability & Bookable Slots This skill covers checking availability, retrieving bookable slots, and querying schedules in Laravel Zap. ## Checking Bookability ### Check if Bookable on a Date ```php // Check if there is at least one bookable slot on the day // Parameters: date, slot duration in minutes $isBookable = $doctor->isBookableAt('2025-01-15', 60); // With buffer time (minutes between slots) $isBookable = $doctor->isBookableAt('2025-01-15', 60, 15); ``` ### Check S
npx skillsauth add ludoguenet/laravel-zap resources/boost/skills/zap-availabilityInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill covers checking availability, retrieving bookable slots, and querying schedules in Laravel Zap.
// Check if there is at least one bookable slot on the day
// Parameters: date, slot duration in minutes
$isBookable = $doctor->isBookableAt('2025-01-15', 60);
// With buffer time (minutes between slots)
$isBookable = $doctor->isBookableAt('2025-01-15', 60, 15);
// Check if a specific time range is bookable
$isBookable = $doctor->isBookableAtTime('2025-01-15', '09:00', '09:30');
// Get all bookable slots for a date
// Parameters: date, slot duration (minutes), buffer (minutes)
$slots = $doctor->getBookableSlots('2025-01-15', 60, 15);
// Returns array of slots:
// [
// ['start_time' => '09:00', 'end_time' => '10:00', 'is_available' => true, 'buffer_minutes' => 15],
// ['start_time' => '10:15', 'end_time' => '11:15', 'is_available' => false, 'buffer_minutes' => 15],
// ...
// ]
Bookable slots are generated based on:
// Find the next available slot starting from a date
$nextSlot = $doctor->getNextBookableSlot('2025-01-15', 60, 15);
// Returns: ['start_time' => '09:00', 'end_time' => '10:00', 'is_available' => true, 'date' => '2025-01-15', 'buffer_minutes' => 15]
// Start from today
$nextSlot = $doctor->getNextBookableSlot(null, 60);
The method searches up to 365 days in the future to cover all recurring frequencies.
// Get schedules for a specific date
$schedules = $doctor->schedulesForDate('2025-01-15')->get();
// Get schedules within a date range
$schedules = $doctor->schedulesForDateRange('2025-01-01', '2025-01-31')->get();
// Get only appointment schedules
$appointments = $doctor->appointmentSchedules()->get();
// Get only availability schedules
$availabilities = $doctor->availabilitySchedules()->get();
// Get only blocked schedules
$blocked = $doctor->blockedSchedules()->get();
// Get schedules of a specific type
$schedules = $doctor->schedulesOfType('appointment')->get();
// Get only active schedules
$active = $doctor->activeSchedules()->get();
// Get recurring schedules
$recurring = $doctor->recurringSchedules()->get();
// Get all schedules
$all = $doctor->schedules()->get();
The Schedule model provides these query scopes:
use Zap\Models\Schedule;
Schedule::active()->get(); // Only active schedules
Schedule::recurring()->get(); // Only recurring schedules
Schedule::ofType(ScheduleTypes::APPOINTMENT)->get(); // By type
Schedule::availability()->get(); // Availability schedules
Schedule::appointments()->get(); // Appointment schedules
Schedule::blocked()->get(); // Blocked schedules
Schedule::forDate('2025-01-15')->get(); // For specific date
Schedule::forDateRange('2025-01-01', '2025-01-31')->get(); // For date range
// Get total scheduled time in minutes for a date range
$totalMinutes = $doctor->getTotalScheduledTime('2025-01-01', '2025-12-31');
// Check if the model has any schedules
$hasSchedules = $doctor->hasSchedules();
// Check if the model has any active schedules
$hasActive = $doctor->hasActiveSchedules();
use Zap\Facades\Zap;
// 1. Set up doctor's office hours
Zap::for($doctor)
->named('Office Hours')
->availability()
->forYear(2025)
->weekly(['monday', 'tuesday', 'wednesday', 'thursday', 'friday'])
->addPeriod('09:00', '12:00')
->addPeriod('14:00', '17:00')
->save();
// 2. Block lunch time
Zap::for($doctor)
->named('Lunch Break')
->blocked()
->forYear(2025)
->weekly(['monday', 'tuesday', 'wednesday', 'thursday', 'friday'])
->addPeriod('12:00', '13:00')
->save();
// 3. Get available slots for booking
$slots = $doctor->getBookableSlots('2025-01-15', 60, 15);
// 4. Check if specific time is available before booking
if ($doctor->isBookableAtTime('2025-01-15', '10:00', '11:00')) {
// Book the appointment
Zap::for($doctor)
->named('Patient Consultation')
->appointment()
->from('2025-01-15')
->addPeriod('10:00', '11:00')
->withMetadata(['patient_id' => $patientId])
->save();
}
// 5. Find next available slot for a patient
$nextSlot = $doctor->getNextBookableSlot(now()->format('Y-m-d'), 60);
// Room availability
Zap::for($room)
->named('Conference Room A')
->availability()
->weekDays(['monday', 'tuesday', 'wednesday', 'thursday', 'friday'], '08:00', '18:00')
->forYear(2025)
->save();
// Get available slots
$slots = $room->getBookableSlots('2025-03-15', 60);
// Book meeting
Zap::for($room)
->named('Board Meeting')
->appointment()
->from('2025-03-15')
->addPeriod('09:00', '11:00')
->withMetadata(['organizer' => '[email protected]'])
->save();
Buffer time adds spacing between slots:
// In config/zap.php
'time_slots' => [
'buffer_minutes' => 15, // Default buffer between slots
],
// Or per-call
$slots = $doctor->getBookableSlots('2025-01-15', 60, 15); // 15 min buffer
With a 15-minute buffer and 60-minute slots:
development
# Laravel Zap - Schedule Management Laravel Zap is a comprehensive calendar and scheduling system for Laravel. This skill covers schedule creation, types, and the fluent builder API. ## Installation ```bash composer require laraveljutsu/zap php artisan vendor:publish --provider="Zap\ZapServiceProvider" php artisan migrate ``` ## Model Setup Add the `HasSchedules` trait to any Eloquent model you want to make schedulable: ```php use Zap\Models\Concerns\HasSchedules; class Doctor extends Mod
testing
# Laravel Zap - Recurrence Patterns This skill covers all recurrence patterns available in Laravel Zap for creating recurring schedules. ## Available Frequencies | Frequency | Description | |-----------|-------------| | `daily` | Every day | | `weekly` | Specific days each week | | `weekly_odd` | Specific days on odd-numbered weeks | | `weekly_even` | Specific days on even-numbered weeks | | `biweekly` | Every two weeks | | `monthly` | Specific days each month | | `bimonthly` | Every two mont
testing
Create, edit, improve, or audit AgentSkills. Use when creating a new skill from scratch or when asked to improve, review, audit, tidy up, or clean up an existing skill or SKILL.md file. Also use when editing or restructuring a skill directory (moving files to references/ or scripts/, removing stale content, validating against the AgentSkills spec). Triggers on phrases like "create a skill", "author a skill", "tidy up a skill", "improve this skill", "review the skill", "clean up the skill", "audit the skill".
testing
Host security hardening and risk-tolerance configuration for OpenClaw deployments. Use when a user asks for security audits, firewall/SSH/update hardening, risk posture, exposure review, OpenClaw cron scheduling for periodic checks, or version status checks on a machine running OpenClaw (laptop, workstation, Pi, VPS).