Skip to content
Development
Skill

/output-dev-folder-structure

Workflow folder structure conventions for Output SDK. Use when creating new workflows, organizing workflow files, or understanding the standard project layout.

From plugin
output
44451 skills5 agents

Claude Code

$ npx -y skills add growthxai/output --skill output-dev-folder-structure --agent claude-code

SKILL.md

output-dev-folder-structure.SKILL.md
name: output-dev-folder-structure
description: Workflow folder structure conventions for Output SDK. Use when creating new workflows, organizing workflow files, or understanding the standard project layout.
allowed-tools: [Read, Glob]

Workflow Folder Structure Conventions

Overview

This skill documents the standard folder structure for Output SDK workflows. Following these conventions ensures consistency across the codebase and enables proper tooling support.

When to Use This Skill

  • Creating a new workflow from scratch
  • Reorganizing an existing workflow
  • Understanding where to place different file types
  • Reviewing workflow structure for compliance

Standard Project Structure

src/
├── shared/                          # Shared code across workflows
│   ├── clients/                     # API clients (using @outputai/core/http)
│   ├── utils/                       # Utility functions & helpers
│   ├── services/                    # Business logic services
│   ├── steps/                       # Shared steps (optional)
│   └── evaluators/                  # Shared evaluators (optional)
└── workflows/
    └── {workflow-name}/             # Individual workflow directory
        ├── workflow.ts              # Workflow definition (REQUIRED)
        ├── steps.ts                 # OR steps/ folder
        ├── evaluators.ts            # OR evaluators/ folder (optional)
        ├── types.ts                 # Zod schemas and TypeScript types
        ├── utils.ts                 # Workflow-specific utilities (optional)
        ├── prompts/                 # LLM prompt templates (optional)
        │   └── {promptName}@v1.prompt
        └── scenarios/               # Test input scenarios (optional)
            └── {scenario_name}.json

File Purposes

workflow.ts (Required)

  • Contains the main `workflow()` function definition
  • Default exports the workflow
  • Must be deterministic - no direct I/O operations
  • Orchestrates step calls

**Related Skill**: `output-dev-workflow-function`

steps.ts or steps/ folder (Required)

  • Contains all `step()` function definitions
  • Handles all I/O operations (HTTP, LLM, file system, etc.)
  • Named exports for each step function
  • Includes error handling with FatalError and ValidationError

**Related Skill**: `output-dev-step-function`

evaluators.ts or evaluators/ folder (Optional)

  • Contains `evaluator()` function definitions
  • Used for workflow quality assessment and validation
  • Named exports for each evaluator function

types.ts (Required)

  • Contains Zod schemas for input/output validation
  • Exports TypeScript types derived from schemas
  • Imports `z` from `@outputai/core` (never from `zod`)

**Related Skill**: `output-dev-types-file`

utils.ts (Optional)

  • Contains pure helper functions
  • No I/O operations - those belong in steps
  • Shared utility logic for the workflow

prompts/ folder (Optional)

  • Contains `.prompt` files for LLM operations
  • File naming: `{promptName}@v1.prompt`
  • Uses YAML frontmatter and Liquid.js templating

**Related Skill**: `output-dev-prompt-file`

scenarios/ folder (Optional)

  • Contains JSON test input files
  • File naming: `{scenario_name}.json`
  • Matches workflow inputSchema structure

**Related Skill**: `output-dev-scenario-file`

Organization Options

Option 1: Flat Files (Recommended for smaller workflows)

src/workflows/{workflow-name}/
├── workflow.ts
├── steps.ts           # All steps in one file
├── evaluators.ts      # All evaluators in one file (optional)
├── types.ts
└── ...

Option 2: Folder-Based (For larger workflows)

src/workflows/{workflow-name}/
├── workflow.ts
├── steps/             # Steps split into individual files
│   ├── fetch_data.ts
│   ├── process.ts
│   └── validate.ts
├── evaluators/        # Evaluators split into individual files
│   ├── quality.ts
│   └── accuracy.ts
├── types.ts
└── ...

Component Location Rules (Strict)

The Output SDK enforces strict rules about where components can be defined:

| Component | Must be in | |-----------|------------| | `step()` calls | Files containing 'steps' in path | | `evaluator()` calls | Files containing 'evaluators' in path | | `workflow()` calls | `workflow.ts` file |

**Examples:**

  • `src/workflows/my_workflow/steps.ts` ✓
  • `src/workflows/my_workflow/steps/fetch_data.ts` ✓
  • `src/shared/steps/common_steps.ts` ✓
  • `src/workflows/my_workflow/helpers.ts` ✗ (cannot contain step() calls)

Import Rules (Activity Isolation)

Steps and evaluators are Temporal activities with isolation constraints to ensure deterministic replay.

Steps CAN import from:

  • Local workflow files: `./utils.js`, `./types.js`, `./helpers.js`
  • Local subdirectories: `./clients/pokeapi.js`, `./lib/helpers.js`
  • Shared utilities: `../../shared/utils/*.js`
  • Shared clients: `../../shared/clients/*.js`
  • Shared services: `../../shared/services/*.js`

Steps CANNOT import:

  • Other steps (activity isolation)
  • Evaluators
  • Workflow files

Evaluators follow the same rules:

  • CAN import local files and shared code
  • CANNOT import other evaluators, steps, or workflows

**Import Pattern Examples:**

// From workflow steps.ts - importing shared client
import { GeminiImageService } from '../../shared/clients/gemini_client.js';

// From workflow steps.ts - importing local utility
import { formatResponse } from './utils.js';

// From workflow steps.ts - importing types
import { InputSchema, OutputSchema } from './types.js';

// WRONG - steps cannot import other steps
import { otherStep } from '../../shared/steps/other.js'; // ✗

Shared Resources

src/shared/clients/

HTTP clients shared across workflows:

src/shared/clients/
├── gemini_client.ts     # Google Gemini API client
├── jina_client.ts       # Jina AI client
└── perplexity_client.ts # Perplexity API client

Import pattern in workflow steps:

import { GeminiImageService } from '../../shared/clients/gemini_c
Read more
@growthxai
Ships withoutput

The open-source TypeScript framework for building AI workflows and agents. Designed for Claude Code — describe what you want, Claude builds it, with all the best practices already in place. One framework.

44451 skills5 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
444
Star history of growthxai/output on GitHub, a chart by star-history.com

Other skills on output.

output-build-workflow

output-build-workflow

Implement an Output SDK workflow from a plan document. Use when the user asks to build, implement, or code a workflow from an…

@growthxai@growthxaiInstall Skill
output-credentials-edit

output-credentials-edi…

View, edit, and set encrypted credentials in an Output.ai project. Use when adding secrets, updating API keys, verifying…

@growthxai@growthxaiInstall Skill
output-credentials-init

output-credentials-ini…

Initialize encrypted credentials for an Output.ai project. Use when setting up credentials for the first time, adding…

@growthxai@growthxaiInstall Skill
output-debug-workflow

output-debug-workflow

Debug Output SDK workflow issues. Use when user reports a workflow failing, erroring, hanging, producing wrong results, or asks…

@growthxai@growthxaiInstall Skill
output-dev-agent-class

output-dev-agent-class

Use the Agent class for multi-step tool loops, conversation history, streaming progress, and reusable LLM agents. Use when…

@growthxai@growthxaiInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about output-dev-folder-structure.

Which coding agents can use output-dev-folder-structure?
output-dev-folder-structure installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.