Skip to content
Back to skills

Telescope Slots

ASecurity

Build a nightly observatory schedule from input.json (nightMinutes plus requests with target, priority 1-3, minutes). Writes observing-plan.csv and not-scheduled.json beside input.json. Use whenever asked to schedule, plan, or slot telescope/observing requests into a night, even if the files are only mentioned by name.

  • 24 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 6, 2026
toolsrustgo

Security analysis

A100/100

Scanned December 6, 2026

npx -y skills add gabrielmoreira/agent-skills-mirror --skill telescope-slots --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Telescope Slots?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Telescope Slots
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gabrielmoreira-telescope-slots-838b4bbf/badge)](https://www.skillsdirectory.com/skills/gabrielmoreira-telescope-slots-838b4bbf)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: telescope-slots
description: Build a nightly observatory schedule from input.json (nightMinutes plus requests with target, priority 1-3, minutes). Writes observing-plan.csv and not-scheduled.json beside input.json. Use whenever asked to schedule, plan, or slot telescope/observing requests into a night, even if the files are only mentioned by name.
---

# telescope-slots

Do this by hand (no scripts needed). Careful arithmetic is the main risk.

## Algorithm

1. Read `input.json`: `nightMinutes` and `requests` (in submission order; number them 1..n in that order).
2. Build the consideration order: sort by `priority` ascending (1 is most important), ties broken by submission order. Do not sort by length.
3. Walk that order with `used = 0`. For each request:
   - If `used + minutes <= nightMinutes`: schedule it with `start = used`, `end = used + minutes`, then `used = end`.
   - Otherwise skip it (it goes to not-scheduled) and **keep going**: a later, shorter request may still fit. A request that exactly fills the remaining time fits (`<=`).
4. Slots are contiguous with no gaps, starting at 0, in the order scheduled (so the plan is in priority order, not submission order).

## Outputs (write both files in the same folder as input.json)

**observing-plan.csv**: header `target,start,end`, then one row per scheduled request in scheduled order, e.g.
```
target,start,end
NGC 7000,0,90
M42,90,190
```
No quoting or extra spaces (target names are written as-is; only quote one if it contains a comma). Integers only. If nothing is scheduled, write just the header line.

**not-scheduled.json**: a JSON array of skipped target names in **original submission order** (not priority order), 2-space indented, one name per line:
```
[
  "Arcturus",
  "Mizar",
  "Spica"
]
```
If none were skipped, write `[]`.

## Check before finishing

- Every request appears exactly once, in either the CSV or the JSON.
- Last `end` is `<= nightMinutes`; each `end - start` equals that request's minutes; each start equals the previous end.
- Re-add the numbers yourself; do not trust a first pass.

## Worked check (priority 1,2,3 mixed)

nightMinutes 200; requests in order Capella(p1,80), Arcturus(p2,60), Mizar(p3,70), Sirius(p1,90), Spica(p2,40), Polaris(p3,30).
Order: Capella, Sirius, Arcturus, Spica, Mizar, Polaris. Capella 0-80, Sirius 80-170, Arcturus would reach 230 (skip), Spica 210 (skip), Mizar 240 (skip), Polaris 170-200 fits.
Plan: Capella, Sirius, Polaris. Not scheduled (submission order): Arcturus, Mizar, Spica.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.