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.
What this skill does
# 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/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:**
```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'; // ✗
```
## 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:
```typescript
import { GeminiImageService } from '../../shared/clients/gemini_client.js';
```
**Related Skill**: `output-dev-http-client-create`
### src/shared/utils/
Utility functions shared across workflows:
```
src/shared/utils/
├── string_helpers.ts
├── date_formatters.ts
└── validators.ts
```
### src/shared/services/
Business logic services shared across workflows:
```
src/shared/services/
├── image_service.ts
└── content_service.ts
```
### src/shared/steps/ (Optional)
Shared steps that can be imported by workflows:
```
src/shared/steps/
└── common_steps.ts
```
Note: Workflows import shared steps, but steps cannot import other steps directly.
## Naming Conventions
### Folder Names
- Use `snake_case` for workflow folder names
- Example: `image_infographic_nano`, `resume_parser`
### File Names
- Use `camelCase` for `.ts` files (except `workflow.ts`, `steps.ts`, `types.ts`, `evaluators.ts`)
- Use `camelCase@v{n}` for `.prompt` files
- Use `snake_case` for `.json` scenario files
### Workflow Names
- The `name` property in `workflow()` should be camelCase
- Example: `imageInfographicNano`
## Example: Complete Workflow Structure
```
src/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/
│ └── [email protected]
└── scenarios/
├── test_input_complex.json
└── test_input_solar_panels.json
```
## Verification Checklist
When reviewing workflow structure, verify:
- [ ] `workflow.ts` exists with default export
- [ ] `steps.ts` or `steps/` folder exists with all step definitions
- [ ] `types.ts` exists with Zod schemas
- [ ] All `.ts` imports use `.js` extension
- [ ] `prompts/` folder exists if LLM operations are used
- [ ] `scenarios/` folder exists with at least one test input
- [ ] Folder naming follows `snake_case` convention
- [ ] Workflow name in code follows `camelCase` convention
- [ ] Steps only import allowed dependencies (local files, shared code)
- [ ] No cross-component imports (steps don't import other steps)
## Related SkillRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.