output-dev-workflow-function

Instructions for writing a workflow.ts file for Output SDK, a TypeScript toolkit for defining and running multi-step workflows.

In plain words
What is it for?
Use it when creating, debugging, or reorganizing the file that coordinates workflow steps.
Why use it?
It prevents common structure and import mistakes and keeps the main workflow logic repeatable without direct outside actions.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/growthxai/output/output-dev-workflow-function
Any agent
npx skills add growthxai/output --skill output-dev-workflow-function
Clone the repo
git clone --depth 1 https://github.com/growthxai/output

Made for: Claude Code, Codex.

Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,867 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00031 $0.01867
Opus 5 $0.00015 $0.00933
Sonnet 5 $0.00006 $0.00373
Haiku 4.5 $0.00003 $0.00187

Measured 2d ago against content hash a88886a260c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

output-dev-workflow-function scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

coding_assistants/claude/plugins/outputai/skills/output-dev-workflow-function/SKILL.md · 326 lines

How it starts

The opening of the file, as written. The whole thing — 326 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Creating workflow.ts Files

Overview

This skill documents how to create workflow.ts files for Output SDK workflows. The workflow file contains the main orchestration logic that coordinates step execution.

When to Use This Skill

  • Creating a new workflow's main definition
  • Understanding workflow structure requirements
  • Debugging workflow orchestration issues
  • Refactoring existing workflow logic

Critical Rules

1. Import Pattern

// CORRECT - Import from @outputai/core
import { workflow, z } from '@outputai/core';

// WRONG - Never import z from zod
import { z } from 'zod';

2. ES Module Imports

All imports MUST use .js extension:

// CORRECT
import { stepName } from './steps.js';
import { WorkflowInputSchema } from './types.js';

// WRONG - Missing .js extension
import { stepName } from './steps';
import { WorkflowInputSchema } from './types';

3. Determinism Requirement

CRITICAL: The workflow fn must be deterministic. No direct I/O operations are allowed in the workflow function.

// WRONG - Direct I/O in workflow
export default workflow( {
  // ...
  fn: async input => {
    const response = await fetch( 'https://api.example.com' ); // NEVER do this!
    return response.json();
  }
} );

// CORRECT - Delegate I/O to steps
export default workflow( {
  // ...
  fn: async input => {
    const result = await fetchDataStep( input ); // Steps handle I/O
    return result;
  }
} );

Related Skill: output-error-nondeterminism

Basic Structure

import { workflow, z } from '@outputai/core';

import { stepOne, stepTwo } from './steps.js';
import { WorkflowInputSchema, WorkflowOutput } from './types.js';

export default workflow( {
  name: 'workflowName',
  description: 'Brief description of what the workflow does',
  inputSchema: WorkflowInputSchema,
  outputSchema: z.object( { /* output shape */ } ),
  fn: async ( input ): Promise<WorkflowOutput> => {
    // Orchestrate step calls
    const result = await stepOne( input );
    const final = await stepTwo( result );
    return final;
  }
} );

Read the full file on GitHub · 326 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 326 lines · 31 tokens per session scan A a88886a260c2

Subscribe to this mod's changes

output-dev-workflow-function is a skill published in the GitHub repository growthxai/output (434 stars, last pushed 4d ago), licensed Apache-2.0. It adds 31 tokens to every session and 1,867 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

lint-js

Lint JS/TS code only. Use before opening a PR when only JavaScript or TypeScript files were changed (no Rust).

denoland/deno · 29 tokens

electron-node-upgrade

Guide for performing Node.js version upgrades in the Electron project. Use when working on the roller/node/main branch to fix patch conflicts during e sync --3. Covers the patch application workflow, conflict resolution, analyzing upstream Node.js changes, building, running the Node.js test suite, and proper commit…

electron/electron · 69 tokens

git-cleanup

Clean up local git branches and remotes accumulated from PR reviews. Use when the user asks to clean branches, remove stale remotes, or tidy up the local git state.

alibaba/page-agent · 39 tokens

Shade dropdown surface contract

DropdownMenu, Select, and Popover share one visual recipe (bg-surface-elevated-2 + border-border/60 dark:border-border/30 + shadow-md). Change them together. Trigger when editing any of those three Shade files.

TryGhost/Ghost · 54 tokens

Shade ShadCN install

Guardrails for running pnpm dlx shadcn@latest add in Shade — never overwrite existing components, fresh branch first, swap raw colours for semantic tokens after integrating. Trigger when the user proposes a shadcn add, or when a fresh ShadCN-shaped file lands in apps/shade/src/components/ui.

TryGhost/Ghost · 72 tokens

Shade use primitives

Replace bare divs that only carry flex/grid/gap utilities with Shade primitives (Stack, Inline, Box, Grid, Container, Text). Use semantic gap="md" instead of gap-4. Trigger when editing TSX in Shade-consuming apps.

TryGhost/Ghost · 54 tokens