slot-engine
यह क्या करती है
यह स्किल उस फ़ंक्शन का वर्णन करती है जो गणना करता है कि कौन-से मीटिंग स्लॉट खुले हैं, और वे नियम जो वह हमेशा मानता है। यह उन डेवलपर्स के लिए है जिन्हें इसके ऊपर बनाना है या जानना है कि कोई समय क्यों गायब है।
कब इस्तेमाल करें
- ✓जब बुकिंग पेज पर कोई मीटिंग समय गायब हो और आपको कारण पता करना हो।
- ✓जब आप खुले समय की गणना का तरीका बदलते हैं।
- ✓जब आपको जानना हो कि गणना क्या गारंटी देती है, जैसे कि बीते हुए स्लॉट कभी नहीं दिखते।
Skill का लिंक
https://github.com/BuilderIO/agent-native/blob/main/packages/scheduling/docs/skills/slot-engine/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे बुकिंग पेज पर मंगलवार दोपहर 2 बजे खुला क्यों नहीं दिख रहा? कारण पता करने में मेरी मदद कीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
फ़ंक्शन मीटिंग नियम, शेड्यूल, व्यस्त समय और मौजूदा बुकिंग की संख्या लेता है, और स्लॉट की सूची लौटाता है। गड़बड़ी जाँचने के लिए उस दिन के साप्ताहिक घंटे, तारीख़ के बदलाव और व्यस्त समय देखें।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Slot engine
import { computeAvailableSlots } from "@agent-native/scheduling/core"
Inputs
- Event type config (duration, buffers, minimum notice, period, limits, slot interval)
- Schedule (timezone + weekly availability + date overrides)
- Busy intervals (UTC, aggregated from external calendars + existing bookings)
- Booking counts by bucket (day/week/month/year) for limit enforcement
- Time range to compute over
- Optional seats-per-slot + seats-taken map
- Viewer timezone (for limit bucketing, if it differs from the schedule)
Output
- Array of
Slot { start: ISO, end: ISO, available: boolean, seatsRemaining?, hostEmail? }
Invariants
The function guarantees, in order:
- No slot falls in the past (
now + minimumBookingNoticeis the floor). - No slot overlaps a busy interval (with buffers applied).
- No slot falls outside the schedule's available intervals for that day.
- No slot exceeds a booking limit.
- No slot falls outside the event's period (rolling/range).
- DST-safe: we convert to UTC using the schedule's timezone before doing any interval arithmetic.
Debugging
If a slot is unexpectedly missing:
- Check the schedule's weekly availability for that day-of-week in the schedule's timezone (not UTC — weekends can shift across the date line).
- Check date overrides for that local date (empty intervals = fully blocked).
- Check merged busy intervals for overlap, including the before/after buffer expansion.
- Check booking limits: a single existing booking can close a day.
- Check period caps: rolling periods restrict how far in the future slots appear.
If a slot is unexpectedly present:
- Check that
nowis being passed correctly (defaults tonew Date()). - Check that busy intervals from providers are in UTC.
- Confirm slot interval matches what you expect (default = duration).
अक्सर पूछे जाने वाले सवाल
क्या फ़ंक्शन बीते हुए स्लॉट लौटा सकता है?
नहीं। न्यूनतम सूचना अवधि से पहले के समय कभी नहीं दिए जाते।
डेलाइट सेविंग टाइम कैसे संभाला जाता है?
किसी भी गणना से पहले समय को शेड्यूल के अपने टाइमज़ोन में बदला जाता है।
स्लॉट गायब हो तो पहले क्या जाँचें?
शेड्यूल के उस दिन के साप्ताहिक घंटे, शेड्यूल के अपने टाइमज़ोन में।
जानकारी
लेखक का मूल विवरण
The pure `computeAvailableSlots` function — inputs, outputs, invariants, and debugging guide.
repo: BuilderIO/agent-native
लोकप्रियता
- GitHub स्टार
- 7.6k
- रैंकिंग में स्थान
- #13203
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
design-exploration
7.6kयह आपके एजेंट को UI के कई डिज़ाइन विकल्प साथ-साथ दिखाने, आपकी पसंद चुनवाने और फिर चुने डिज़ाइन को सुधारने में मदद करती है।
visual-edit
7.6kयह आपके एजेंट को चल रहे लोकल ऐप को विज़ुअल एडिटर में खोलने देती है, ताकि आप उसकी असली स्क्रीन एक साथ देखकर संपादित कर सकें।
turn-into-app
7.6kयह किसी वर्कफ़्लो, स्प्रेडशीट या प्रोजेक्ट को भरी हुई स्क्रीन वाले विज़ुअल ऐप में बदलती है, जिसके कंट्रोल के पीछे एजेंट काम करता है।
visual-plan
7.6kयह सादे टेक्स्ट वाली योजना को डायग्राम, फ़ाइल नक्शों, कोड अंश और खुले सवालों वाली इंटरैक्टिव विज़ुअल योजना में बदलती है।
मिलती-जुलती skills
api-connector-builder
280kयह आपके एजेंट को मौजूदा pattern के हिसाब से नए API connections बनाने देता है। जब बिना कोई नया तरीका बनाए एक और integration जोड़ना हो, तब इसका इस्तेमाल करें।
api-design
280kयह आपके एजेंट को best practices के हिसाब से REST APIs डिज़ाइन करने में मदद करता है। यह तय करने में काम आता है कि APIs आपस में कैसे बात करें, errors कैसे दिखें, और data को कैसे व्यवस्थित करें।
backend-patterns
280kआपके एजेंट को server-side architecture patterns और database optimization में मदद करता है। server पर चलने वाला code बनाने या review करने के लिए उपयोगी है।