OA

openfga/agent-skills

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

5 stars 품질 66 트렌드 27Apache-2.0

OpenFGA skills for AI agents

개요

A comprehensive skill for AI agents to author, review, and refactor OpenFGA authorization models following best practices. This skill provides guidelines and patterns for: - - Types, relations, and permission structures - - Direct, concentric, indirect, and conditional relationships - - .fga.yaml test files and CLI usage - - User-defined roles and role assignments - - Code examples for JavaScript, Go, Python, Java, and .NET - .fga model files - .fga.yaml test files - OpenFGA relationship definitions - Permission structures and authorization logic - OpenFGA SDK code in any supported language - - @openfga/sdk - - github.com/openfga/go-sdk - - openfga_sdk (async and sync) - - dev.openfga:openfga-sdk - - OpenFga.Sdk The AGENTS.md file is generated from the individual reference files. To regenerate it after making changes: The script reads: - Section order and rule order from the Rule Index tables in skills/openfga/SKILL.md - Individual rule content from skills/openfga/references/*.

README

원문 README의 일부입니다. 원문 보기.

OpenFGA Best Practices Skill

A comprehensive skill for AI agents to author, review, and refactor OpenFGA authorization models following best practices.

Installation

npx skills add openfga/agent-skills

What’s Included

This skill provides guidelines and patterns for:

  • Authorization Model Design - Types, relations, and permission structures
  • Relationship Patterns - Direct, concentric, indirect, and conditional relationships
  • Testing & Validation - .fga.yaml test files and CLI usage
  • Custom Roles - User-defined roles and role assignments
  • SDK Integration - Code examples for JavaScript, Go, Python, Java, and .NET

Rule Categories

Category Description
Core Types, relations, tuples, schema basics
Relations Direct, concentric, indirect, conditional patterns
Design Permissions, hierarchies, naming, modules
Roles Simple static, custom, and resource-specific roles
Optimization Simplification, tuple minimization, type restrictions
Testing .fga.yaml structure, assertions, CLI validation
SDKs Language-specific client usage

When This Skill Activates

The skill triggers when working with:

  • .fga model files
  • .fga.yaml test files
  • OpenFGA relationship definitions
  • Permission structures and authorization logic
  • OpenFGA SDK code in any supported language

SDK Support

Includes complete examples for:

  • JavaScript/TypeScript - @openfga/sdk
  • Go - github.com/openfga/go-sdk
  • Python - openfga_sdk (async and sync)
  • Java - dev.openfga:openfga-sdk
  • .NET - OpenFga.Sdk

File Structure

openfga/
├── SKILL.md              # Skill metadata, rule index, and workflow
├── AGENTS.md             # Generated comprehensive guide (all rules expanded)
└── references/
    ├── core-*.md         # Core concept references
    ├── relation-*.md     # Relationship pattern references
    ├── design-*.md       # Design pattern references
    ├── roles-*.md        # Custom role references
    ├── optimize-*.md     # Optimization references
    ├── test-*.md         # Testing references
    ├── workflow-*.md     # Workflow references
    └── sdk-*.md          # SDK-specific references

Rebuilding AGENTS.md

The AGENTS.md file is generated from the individual reference files. To regenerate it after making changes:

node scripts/build-agents-md.js

The script reads:

  • Section order and rule order from the Rule Index tables in skills/openfga/SKILL.md
  • Individual rule content from skills/openfga/references/*.md

When adding new rules:

  1. Create the rule file in references/ with the appropriate prefix (e.g., core-, relation-, test-)
  2. Add the rule to the corresponding table in the Rule Index section of SKILL.md
  3. Run the build script to regenerate AGENTS.md

Example Usage

Once installed, AI agents will automatically apply these best practices when:

GitHub에서 전체 README 보기

추천 도구

다른 키워드를 입력하거나 필터를 제거해 보세요.

설치

npx skillfish add openfga/agent-skills
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →