v0.x-to-authz-lib

Official

Migrate generated authorizers to forge/pkg/authz

Authorreliant-labs
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill fixes duplicated, inline per-service authorization decision logic by migrating legacy generated authorizers so their decision-making lives in the shared, tested forge/pkg/authz library.

Core Features & Use Cases

  • Detect legacy vs new generated authorizer shape by verifying whether your handlers’ authorizer_gen.go contains the older ~110-line struct-based logic or the newer ~35-line shim.
  • Regenerate deterministic shim code so every service’s authorizer_gen.go delegates to forge/pkg/authz while preserving the expected public API (NewGeneratedAuthorizer / Can / CanAccess).
  • Handle manual edge cases when user code references GeneratedAuthorizer by value, relies on private symbols, or needs custom Decider behavior.

Use case: you run forge upgrade and need to move from the inline matching template to the authz library-driven shim, ensuring empty-procedure and unknown-procedure deny behavior remains correct.

Quick Start

Run forge generate to rewrite handlers/*/authorizer_gen.go into the forge/pkg/authz shim shape, then build and test to confirm compatibility.

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: v0.x-to-authz-lib
Download link: https://github.com/reliant-labs/forge/archive/main.zip#v0-x-to-authz-lib

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 471,000+ vetted skills library on demand.