Review a TLS certificate inventory (input.json with today and certificates of domain/expiresDay/autoRenew) and write renewals.csv and renewal-counts.json listing expired certificates and those needing renewal. Use whenever the user asks to audit, triage, or find expiring or expired certificates from such an inventory, even if they don't name the files.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Cert Renewals?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/gabrielmoreira-cert-renewals-1ab4a941)
---
name: cert-renewals
description: Review a TLS certificate inventory (input.json with today and certificates of domain/expiresDay/autoRenew) and write renewals.csv and renewal-counts.json listing expired certificates and those needing renewal. Use whenever the user asks to audit, triage, or find expiring or expired certificates from such an inventory, even if they don't name the files.
---
# Certificate renewals
You cannot run code, so work by hand, carefully, and write the two output files with the Write tool. Output files go in the same folder as input.json.
## Steps
1. Read input.json. Note `today` and the `certificates` array.
2. Pick the current certificate per domain. Group entries by `domain`. In each group keep only the one with the largest `expiresDay`; discard the rest, wherever they sit in the list. Judge only the kept one. Its autoRenew value is the one that matters (an older certificate's autoRenew is irrelevant). Do this before any filtering: a superseded certificate that is expired or near expiry must not be listed just because it looks alarming, and a kept certificate must not be hidden by an older one.
3. For each kept certificate compute `days_left = expiresDay - today` (whole number, may be negative).
- days_left <= 0: status `expired`, listed regardless of autoRenew (0 counts as expired).
- 1 to 30 inclusive: if autoRenew is false, status `renew`, listed; if autoRenew is true, skip.
- above 30: skip.
4. Sort listed rows by days_left ascending (numerically, so -10 before -2 before 0 before 5; do not sort as text). Ties: ascending ASCII order of domain (plain character-code order: digits before letters, `-` (45) and `.` (46) before digits, so `a-b.com` comes before `a.com`; all names are lower case).
5. Write `renewals.csv`: first line `domain,days_left,status`, then one line per row, e.g. `shop.example.net,0,expired`. No spaces, no quotes, no extra columns. If no rows, the file contains only the header line.
6. Count rows by status and write `renewal-counts.json` with exactly these two keys, e.g.
`{"expired": 2, "renew": 3}`
Use 0 for a status with no rows. The counts must match the CSV rows.
## Checks before finishing
- Each domain appears at most once in the CSV.
- Re-verify subtraction for every listed row and boundary cases (0, 1, 30, 31).
- Row order follows step 4; expired + renew equals the number of CSV data rows.
- Treat autoRenew as true only when it is boolean true.