AgentSkillsCN

rls-policy-testing

验证 RLS 策略与基于角色的访问控制。适用于用户提到 RLS 测试、角色访问权限检查,或权限校验时使用。

SKILL.md
--- frontmatter
name: rls-policy-testing
description: Validate RLS policies and role-based access. Use when the user mentions RLS testing, role access checks, or permissions validation.

RLS Policy Testing

Quick Start

  1. Identify role and table scope.
  2. Run role-specific tests.
  3. Summarize access violations.

Steps

  • Use docs and tests:
    • docs/AUTH_ROLES.md
    • tests/rls/
    • tests/admins/, tests/therapists/, tests/clients/
    • cypress/e2e/auth-roles.cy.ts
    • cypress/e2e/role_access.cy.ts

Output

  • Failing roles/tables and remediation hints.