Generate workflow skeleton files using the Output SDK CLI. Use when starting a new workflow, scaffolding project structure, or understanding the generated file layout.
Generates workflow skeleton files using the Output SDK CLI. Use when starting a new workflow or scaffolding project structure with `npx output workflow generate --skeleton`.
/plugin marketplace add growthxai/output-claude-plugins/plugin install growthxai-outputai-plugins-outputai@growthxai/output-claude-pluginsThis skill is limited to using the following tools:
This skill documents how to use the Output SDK CLI to generate a workflow skeleton. The skeleton provides a starting point with all required files and proper structure.
npx output workflow generate --skeleton
This command creates the basic file structure for a new workflow.
After running the skeleton generator, you will have:
src/workflows/{workflow-name}/
├── workflow.ts # Main workflow definition
├── steps.ts # Step function definitions
├── types.ts # Zod schemas and types
├── prompts/ # Empty folder for prompt files
└── scenarios/ # Empty folder for test scenarios
After generation, review each file to understand the template structure:
workflow.ts - Contains a basic workflow template:
import { workflow, z } from '@output.ai/core';
import { exampleStep } from './steps.js';
import { WorkflowInputSchema } from './types.js';
export default workflow({
name: 'workflowName',
description: 'Workflow description',
inputSchema: WorkflowInputSchema,
outputSchema: z.object({ result: z.string() }),
fn: async (input) => {
const result = await exampleStep(input);
return { result };
}
});
steps.ts - Contains example step template:
import { step, z } from '@output.ai/core';
import { ExampleStepInputSchema } from './types.js';
export const exampleStep = step({
name: 'exampleStep',
description: 'Example step description',
inputSchema: ExampleStepInputSchema,
outputSchema: z.object({ result: z.string() }),
fn: async (input) => {
// Implement step logic here
return { result: 'example' };
}
});
types.ts - Contains schema definitions:
import { z } from '@output.ai/core';
export const WorkflowInputSchema = z.object({
// Define input fields
});
export type WorkflowInput = z.infer<typeof WorkflowInputSchema>;
name property in workflow.tssnake_case (e.g., image_processor)camelCase (e.g., imageProcessor)In types.ts, define your actual input/output schemas:
import { z } from '@output.ai/core';
export const WorkflowInputSchema = z.object({
content: z.string().describe('Content to process'),
options: z.object({
format: z.enum(['json', 'text']).default('json')
}).optional()
});
export type WorkflowInput = z.infer<typeof WorkflowInputSchema>;
export type WorkflowOutput = { processed: string };
Related Skill: output-dev-types-file
Replace the example step with your actual step implementations:
import { step, z, FatalError, ValidationError } from '@output.ai/core';
import { httpClient } from '@output.ai/http';
import { ProcessContentInputSchema } from './types.js';
export const processContent = step({
name: 'processContent',
description: 'Process the input content',
inputSchema: ProcessContentInputSchema,
outputSchema: z.object({ processed: z.string() }),
fn: async ({ content }) => {
// Implement your logic
return { processed: content.toUpperCase() };
}
});
Related Skill: output-dev-step-function
Wire up your steps in the workflow:
import { workflow, z } from '@output.ai/core';
import { processContent } from './steps.js';
import { WorkflowInputSchema } from './types.js';
export default workflow({
name: 'contentProcessor',
description: 'Process content with custom logic',
inputSchema: WorkflowInputSchema,
outputSchema: z.object({ processed: z.string() }),
fn: async (input) => {
const result = await processContent({ content: input.content });
return result;
}
});
Related Skill: output-dev-workflow-function
If your workflow uses LLM operations, create prompt files:
prompts/
└── analyzeContent@v1.prompt
Related Skill: output-dev-prompt-file
Add test input files to the scenarios folder:
scenarios/
├── basic_input.json
└── complex_input.json
Related Skill: output-dev-scenario-file
After customization, verify your workflow:
npx output workflow list
Your workflow should appear in the list.
npx output workflow run {workflowName} --input path/to/scenarios/basic_input.json
Common issues after skeleton generation:
.js extensionzod instead of @output.ai/core// steps.ts
export const stepOne = step({ ... });
export const stepTwo = step({ ... });
export const stepThree = step({ ... });
// workflow.ts
const resultOne = await stepOne(input);
const resultTwo = await stepTwo(resultOne);
const resultThree = await stepThree(resultTwo);
// workflow.ts
const [resultA, resultB] = await Promise.all([
stepA(input),
stepB(input)
]);
// workflow.ts
if (input.processImages) {
await processImages(input);
}
After generating and customizing the skeleton:
snake_case namingworkflow.ts has correct name in camelCase.js extensionz is imported from @output.ai/coretypes.tssteps.tsnpx output workflow listoutput-dev-folder-structure - Understanding the complete folder layoutoutput-dev-workflow-function - Detailed workflow.ts documentationoutput-dev-step-function - Detailed steps.ts documentationoutput-dev-types-file - Creating Zod schemasoutput-dev-prompt-file - Adding LLM promptsoutput-dev-scenario-file - Creating test scenariosoutput-workflow-run - Running workflowsoutput-workflow-list - Listing available workflowsThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.