Source profileQuality 92/100

event4u-app/agent-config/src/skills/security/SKILL.md

security

Use when applying security best practices — authentication, authorization, CSRF protection, input sanitization, rate limiting, or secure coding — stack-agnostic.

Source repository stars
7
Declared platforms
0
Static risk flags
0
Last source update
2026-07-28
Source checked
2026-07-28

Decision brief

What it does—and where it fits

Use when applying security best practices — authentication, authorization, CSRF protection, input sanitization, rate limiting, or secure coding — stack-agnostic.

Best for

  • Validation logic only — route to the project's validation carve-out (laravel-validation for Laravel; otherwise the framework-native primitive — Zod / class-validator, Pydantic, struct-tag validators).
  • Full security audit — route to security-audit.
  • You need a pre-implementation threat model — route to threat-modeling.

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/security"
Safe inspection promptEditorial

Inspect the Agent Skill "security" from https://github.com/event4u-app/agent-config/blob/0adf49a8ae84b0ff6e2de8759eea43257e020eff/src/skills/security/SKILL.md at commit 0adf49a8ae84b0ff6e2de8759eea43257e020eff. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Procedure: Implement security for a feature (stack-neutral)

    1. Read the project's auth doc (agents/authentication.md, docs/auth.md, or framework docs). 2. Read the project's authorization doc (gates / policies / voters / guards). 3. Locate existing authorization rules in the project's idiomatic location (Laravel app/Policies/, Symfony sr…

    Read the project's auth doc (agents/authentication.md, docs/auth.md, or framework docs).Read the project's authorization doc (gates / policies / voters / guards).Locate existing authorization rules in the project's idiomatic location (Laravel app/Policies/, Symfony src/Security/Voter/, NestJS .guard.ts).
  2. 02

    Step 0: Inspect

    1. Read the project's auth doc (agents/authentication.md, docs/auth.md, or framework docs). 2. Read the project's authorization doc (gates / policies / voters / guards). 3. Locate existing authorization rules in the project's idiomatic location (Laravel app/Policies/, Symfony sr…

    Read the project's auth doc (agents/authentication.md, docs/auth.md, or framework docs).Read the project's authorization doc (gates / policies / voters / guards).Locate existing authorization rules in the project's idiomatic location (Laravel app/Policies/, Symfony src/Security/Voter/, NestJS .guard.ts).
  3. 03

    Step 1: Authentication

    Identify the auth mechanism in use (session, JWT, OAuth, API token) — read the framework's auth config (config/auth.php, next-auth.config.ts, Symfony security.yaml, FastAPI dependency).

    Identify the auth mechanism in use (session, JWT, OAuth, API token) — read the framework's auth config (config/auth.php, next-auth.config.ts, Symfony security.yaml, FastAPI dependency).Check guard / strategy / provider configuration.Multi-tenant identification happens after authentication — see multi-tenancy.
  4. 04

    Step 2: Authorization

    1. Create / locate the authz rule in the framework's idiomatic primitive (Policy, voter, guard, middleware, route dependency). 2. Apply it at the request boundary (FormRequest authorize(), controller / route-handler dependency, middleware chain). 3. Cover non-model gates (cross-…

    Create / locate the authz rule in the framework's idiomatic primitive (Policy, voter, guard, middleware, route dependency).Apply it at the request boundary (FormRequest authorize(), controller / route-handler dependency, middleware chain).Cover non-model gates (cross-aggregate rules) — keep them centralised, not scattered across handlers.
  5. 05

    Step 3: Review for adversarial

    For security-sensitive changes, run adversarial-review. Focus on: attack surface, trusting user input, authorization gaps.

    For security-sensitive changes, run adversarial-review. Focus on: attack surface, trusting user input, authorization gaps.

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score92/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars7SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
event4u-app/agent-config
Skill path
src/skills/security/SKILL.md
Commit
0adf49a8ae84b0ff6e2de8759eea43257e020eff
License
MIT
Collected
2026-07-28
Default branch
main
View the original SKILL.md

security

When to use

Use when implementing authentication, authorization, or any security-sensitive functionality.

Do NOT use when:

  • Validation logic only — route to the project's validation carve-out (laravel-validation for Laravel; otherwise the framework-native primitive — Zod / class-validator, Pydantic, struct-tag validators).
  • Full security audit — route to security-audit.
  • You need a pre-implementation threat model — route to threat-modeling.
  • You need end-to-end authorization analysis — route to authz-review.

Stack-specific carve-outs

The procedure below is stack-agnostic. For framework-specific primitives (Laravel Policies / Gates / FormRequests, Symfony voters, NestJS guards, Next.js middleware), defer to:

StackCarve-out
Laravellaravel, laravel-validation, laravel-middleware
Symfonysymfony-workflow
Next.js / TSnextjs-patterns

Procedure: Implement security for a feature (stack-neutral)

Step 0: Inspect

  1. Read the project's auth doc (agents/authentication.md, docs/auth.md, or framework docs).
  2. Read the project's authorization doc (gates / policies / voters / guards).
  3. Locate existing authorization rules in the project's idiomatic location (Laravel app/Policies/, Symfony src/Security/Voter/, NestJS *.guard.ts).

Step 1: Authentication

  • Identify the auth mechanism in use (session, JWT, OAuth, API token) — read the framework's auth config (config/auth.php, next-auth.config.ts, Symfony security.yaml, FastAPI dependency).
  • Check guard / strategy / provider configuration.
  • Multi-tenant identification happens after authentication — see multi-tenancy.

Step 2: Authorization

  1. Create / locate the authz rule in the framework's idiomatic primitive (Policy, voter, guard, middleware, route dependency).
  2. Apply it at the request boundary (FormRequest authorize(), controller / route-handler dependency, middleware chain).
  3. Cover non-model gates (cross-aggregate rules) — keep them centralised, not scattered across handlers.

Step 3: Review for adversarial

For security-sensitive changes, run adversarial-review. Focus on: attack surface, trusting user input, authorization gaps.

Conventions

→ For PHP / Laravel specifics (auth helpers, mass assignment, Blade escaping, CSRF middleware): see guideline docs/guidelines/php/security.md. → For other stacks, follow the framework's hardening guide and the carve-outs above.

Validate

  • Verify all user input is validated at the boundary via the framework's primitive — never trust raw request data.
  • Confirm an authorization check exists for every state-changing action.
  • Check that no raw user input reaches SQL, HTML output, shell commands, or template renderers without escaping.
  • Run the project's type-checker — must pass (catches type-safety issues that enable injection).

Output format

  1. Security-hardened code with auth, input validation at the boundary, and output encoding.
  2. Authorization rule (Policy / voter / guard / middleware) co-located with the route.

Gotcha

  • Validation ensures format, not intent — don't trust input after validation alone.
  • "Throw" vs "boolean" authz APIs behave differently (Gate::authorize() throws vs Gate::allows() returns bool in Laravel; CanActivate in NestJS throws; FastAPI dependencies throw HTTPException). Pick based on how the framework expects failure to surface.
  • Rate-limit ALL public endpoints, not just login.
  • Never log passwords, tokens, or API keys.

Do NOT

  • Do NOT bypass the framework's request-validation primitive inside handlers.
  • Do NOT bulk-bind raw request payloads to ORM entities without an explicit allow-list ($fillable / $guarded, DTO mapping, Pydantic model).
  • Do NOT store plaintext passwords or secrets in the database.
  • Do NOT expose internal error details in production API responses.

Auto-trigger keywords

  • security
  • authentication
  • authorization
  • CSRF
  • XSS
  • policy

Alternatives

Compare before choosing