Skip to content
Back to skills

Class Register

ASecurity

Summarise a class attendance register from input.json (pupils with day-by-day marks P/L/A/E) into register-summary.csv and absence-alerts.json. Use whenever the user asks to summarise, tally or flag absences from a class register or attendance marks file, even if they don't name the output files.

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

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-agent-skills-mirror/badge)](https://www.skillsdirectory.com/skills/gabrielmoreira-class-register-agent-skills-mirror)

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: Summarise a class attendance register from input.json (pupils with day-by-day marks P/L/A/E) into register-summary.csv and absence-alerts.json. Use whenever the user asks to summarise, tally or flag absences from a class register or attendance marks file, even if they don't name the output files.
---

# Class register summary

You cannot run code, so work through each pupil by hand, carefully, one character at a time.

## Input
`input.json` in the working folder: `{"register": [{"pupil": "Name", "marks": "PPALE..."}, ...]}`.
`marks` has one letter per school day, in order: P present, L late, A absent, E authorised absence.

## Per-pupil rules (derived from the worked examples)
- **present** = number of `P` plus number of `L`. Late still counts as attending.
- **absent** = number of `A` only. `E` is not counted as absent.
- **longest_absence** = the longest run of `A` marks, where:
  - `E` is transparent: it neither adds to a run nor breaks it. Skip over it. (`AEAAP` → run of 3.)
  - `P` and `L` break a run. (`AALAA` → longest 2.)
  - A pupil with no `A` has longest_absence 0 (e.g. `PELEP` → 0).

Method: write the marks out, walk left to right keeping `current` (reset to 0 on P or L; +1 on A; unchanged on E) and `best` (max of current). Then count P+L and A separately and check present + absent + (number of E) equals the string length.

## Outputs (write beside input.json)

### register-summary.csv
Header `pupil,present,absent,longest_absence`, then one row per pupil in the **same order as the input**. No spaces, no quotes, a trailing newline.

```
pupil,present,absent,longest_absence
Maya,3,3,3
```

### absence-alerts.json
A JSON array of pupil names (strings), 2-space indent, trailing newline.
- Include a pupil only if **longest_absence >= 3**. (Total absent count alone doesn't qualify: AP AP AP with 3 absences but runs of 1 is not alerted.)
- Order: longest_absence descending; ties broken by name ascending (A–Z).
- If nobody qualifies, write `[]`.

```json
[
  "Zara",
  "Ivan"
]
```

## Checks before finishing
1. Row count equals the number of pupils; names copied exactly.
2. Recount any pupil whose numbers look odd.
3. Alerts list matches the rule and ordering above.
4. Both files are in the same folder as input.json.

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

Comments

Loading comments…

Newsletter

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