security-patterns

Implement Elixir security patterns for authentication, authorization, and data protection.

1|1|Updated Jan 3, 2026
One-click install
npx skills add https://github.com/layeddie/ai-rules --skill security-patterns-layeddie
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-patterns
Source: https://github.com/layeddie/ai-rules/tree/main/skills/security-patterns
Command: npx skills add https://github.com/layeddie/ai-rules --skill security-patterns-layeddie

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Elixir-specific security patterns, OWASP mitigations, and compliance best practices.

Core Features & Use Cases

  • Authentication and authorization patterns using Ash policies and JWTs
  • Cryptography best practices (Argon2, secure comparisons, encryption at rest)
  • Input validation, CSRF protection, and secure cookie handling
  • Secrets management, configuration safety, and GDPR/SOC2/HIPAA compliance guidance
  • OWASP Top 10 mitigations with Elixir-focused examples
  • Practical, Elixir-oriented security guidelines for Phoenix apps and Ash domains

Quick Start

Review the Elixir-specific security patterns and apply the included examples for authentication, authorization, and data protection in your app.

Frequently Asked Questions about security-patterns

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

FAQPage Schema
How do I implement OWASP Top 10 mitigations in Elixir applications?

OWASP Top 10 mitigations for Elixir applications involve applying specific patterns for authentication, input validation, and CSRF protection. This Skill provides Elixir-focused examples using Plug and Ecto to enforce secure API design and data protection.

What's the best way to handle JWT authentication and authorization in Phoenix?

JWT authentication and authorization in Phoenix is best handled using Ash policies and JWTs for access control. This Skill codifies secure token handling patterns and RBAC enforcement specific to Elixir/BEAM projects.

How does Argon2 password hashing work with Ecto and Ash domains?

Argon2 password hashing with Ecto and Ash domains works by applying cryptography best practices for secure password storage and encrypted data at rest. This Skill provides specific patterns for integrating Argon2 into Elixir authentication flows.

Can I use these security patterns for GDPR, SOC2, and HIPAA compliance?

Yes, these security patterns support GDPR, SOC2, and HIPAA compliance activities by codifying secrets management, configuration safety, and secure cookie handling. The Skill provides Elixir-specific guidance for maintaining compliance standards.

How do I configure secure cookies and CSRF protection in Elixir?

Secure cookies and CSRF protection in Elixir are configured using Plug and standard security patterns. This Skill provides practical examples for input validation and secure cookie handling to protect Elixir applications.