Oncall Scheduling logo

Oncall Scheduling

Organization
serac-labs
oncall-scheduling

Read and change ServiceNow on-call rotations — the cmn_rota → cmn_rota_roster → cmn_rota_member chain, how "who is on call right now" is resolved from a member window plus the schedule's time zone, and how escalation from an incident reaches it.

Overview

Publisherserac-labs
Repositoryserac
Skill nameoncall-scheduling
Stars
78
Forks
26
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by serac-labs on GitHub. Read the source before you install it.

Installation

Install the Oncall Scheduling AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/serac-labs/serac.git /tmp/serac
mkdir -p .claude/skills
cp -r /tmp/serac/packages/skills/oncall-scheduling .claude/skills/oncall-scheduling
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Oncall Scheduling in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Oncall Scheduling on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Oncall Scheduling is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

On-Call Scheduling

"Who is on call for the database team?" is one question and four tables. Answering it by guessing at table names is how agents end up querying sys_user_group.manager and reporting the wrong person.

The chain

sys_user_group          the team being covered
   └── cmn_rota          a rotation on that group ("Database — primary")
        ├── cmn_schedule the hours the rotation covers, and its TIME ZONE
        └── cmn_rota_roster   a rotation pattern: weekly, 7 days, starting <date>
             └── cmn_rota_member   one person, with a from/to window
                  └── sys_user

Read it as: a group has rotations, a rotation has rosters, a roster has members. The roster is the pattern (rotate weekly, one week each). The member row is one person's turn — it carries from and to as glide_date, and member referencing sys_user.

A group can have several rotations at once — primary, secondary, escalation — and they are unrelated records. "The on-call person" is never a property of the group.

Who is on call right now

snow_oncall_manage({ action: "get_current_oncall", rotation_sys_id }) resolves it in three steps, and knowing them tells you what a wrong answer means:

  1. Read cmn_rota_roster where rota=<rotation>^active=true.
  2. Find the cmn_rota_member rows belonging to those rosters whose from/to window covers today.
  3. Resolve member to a sys_user.

Two consequences worth having in front of you:

  • A rotation with no member window covering today returns nothing. That is not an error; it is a rotation whose roster has run past its generated windows. The tool says so explicitly rather than guessing at the next person.
  • The dates are dates, and coverage is hours. cmn_rota_member.from/.to are days. Whether the person is on call at 03:00 is decided by the rotation's cmn_schedule — including its time zone, which is a field on the schedule and not on the rotation. A rotation whose schedule is in US/Pacific hands over at a different UTC moment than the same rotation in Europe/Amsterdam. Never convert on-call times yourself without reading cmn_schedule.time_zone first.

Full ServiceNow resolution goes through the OnCallRotation script include, which also applies escalation order and time-off records. The tool's answer is the coverage row; if an instance has time-off overrides in play, cross-check with that script include via snow_execute_script before paging anyone.

Listing and swapping

javascript
// Rotations for a group, by name or sys_id
await snow_oncall_manage({ action: "list_rotations", assignment_group: "Database" })

// Shifts in a window. Defaults to now → now + 7 days.
// Times are ServiceNow datetime format, UTC: "YYYY-MM-DD HH:MM:SS"
await snow_oncall_manage({ action: "list_shifts", rotation_sys_id: rota, end_time: "2026-09-01 00:00:00" })

// A one-off swap: reassign a member row from one person to another
await snow_oncall_manage({
  action: "swap_shift",
  roster_sys_id: memberRowSysId,     // a cmn_rota_member sys_id, despite the parameter name
  from_member_sys_id: currentUser,   // guard: refuses if the row does not hold this user
  to_member_sys_id: replacement,
})

Two traps in that last call:

  • roster_sys_id takes a cmn_rota_member sys_id — the per-window assignment row, not a cmn_rota_roster sys_id. Take it from list_shifts, do not go looking for a roster.
  • reason is accepted and not persisted. cmn_rota_member has no reason or override column; the tool echoes it back in the response and nothing on the instance records why the swap happened. If an audit trail matters, write a work note on whatever record prompted the swap.

A swap edits one window. It does not change the pattern — next rotation the original person is back on.

Schedules underneath

cmn_schedule is shared machinery: SLAs, business-hours calculations and on-call rotations all point at it. Build it before the thing that uses it.

javascript
const sched = await snow_create_schedule({ name: "Follow the sun — EMEA", type: "weekly", time_zone: "Europe/Amsterdam" })

// Spans include or exclude time on top of the base schedule
await snow_add_schedule_entry({ schedule_sys_id: sched.sys_id, name: "Kings Day", type: "exclude",
                                start_date_time: "2026-04-27 00:00:00", end_date_time: "2026-04-27 23:59:59" })

type: "exclude" is how holidays and blackout windows are modelled — as a span that removes time, not by editing the weekly pattern. include adds coverage the base pattern does not have. A schedule with no spans covers nothing.

Changing a schedule changes every SLA that references it. Check before editing:

javascript
await snow_query_table({ table: "contract_sla", query: "schedule=" + sched.sys_id, fields: "name,active" })

Why anyone asks: escalation from an incident

The usual path is: a P1 lands on a group, nobody picks it up, and something has to page a human. That "something" reads the group's rotation, not the group.

javascript
// 1. the incident's assignment group
const inc = await snow_query_table({ table: "incident", query: "number=INC0012345",
                                     fields: "assignment_group,priority,state" })
// 2. its rotations
const rotas = await snow_oncall_manage({ action: "list_rotations",
                                         assignment_group: inc.records[0].assignment_group.value })
// 3. who is covering the primary one right now
const who = await snow_oncall_manage({ action: "get_current_oncall", rotation_sys_id: rotas.rotations[0].sys_id })

If step 2 comes back empty, the group has no rotation and there is no on-call person to find — the honest answer is "this group is not on call", not the group's manager.

Related

  • sla-management — the other consumer of cmn_schedule, for business-hours SLA calculation.
  • incident-management — what escalation does once it has the name.

Frequently asked questions

What does the Oncall Scheduling AI skill do?

Read and change ServiceNow on-call rotations — the cmn_rota → cmn_rota_roster → cmn_rota_member chain, how "who is on call right now" is resolved from a member window plus the schedule's time zone, and how escalation from an incident reaches it.

Why use Oncall Scheduling on TypingMind?

Because you install it once and use it with any model. Oncall Scheduling is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Oncall Scheduling in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/serac-labs/serac/tree/main/packages/skills/oncall-scheduling. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Oncall Scheduling?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Oncall Scheduling?

As many as you like. As long as a model supports skills, you can use Oncall Scheduling with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Oncall Scheduling AI skill free?

Yes. It is published on GitHub by serac-labs under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇