create-workflow

Creates standardized Kotlin workflows with configurable Props, State, Output, and Rendering.

1.1k|112|Updated Jun 2, 2020
One-click install
npx skills add https://github.com/square/workflow-kotlin --skill create-workflow-square
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-workflow
Source: https://github.com/square/workflow-kotlin/tree/main/workflow-core/.agents/skills/create-workflow
Command: npx skills add https://github.com/square/workflow-kotlin --skill create-workflow-square

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create and organize Square Workflow classes (StatefulWorkflow or StatelessWorkflow) with proper conventions, guiding developers to implement workflows, workers, and UI rendering effectively.

Core Features & Use Cases

  • Define Props, State, Output, and Rendering for Kotlin Workflows following library conventions.
  • Demonstrate StatefulWorkflow and StatelessWorkflow usage, including workers and child workflows.
  • Use Case: Bootstrap a new feature as a workflow with clear naming, rendering, and event handling.

Quick Start

Create a new workflow by choosing Stateful or Stateless, define Props, State, Output, and Rendering, then implement the workflow class and corresponding Screen.

Frequently Asked Questions about create-workflow

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

FAQPage Schema
How do I structure a Kotlin Workflow with state, props, and rendering?

To structure a Kotlin Workflow, define Props, State, Output, and Rendering data structures, then implement the workflow class by applying Square conventions for deterministic rendering and event handling.

When should I use StatefulWorkflow versus StatelessWorkflow in Kotlin?

Use StatefulWorkflow when your feature requires tracking state between renders, and choose StatelessWorkflow when rendering depends solely on props without internal state mutations.

How do I add workers and child workflows to a Kotlin Workflow?

Implement workers and child workflows within your Kotlin Workflow class by following library conventions to manage asynchronous tasks and nested business logic flows effectively.

What is the best way to standardize UI rendering and navigation flows in Kotlin?

Standardize UI rendering and navigation flows by building Kotlin Workflows that enforce deterministic rendering, clear state management, and structured event handling across your application.

Does creating a Kotlin Workflow require specific project dependencies?

Creating a Kotlin Workflow requires setting up the Square Workflow library in your project and defining a SKILL.md frontmatter with name and description, alongside optional scripts or assets folders.

Can I bootstrap a new feature as a Kotlin Workflow with clear naming conventions?

Yes, you can bootstrap a new feature as a Kotlin Workflow by defining the workflow type, setting up Props and State, implementing the class, and mapping the corresponding Screen for rendering.