Policies and authorization
Skill soden46/syarif-laravel-ai-skills/skills/policies-and-authorization
Laravel guidance to enforce access via Policies and Gates; use authorize() and authorizeResource() to standardize controller protectionsFrom its SKILL.md
npx -y skills add soden46/syarif-laravel-ai-skills --skill policies-and-authorizationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.0 KB, 349 tokens by cl100k_base, as published. Nobody here has run it
Policies And Authorization
Use this skill when a Laravel task involves policies and authorization.
This skill is adapted to the personal Laravel standards in this repository. It maps the public policies-and-authorization topic from jpcaparas/superpowers-laravel into the local policies-and-authorization catalog without copying third-party skill body text.
Syarif Defaults
- Follow Laravel conventions before introducing custom abstractions.
- Prefer project-local patterns when they are explicit and tested.
- Keep controllers focused on HTTP orchestration.
- Put validation, authorization, transactions, side effects, and integrations at clear boundaries.
- Keep client names, credentials, internal URLs, provider secrets, and project-specific business rules out of reusable standards.
- Verify important behavior with the smallest meaningful tests and quality checks.
Workflow
- Detect the Laravel version, PHP version, runner, package manager, and existing project conventions.
- Identify the smallest local skill set that overlaps this topic.
- Implement or review the change using Laravel-native APIs first.
- Add abstractions only when they reduce real complexity or protect a meaningful boundary.
- Run targeted tests and available quality checks before handoff.
Checkpoints
- Authorization and validation boundaries are explicit.
- Query shape, transactions, queues, cache, files, and external calls are intentional when touched.
- User-facing behavior has feature, unit, browser, or integration tests at the right level.
- Logs and errors are useful without exposing secrets or unnecessary personal data.
- Documentation or proposals avoid importing source-project names or one-off business rules.
Related Skills
using-laravel-standardsarchitecturetestingsecurity
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.
Gives 0 of the 12 instructions most auth identity skills give in 349 tokens
Counted across 408 of the 432 authors here whose files we hold, read 2026-09-06
- Use parameterized queries for all SQL and database access to prevent SQL injectionin 60 of 408, across 40 files
- Hash passwords with bcrypt or Argon2idin 50 of 408, across 34 files
- Store secrets in Vault or environment variablesin 37 of 408, across 17 files
- Add security headers to all responsesin 28 of 408, across 14 files
- Rate limit public endpoints per clientin 22 of 408, across 8 files
- Store tokens in httpOnly cookiesin 21 of 408, across 16 files
- Use HTTPS in productionin 17 of 408, across 4 files
- Apply rate limiting to all API endpointsin 17 of 408, across 9 files
- Validate all input with Bean Validationin 16 of 408, across 3 files
- Enable JWT or OIDC for stateless authenticationin 15 of 408, across 2 files
- Scan dependencies for CVEsin 15 of 408, across 2 files
- Log audit records for sensitive operationsin 15 of 408, across 2 files
Said here and by no other author read
- Use authorize() and authorizeResource() to protect controllers
- Use Laravel-native APIs first
- Follow Laravel conventions before custom abstractions
- Keep controllers focused on HTTP orchestration
- Place authorization and validation at explicit boundaries
- Prefer explicit, tested project-local patterns
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.