Skip to content
Back to skills

Class Register

ASecurity

Use this skill when the user wants a class attendance register summarised: per-pupil present and absent counts, longest absence streak, and a list of pupils to flag for absence alerts, from day-by-day P/L/A/E marks in input.json.

  • 24 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 6, 2026
business

Security analysis

A100/100

Scanned December 6, 2026

npx -y skills add gabrielmoreira/agent-skills-mirror --skill class-register --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Class Register?

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

Security grade badge for Class Register
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gabrielmoreira-class-register-ffccb28f/badge)](https://www.skillsdirectory.com/skills/gabrielmoreira-class-register-ffccb28f)

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: class-register
description: "Use this skill when the user wants a class attendance register summarised: per-pupil present and absent counts, longest absence streak, and a list of pupils to flag for absence alerts, from day-by-day P/L/A/E marks in input.json."
---

# Class register summary

Turn `input.json` (a register of per-pupil day marks) into `register-summary.csv` and `absence-alerts.json`, written beside `input.json`. Do the work by reading and writing files; no code execution is needed.

## When to use
- Use for a register shaped `{"register":[{"pupil":"...","marks":"PLAE..."}]}`.
- Do not use for other attendance formats or for reports other than these two files.

## Mark meanings
- `P` present, `L` late: both count as present.
- `A` absent: counts as absent.
- `E` authorised absence: counts as neither present nor absent, and is **skipped** when finding runs (it neither extends nor breaks a streak).

## Steps
1. Read `input.json`. Keep pupils in input order.
2. For each pupil, scan `marks` left to right, ignoring any `E`:
   - `present` = number of `P` plus number of `L`.
   - `absent` = number of `A`.
   - `longest_absence` = longest run of consecutive `A` after deleting all `E` characters from the string. `P` or `L` ends a run. If there is no `A`, it is 0.
3. Write `register-summary.csv`: header `pupil,present,absent,longest_absence`, then one row per pupil in input order. Use `\n` line endings, no quoting unless a name contains a comma or quote, a trailing newline.
4. Alerts: a pupil is alerted when `longest_absence >= 3`. Sort alerted pupils by `longest_absence` descending, then by `pupil` name ascending (plain character order). Write `absence-alerts.json` as a JSON array of name strings, 2-space indented, e.g. `[\n  "Zara",\n  "Ivan"\n]`. If nobody qualifies write `[]`.
5. Re-check each row by recounting: `present + absent + (number of E)` must equal the length of `marks`.

## Edge cases
- Empty `marks`: row `Name,0,0,0`.
- Empty register: CSV is just the header; alerts are `[]`.
- Lowercase letters: treat as uppercase. Any other character: still process the rest, count it nowhere, and mention it in your reply.
- Do not modify `input.json`.

## Worked example
Marks `AEAPAA` (Gia): present 1 (P); absent 4 (four A); removing E gives `AAPAA`, longest run 2 → row `Gia,1,4,2`, not alerted.
Marks `PAAAEP` (Nell): present 2, absent 3, `PAAAP` run 3 → `Nell,2,3,3`, alerted.
Marks `AAAPAA` (Tom): `Tom,1,5,3`, alerted. Alerts order: Nell, Tom (both run 3, name ascending).

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 business →

Comments

Loading comments…

Newsletter

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