본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)7.6k · #13203

slot-engine

하는 일

이 스킬은 열린 회의 슬롯을 계산하는 함수와 이 함수가 항상 따르는 규칙을 설명합니다. 이 함수를 기반으로 만들거나, 어떤 시간이 빠진 이유를 찾아야 하는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓예약 페이지에서 회의 시간이 빠져 있어 그 이유를 찾아야 할 때.
  • ✓열린 시간을 계산하는 방식을 바꿀 때.
  • ✓계산이 보장하는 내용, 예를 들어 과거 슬롯이 없다는 것을 알아야 할 때.

스킬 링크

https://github.com/BuilderIO/agent-native/blob/main/packages/scheduling/docs/skills/slot-engine/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/BuilderIO/agent-native/blob/main/packages/scheduling/docs/skills/slot-engine/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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:

  1. No slot falls in the past (now + minimumBookingNotice is the floor).
  2. No slot overlaps a busy interval (with buffers applied).
  3. No slot falls outside the schedule's available intervals for that day.
  4. No slot exceeds a booking limit.
  5. No slot falls outside the event's period (rolling/range).
  6. DST-safe: we convert to UTC using the schedule's timezone before doing any interval arithmetic.

Debugging

If a slot is unexpectedly missing:

  1. 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).
  2. Check date overrides for that local date (empty intervals = fully blocked).
  3. Check merged busy intervals for overlap, including the before/after buffer expansion.
  4. Check booking limits: a single existing booking can close a day.
  5. Check period caps: rolling periods restrict how far in the future slots appear.

If a slot is unexpectedly present:

  1. Check that now is being passed correctly (defaults to new Date()).
  2. Check that busy intervals from providers are in UTC.
  3. 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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬