slot-engine
できること
このスキルは、空いている打ち合わせの時間枠を計算する機能と、それが常に守るルールを説明します。その機能を基に開発する人や、時間が表示されない理由を調べる人向けです。
使う場面
- ✓予約ページに打ち合わせの時間が表示されず、理由を調べる必要があるとき。
- ✓空いている時間の計算方法を変更するとき。
- ✓計算が何を保証するか、例えば過去の時間枠を出さないことを確認したいとき。
スキルのリンク
https://github.com/BuilderIO/agent-native/blob/main/packages/scheduling/docs/skills/slot-engine/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“予約ページで火曜日の午後2時が空きとして表示されないのはなぜですか。原因を一緒に調べてください。”
毎週5つの新しいスキル。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
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
design-exploration
7.6kUIの複数のデザインの方向性を並べて検討し、1つを選んでもらい、選んだデザインを磨き上げるようエージェントを支援します。
visual-edit
7.6k実行中のローカルのアプリをビジュアルエディターで開き、本物の画面をまとめて確認し編集できるようエージェントを支援します。
turn-into-app
7.6kワークフロー、スプレッドシート、プロジェクトを、画面にデータが入り、操作の裏でエージェントが働く、洗練されたビジュアルアプリに変えます。
visual-plan
7.6kプレーンテキストの計画を、図、ファイルのマップ、コードの断片、未解決の質問を含む、対話できるビジュアルな計画に変えます。
似ているスキル
api-connector-builder
280kエージェントが既存のパターンに従って、新しいAPI連携を構築します。新しい方式を作らずに、もう一つ連携を追加したいときに使います。
api-design
280kエージェントがベストプラクティスに沿ってREST APIを設計できるようにします。APIの通信方法、エラーの表示方法、データの整理方法を決めるのに役立ちます。
backend-patterns
280kエージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。