Skills

Writing Relayflows

Use when authoring a Relayflows flow (@relayflows/surface / @relayflows/sdk, the...

Install

npx skills add AgentWorkforce/relay --skill writing-relayflows -g -a claude-code -y
Repository
AgentWorkforce/relay1.1k
Category
AI and agents
Updated
3d ago
License
Apache-2.0
Context cost
Mediumabout 3,000 tokens
Runs scripts
No, instructions only

What it does

Use when authoring a Relayflows flow (@relayflows/surface / @relayflows/sdk, the journal-based v2 engine, the CLI is `flows`, package versions 2.0.x) in TypeScript or YAML/JSON. Covers the three-rung ladder (run/llm/agent), the resident verbs (human/dispatch/done), verification gates, TypeScript vs YAML authoring, per-step cli/model selection and its resolution order, flows.json, and `flows check`/`run`/`resume` with their real refusal shapes and exit codes. Not for the older, unrelated `@relayflows/core` WorkflowBuilder engine (`.pattern('dag')`/.agent()/.step() chains) that `writing-agent-relay-workflows` and `migrating-persona-to-relayflow` cover, that's a different product despite the similar name.

Overview

Relayflows turns a coding-agent task into steps a journal can inspect, verify, and resume. A flow is data (YAML/JSON) or code (TypeScript) that compiles to the same journal-backed kernel spec. Every effect is journaled before it's treated as real, a journal write that fails fails the step, with no silent fallback.

Name collision warning. This repo also has skills for an older, unrelated engine that is also casually called "Relayflow" (singular), @relayflows/core's WorkflowBuilder, a chained builder (workflow('name').pattern('dag').agent(...).step(...).run()). That's writing-agent-relay-workflows and migrating-persona-to-relayflow's territory. This skill is the v2 engine: @relayflows/surface's flow() function and the YAML/JSON dialect compiled by @relayflows/sdk. If you see .pattern(, .agent( as a chained builder call, or ctx.workflow.run(), you're in the other engine, stop and use one of those skills instead.

When to use this skill

  • Writing a new .flow.ts or .flow.yaml/.flow.json for the flows CLI (package @relayflows/sdk, binary name flows).
  • Deciding whether a step needs run (shell), llm (bare model call), or agent (harnessed coding agent in a workspace).
  • Wiring up cli/model for an agent or llm step, in either language.
  • Debugging a REFUSED [...] message from flows check or flows run.
  • Choosing between TypeScript and YAML for a given flow.

The ladder

Three step verbs, one per rung, never more (packages/sdk/src/spec.ts, export type StepType = 'deterministic' | 'llm' | 'agent';):

  1. run / deterministic, a shell command. No model. Implicit gate is exit_code == 0.
  2. llm / llm, a bare model call. Prompt in, verified output out. No workspace, no tool use.
  3. agent / agent, a harnessed coding agent in a workspace. Returns { summary, artifacts }, not raw text.
Read the whole SKILL.md on GitHub

More in AI and agents