distributed-actors

Codify distributed actor design patterns for Swift Trebuchet projects.

Updated Jan 27, 2026
One-click install
npx skills add https://github.com/briannadoubt/trebuchet-plugin --skill distributed-actors
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: distributed-actors
Source: https://github.com/briannadoubt/trebuchet-plugin/tree/main/skills/distributed-actors
Command: npx skills add https://github.com/briannadoubt/trebuchet-plugin --skill distributed-actors

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Trebuchet projects often struggle to design, implement, and deploy distributed actors that are reliable, testable, and maintainable. This Skill provides best-practice guidance for structuring actors, applying the Trebuchet macro, and handling initialization, state management, and deployment configurations.

Core Features & Use Cases

  • Guidance on using the @Trebuchet macro to define distributed actors with correct protocol conformance.
  • Clear method design requirements, Codable parameters/returns, and error handling patterns.
  • Guidance on StatefulActor usage for persistence and deployment considerations.

Quick Start

Create a small sample actor using @Trebuchet, such as:

@Trebuchet distributed actor SampleRoom { // Initialization init(actorSystem: TrebuchetActorSystem) { // setup }

// Example distributed method
distributed func join(player: Player) -> RoomState {
    // implementation
    return RoomState()
}

}

Frequently Asked Questions about distributed-actors

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define distributed actors in Swift Trebuchet projects?

Distributed actor design in Trebuchet uses the @Trebuchet macro to enforce protocol conformance and reliable state handling. It guides initialization, Codable method parameters, and deployment configurations to ensure actors are testable and maintainable.

What are the method requirements for a Trebuchet distributed actor?

Trebuchet distributed actor methods require Codable parameters and return types for safe serialization. The Skill provides best-practice guidance on structuring these methods, applying the Trebuchet macro, and handling state management correctly.

How does Trebuchet handle state persistence for distributed actors?

Trebuchet handles state persistence using the optional StatefulActor pattern. The Skill provides guidance on StatefulActor usage to manage actor state reliably across deployments, ensuring consistency and testability for your Swift actors.

Can I use the @Trebuchet macro for stateful distributed actor deployments?

Yes, you can use the @Trebuchet macro for stateful distributed actor deployments. The Skill covers optional StatefulActor patterns for persistence, initialization setup, and deployment configurations to maintain reliable state across your system.

What are common limitations when designing Swift distributed actors with Trebuchet?

Limitations in Trebuchet distributed actor design include inconsistent state handling and error-prone deployment configurations without codified best practices. The Skill addresses these by enforcing TrebuchetActor conformance, Codable method types, and proper macro usage to prevent design flaws.