Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Workflow folder structure conventions for Output SDK. Use when creating new workflows, organizing workflow files, or understanding the standard project layout.
.claude/skills/growthxai-output-dev-folder-structure/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 263% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 57% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 68% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 10% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 320% | 0% |
This skill documents the standard folder structure for Output SDK workflows. Following these conventions ensures consistency across the codebase and enables proper tooling support.
src/
├── shared/ # Shared code across workflows
│ ├── clients/ # API clients (using @outputai/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}.jsonworkflow() function definitionRelated Skill: output-dev-workflow-function
step() function definitionsRelated Skill: output-dev-step-function
evaluator() function definitionsz from @outputai/core (never from zod)Related Skill: output-dev-types-file
.prompt files for LLM operations{promptName}@v1.promptRelated Skill: output-dev-prompt-file
{scenario_name}.jsonRelated Skill: output-dev-scenario-file
src/workflows/{workflow-name}/
├── workflow.ts
├── steps.ts # All steps in one file
├── evaluators.ts # All evaluators in one file (optional)
├── types.ts
└── ...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
└── ...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)Steps and evaluators are Temporal activities with isolation constraints to ensure deterministic replay.
./utils.js, ./types.js, ./helpers.js./clients/pokeapi.js, ./lib/helpers.js../../shared/utils/*.js../../shared/clients/*.js../../shared/services/*.jsImport Pattern Examples:
typescript// 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'; // ✗
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 clientImport pattern in workflow steps:
typescriptimport { GeminiImageService } from '../../shared/clients/gemini_client.js';
Related Skill: output-dev-http-client-create
Utility functions shared across workflows:
src/shared/utils/
├── string_helpers.ts
├── date_formatters.ts
└── validators.tsBusiness logic services shared across workflows:
src/shared/services/
├── image_service.ts
└── content_service.tsShared steps that can be imported by workflows:
src/shared/steps/
└── common_steps.tsNote: Workflows import shared steps, but steps cannot import other steps directly.
snake_case for workflow folder namesimage_infographic_nano, resume_parsercamelCase for .ts files (except workflow.ts, steps.ts, types.ts, evaluators.ts)camelCase@v{n} for .prompt filessnake_case for .json scenario filesname property in workflow() should be camelCaseimageInfographicNanosrc/workflows/image_infographic_nano/
├── workflow.ts # workflow({ name: 'imageInfographicNano', ... })
├── steps.ts # generateImageIdeas, generateImages, validateReferenceImages
├── types.ts # WorkflowInputSchema, WorkflowOutput, step schemas
├── utils.ts # normalizeReferenceImageUrls, buildS3Url, etc.
├── prompts/
│ └── generateImageIdeas@v1.prompt
└── scenarios/
├── test_input_complex.json
└── test_input_solar_panels.jsonWhen reviewing workflow structure, verify:
workflow.ts exists with default exportsteps.ts or steps/ folder exists with all step definitionstypes.ts exists with Zod schemas.ts imports use .js extensionprompts/ folder exists if LLM operations are usedscenarios/ folder exists with at least one test inputsnake_case conventioncamelCase conventionoutput-dev-workflow-function - Writing workflow.ts filesoutput-dev-step-function - Writing step functionsoutput-dev-evaluator-function - Writing evaluators.ts filesoutput-dev-types-file - Creating Zod schemasoutput-dev-prompt-file - Creating prompt filesoutput-dev-scenario-file - Creating test scenariosoutput-dev-http-client-create - Creating shared HTTP clients| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 32,172 | 11,480 | -64% | 1 | 1 | 0% | 1,222 | 4,434 | +263% | 0 | 0 | — |
case-02 | fail→pass | 16,488 | 11,607 | -30% | 1 | 1 | 0% | 2,803 | 4,406 | +57% | 0 | 0 | — |
case-03 | fail→pass | 14,500 | 11,564 | -20% | 1 | 1 | 0% | 2,556 | 4,304 | +68% | 0 | 0 | — |
case-04 | fail→pass | 15,163 | 6,104 | -60% | 1 | 1 | 0% | 2,960 | 3,259 | +10% | 0 | 0 | — |
case-05 | fail→pass | 4,528 | 6,733 | +49% | 1 | 1 | 0% | 778 | 3,271 | +320% | 0 | 0 | — |
case-06 | fail→pass | 4,906 | 3,120 | -36% | 1 | 1 | 0% | 820 | 2,624 | +220% | 0 | 0 | — |
case-07 | fail→pass | 11,484 | 3,038 | -74% | 1 | 1 | 0% | 1,918 | 2,615 | +36% | 0 | 0 | — |
case-08 | fail→pass | 7,965 | 2,741 | -66% | 1 | 1 | 0% | 1,345 | 2,614 | +94% | 0 | 0 | — |
case-14 | fail→pass | 13,045 | 6,008 | -54% | 1 | 1 | 0% | 2,117 | 3,167 | +50% | 0 | 0 | — |
case-09 | fail→pass | 8,958 | 2,576 | -71% | 1 | 1 | 0% | 1,493 | 2,575 | +72% | 0 | 0 | — |
case-10 | fail→pass | 11,976 | 2,233 | -81% | 1 | 1 | 0% | 2,077 | 2,457 | +18% | 0 | 0 | — |
case-11 | fail→pass | 5,765 | 2,170 | -62% | 1 | 1 | 0% | 939 | 2,470 | +163% | 0 | 0 | — |
case-12 | pass→pass | 5,706 | 3,195 | -44% | 1 | 1 | 0% | 893 | 2,560 | +187% | 0 | 0 | — |
case-13 | fail→pass | 9,875 | 5,708 | -42% | 1 | 1 | 0% | 1,700 | 3,076 | +81% | 0 | 0 | — |
case-15 | pass→pass | 12,504 | 4,458 | -64% | 1 | 1 | 0% | 1,918 | 2,824 | +47% | 0 | 0 | — |
case-16 | fail→pass | 15,288 | 3,078 | -80% | 1 | 1 | 0% | 2,379 | 2,593 | +9% | 0 | 0 | — |
case-17 | pass→pass | 15,952 | 7,411 | -54% | 1 | 1 | 0% | 2,756 | 3,473 | +26% | 0 | 0 | — |
case-18 | fail→pass | 3,829 | 3,097 | -19% | 1 | 1 | 0% | 623 | 2,611 | +319% | 0 | 0 | — |
case-19 | fail→pass | 10,725 | 6,218 | -42% | 1 | 1 | 0% | 1,850 | 3,214 | +74% | 0 | 0 | — |
case-20 | pass→pass | 7,448 | 5,711 | -23% | 1 | 1 | 0% | 1,258 | 3,135 | +149% | 0 | 0 | — |
case-21 | pass→pass | 13,091 | 3,422 | -74% | 1 | 1 | 0% | 2,081 | 2,615 | +26% | 0 | 0 | — |
case-22 | fail→pass | 12,671 | 5,061 | -60% | 1 | 1 | 0% | 1,972 | 3,010 | +53% | 0 | 0 | — |
case-23 | pass→pass | 16,410 | 8,060 | -51% | 1 | 1 | 0% | 3,215 | 3,485 | +8% | 0 | 0 | — |
case-24 | pass→pass | 9,101 | 4,974 | -45% | 1 | 1 | 0% | 1,640 | 3,006 | +83% | 0 | 0 | — |
case-25 | pass→pass | 13,890 | 9,409 | -32% | 1 | 1 | 0% | 2,310 | 3,680 | +59% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted, and 24 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +68 percentage points is the difference between those two pass rates over the 24 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.