Skip to content
Back to search

leaver-check

SkillWorks with Claude CodeGitHub

Find active accounts for leavers, orphaned and dormant accounts from an HR export and an app user list. Browser page, CLI and Claude skill.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/jamalsjones--leaver-check/badge.svg)](/listings/jamalsjones--leaver-check)

HTML

<a href="/listings/jamalsjones--leaver-check"><img src="/api/listings/jamalsjones--leaver-check/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 79 lines
  1. # Leaver check
  2. Compare an HR export with one application's user list and find the accounts an access review should look at first:
  3. | Finding | Severity | What it means |
  4. |---|---|---|
  5. | Active account, person has left | high | HR says they left (by status or termination date) and the account is still enabled. If it was signed in to after the termination date, it's flagged and listed first. |
  6. | No matching person | high | An active account that matches no one in HR |
  7. | Service or shared account, no owner | medium | Unmatched, and the name looks like `svc-`, `api`, `test`, `admin` and similar |
  8. | Unused for 90+ days | medium | A current employee's account with no sign-in for N days, or never |
  9. | More than one account | low | One person, several active accounts; the most recently used one is left alone |
  10. | Match needs confirming | low | Matched only by a name pattern like `dkowalski` |
  11. It writes a review sheet (CSV) with the finding, the evidence, a recommended action, and empty **Decision**, **Reviewer** and **Notes** columns for the people doing the review.
  12. ## Three ways to run it
  13. All three use the same script, [`skill/leaver-check/scripts/leaver-check.js`](skill/leaver-check/scripts/leaver-check.js): one file, no dependencies. The matching is identical whichever you pick.
  14. ### 1. In the browser
  15. [jamalsjones.github.io/leaver-check](https://jamalsjones.github.io/leaver-check/). Drop in the two CSVs and download the review sheet. The files are read in the page and never uploaded. Try the sample files first.
  16. ### 2. On the command line
  17. ```bash
  18. node skill/leaver-check/scripts/leaver-check.js --hr hr.csv --app users.csv --app-name Payroll --out review.csv
  19. ```
  20. | Option | |
  21. |---|---|
  22. | `--as-of YYYY-MM-DD` | check as of this date (default today) |
  23. | `--dormant-days 90` | unused for this many days counts as dormant; 0 turns it off |
  24. | `--date-order mdy\|dmy` | how to read dates like `03/04/2026` |
  25. | `--hr-col field=Header` | pick an HR column by hand (`id, email, name, first, last, status, termDate`) |
  26. | `--app-col field=Header` | pick an app column by hand (`account, email, employeeId, name, status, lastLogin`) |
  27. | `--fail-on high` | exit 1 if anything that severe is found, for scheduled runs |
  28. | `--json` | print the full result |
  29. ### 3. As a Claude skill
  30. The `skill/leaver-check` folder is an [Agent Skill](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/overview). Claude runs the script, checks the column mapping with you, explains the findings and drafts a one-page access-review summary for managers.
  31. - **Claude Code:** copy `skill/leaver-check` to `~/.claude/skills/` (or `.claude/skills/` in a project), then ask something like "check payroll-users.csv against hr-export.csv for leavers".
  32. - **Claude apps:** zip the `skill/leaver-check` folder and upload it as a custom skill in Claude's settings.
  33. **About your data:** in the browser and on the command line, nothing leaves your machine. With the skill, Claude reads the script's output and whatever rows it needs to explain a finding, so names, emails and employment status pass through Claude. Use it only where your organization allows employee data to be processed by Claude, and prefer the browser or command line when it doesn't.
  34. ## Getting the files
  35. - **HR:** any worker report with employee ID, work email, employment status and termination date. Include people who left during the review period, or their accounts will show up as "no matching person" instead of "has left".
  36. - **The app:** an admin user export or a users API call, with account status and last sign-in where the app records them. Identity providers (Okta, Microsoft Entra ID and others) and most SaaS admin consoles have one.
  37. Column names are detected from common variants (`Work Email`, `userPrincipalName`, `Last Sign In`, `accountEnabled`, `disabled` and so on). If one is missed, pick it in the page or with `--hr-col` / `--app-col`.
  38. ## How matching works
  39. 1. Employee ID, when both files have one.
  40. 2. Email, compared without case.
  41. 3. The app username against the HR email's local part and common patterns (`dkowalski`, `dana.kowalski`, `danakowalski`). These are marked as needing confirmation, and a pattern two people share is never used.
  42. It recommends; it never changes an account.
  43. ## Make it yours
  44. Fork it and set the defaults to your policy: the dormant threshold, which statuses mean "left", the service-account name pattern (`NONPERSON` in the script). Run the tests with `npm test` (Node 18 or later, nothing to install). To host your own copy of the page, turn on GitHub Pages for your fork.
  45. The sample data in `examples/` is invented. Northpeak isn't a real company.
  46. ## Related
  47. - [SAML check](https://github.com/jamalsjones/saml-check): review SAML responses, requests and metadata.
  48. - [JWT lint](https://github.com/jamalsjones/jwt-lint) and [OIDC config check](https://github.com/jamalsjones/oidc-config-check).
  49. ## Author
  50. Jamal Jones. Fifteen years leading enterprise identity. More at [jamalsjones.com](https://www.jamalsjones.com).
  51. MIT licensed.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.