access-control-best-practices

Community

RBAC-driven security patterns for API endpoints.

Authorlinskybing
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill provides structured, battle-tested RBAC and authorization patterns to ensure every API endpoint is protected with a consistent permission model across the platform-go project.

Core Features & Use Cases

  • Role-based authorization patterns (Admin, GroupAdmin, GroupManager, GroupMember, UserOrAdmin) and the corresponding middleware usage.
  • Resource-level authorization using extractors (FromIDParam, FromProjectIDInPayload) to validate access to a specific resource.
  • Migration and testing guidance, including evaluation of edge cases, audit logging, and error handling for secure endpoints.

Quick Start

Protect a route with GroupManager extractor and the corresponding middleware, e.g., route.PUT("/:id", authMiddleware.GroupManager(middleware.FromIDParam(repos.Project.GetGroupIDByProjectID)), handler)

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: access-control-best-practices
Download link: https://github.com/linskybing/platform-go/archive/main.zip#access-control-best-practices

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.