api-service

Orchestrate transactional business logic with OpenFGA permission checks.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/charlie83Gs/communities --skill api-service
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-service
Source: https://github.com/charlie83Gs/communities/tree/main/.claude/skills/api-service
Command: npx skills add https://github.com/charlie83Gs/communities --skill api-service

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @openfga/sdk.

What problem does it solve?

Implementing complex business logic, orchestrating multiple data operations, and managing granular authorization can lead to tangled code and security vulnerabilities. This skill provides patterns for clean, secure, and transactional business logic.

Core Features & Use Cases

  • Business Logic Orchestration: Coordinate multiple repository operations to implement complex features and workflows, ensuring coherent application behavior.
  • OpenFGA Authorization: Implement robust, relationship-based access control by checking permissions (not roles) via OpenFGA, centralizing and simplifying security.
  • Transactional Integrity: Ensure data consistency with explicit rollback mechanisms for multi-step operations, preventing partial updates and data corruption.
  • Use Case: Implement a new "transfer wealth" feature. You'll orchestrate updates across wealth and council repositories, ensuring the user has can_create_wealth permission via OpenFGA, and that the entire operation rolls back if any step fails, guaranteeing data integrity.

Quick Start

Implement a service method to update a user's trust score, ensuring it first checks if the acting user has can_award_trust permission via OpenFGA.