authority-check

Validates authorization decisions before writing routes, webhooks, and permission checks.

Updated Sep 17, 2026
One-click install
npx skills add https://github.com/coseto6125/claude-setup --skill authority-check-coseto6125
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: authority-check
Source: https://github.com/coseto6125/claude-setup/tree/main/skills/authority-check
Command: npx skills add https://github.com/coseto6125/claude-setup --skill authority-check-coseto6125

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Security gaps in new code — unguarded routes, missing tenant scoping, privilege grants on login paths — are usually discovered months later as audit findings. This Skill forces two design questions (who can reach this, what do they get) to be answered before the code exists, so the guard ships in the same commit as the feature. ## Core Features & Use Cases - Two-question gate: Names the least-privileged caller and what they obtain, ending the check immediately if the answer is nothing. - Decision table by surface: Maps routes, tenant queries, webhooks, model-callable tools, URL fetches, uploads, and input-built queries to the one decision each requires and where it lives in code. - Durability rules: Enforces default-closed parameters, deletion of dev-only routes instead of guarding them, and recording decisions as checks or comments in code rather than PR descriptions. - Use Case: Before adding a new API endpoint that returns tenant data, run the check to decide which middleware guards it and confirm the tenant ID comes from the session in the SQL WHERE clause. ## Quick Start Ask the assistant to run the authority check on the new endpoint or webhook handler you are about to write.

Frequently Asked Questions about authority-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check authorization before writing a new API route?▼

Answer two questions before coding: name the least-privileged caller who can reach the route, and state what they get by reaching it. If the caller should not have that access, add the guard decorator or middleware in the same commit as the route.

How should tenant scoping be enforced in database queries?▼

Put the tenant ID in the SQL WHERE clause, sourced from the session rather than from request parameters. This ensures every query is scoped by the authenticated context instead of trusting caller-supplied identifiers.

When should I use this check versus a full code security review?▼

Use this check while adding new code that carries authority, before it exists. A finished diff with every rung and look-alike belongs to a separate review skill; doing full review here costs more than it catches.

Should dev-only convenience routes be protected with environment flags?▼

No. A route behind an IS_DEV flag is one inverted boolean or misread env value away from production exposure. Write development conveniences as CLI commands or test fixtures instead of routes.

How do I securely handle webhook signature verification?▼

Verify the signature over the raw request body before decoding it, in the first lines of the handler. Decoding first can alter the bytes and cause valid signatures to fail or invalid ones to pass.