Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add rainmanjam/poka-yoke --skill authzgit clone --depth 1 https://github.com/rainmanjam/poka-yokeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/rainmanjam/poka-yoke/authz)<a href="https://agentmods.dev/skills/rainmanjam/poka-yoke/authz"><img src="https://agentmods.dev/badge/skills/rainmanjam/poka-yoke/authz.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00043 | $0.00862 |
| Opus 5 | $0.00022 | $0.00431 |
| Sonnet 5 | $0.00009 | $0.00172 |
| Haiku 4.5 | $0.00004 | $0.00086 |
Grade A, and why
authz scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Authz: Structuring Access Control
Authorisation code is where structural sloppiness costs most, because a permission check that is hard to read is a permission check nobody re-reads. The discipline here is the ordinary one, applied somewhere the consequences are unusual.
Put the decision in one place
Separate deciding from enforcing. A function that answers "may this actor do this thing to this resource" should not also perform the thing. Once separated, the decision can be tested exhaustively, listed, audited, and reused by a second caller without dragging the action along.
One vocabulary for actors, actions and resources. If some code says user, some says
account, and some says principal, a reader cannot tell whether they are the same concept.
Pick the words and use them everywhere, including in the database columns.
Avoid boolean soup. if (user.isAdmin || (user.isOwner && !resource.locked)) scattered
across twelve call sites is twelve places to update and twelve chances to differ. Name the
rule once: canEditResource(user, resource).
Make the decision total. A function returning true, false or undefined will be used
as though undefined is one of the other two. Return a decision that covers every case, and
make the default deny rather than allow, because a missing branch should fail closed.
Structure that makes the check hard to skip
Take the actor as a parameter, never from ambient context. A function reaching for a global
currentUser can be called from a background job that has none, and the failure will be a
null reference in an unrelated place rather than an authorisation error.
Pass the actor down the call chain rather than re-fetching it. Re-fetching invites two layers to disagree about who the actor is.
Keep the resource identity typed. A function taking two adjacent strings for
resourceId and ownerId accepts them in either order. Distinct types make the transposition
a compile error rather than a security incident.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 77 lines · 43 tokens per session scan A 2f72ceee32d0
authz is a skill published in the GitHub repository rainmanjam/poka-yoke (22 stars, last pushed 6d ago), licensed MIT. It adds 43 tokens to every session and 862 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
Nullability Contract Review
Detect null/undefined/empty handling gaps where callers or consumers may receive unexpected nullish values.
skill-audit
Audit codebases for quality, consistency, and broken patterns — use for pre-release or tech debt review.
critical-code-reviewer
Rigorously review code or pull requests for correctness, security, accessibility, maintainability, tests, and edge cases. Use when users request a critical code review, want a guided walkthrough of findings, need implementer-facing feedback, or want to prepare, create, or submit a GitHub pull request review.
brooks-sweep
Full-sweep mode: runs a unified analysis across all quality dimensions — code decay, architecture, tech debt, and test quality — then applies fixes directly to the codebase. Safe changes are auto-applied; risky changes are confirmed before execution. Drawing on twelve classic engineering books. Triggers when: user…
second-pass-review
Independent audit of sanitized specs in workspace/output/. Three parallel LLM-based reviewer roles check structural leakage, content contamination, and behavioral completeness. Run AFTER Layer 5 sanitization, BEFORE implementation handoff.
check-pr
Read-only inspection of a single GitHub PR lifecycle — checks CI, review threads, description sync, and mergeability, and returns PASS or FAIL with per-gate findings. Never invokes the merge button. Use when verifying a PR is ready to merge, polling lifecycle progress, checking mergeability, or babysitting a GitHub PR…