一键导入
flow-validation-checklist
Complete migration validation checklist for Flow to Output SDK. Use after migration to verify completeness and correctness.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Complete migration validation checklist for Flow to Output SDK. Use after migration to verify completeness and correctness.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | flow-validation-checklist |
| description | Complete migration validation checklist for Flow to Output SDK. Use after migration to verify completeness and correctness. |
| allowed-tools | ["Bash","Read","Grep","Glob"] |
This skill provides a comprehensive checklist to validate a completed Flow to Output SDK migration. Use this after migration to ensure nothing was missed.
After Migration:
z imports from @outputai/core (not zod)Validation Commands:
# Check for wrong zod imports
grep -r "from 'zod'" src/workflows/my_workflow/
grep -r 'from "zod"' src/workflows/my_workflow/
# Should return nothing - all zod should be from @outputai/core
# Verify types.ts has Zod schemas
grep -c "z.object" src/workflows/my_workflow/types.ts
.prompt files{% if %} not {{#if}}){{ var }} not {{var}})name@version.prompt)Validation Commands:
# Check for remaining Handlebars syntax
grep -r "{{#if" src/workflows/my_workflow/
grep -r "{{/if}}" src/workflows/my_workflow/
# Should return nothing
# Check for variables without spaces
grep -r "{{[^{]" src/workflows/my_workflow/*.prompt 2>/dev/null | grep -v "{{ "
# Should return nothing - all variables should have spaces
# List all prompt files
ls src/workflows/my_workflow/*.prompt
# Verify frontmatter in each
head -10 src/workflows/my_workflow/*.prompt
z from @outputai/corestep() and workflow() imported from @outputai/coregenerateText() from @outputai/llm (with Output.object() for structured output)ValidationError/FatalError imported from @outputai/coreValidation Commands:
# Check for Flow SDK imports
grep -r "@flow/sdk" src/workflows/my_workflow/
grep -r "WorkflowScope" src/workflows/my_workflow/
# Should return nothing
# Verify correct imports
grep -r "@outputai/core" src/workflows/my_workflow/
grep -r "@outputai/llm" src/workflows/my_workflow/
workflow.ts contains workflow definition with export defaultsteps.ts contains all step definitionstypes.ts contains Input/Output interfaces and Zod schemasname@version.promptactivities.ts (renamed to steps.ts)prompts.ts or prompts.xml.js extensionValidation Commands:
# Check file structure
ls -la src/workflows/my_workflow/
# Expected files:
# - workflow.ts
# - steps.ts
# - types.ts
# - *.prompt files
# - scenarios/ directory (optional)
# Check for leftover files
ls src/workflows/my_workflow/activities.ts 2>/dev/null
ls src/workflows/my_workflow/prompts.ts 2>/dev/null
ls src/workflows/my_workflow/prompts.xml 2>/dev/null
# Should all return "No such file"
# Check import extensions
grep -r "from './" src/workflows/my_workflow/*.ts | grep -v ".js'"
# Should return nothing - all local imports should end with .js
workflow() function (not class)name propertydescription propertyexport defaultValidation Commands:
# Check workflow definition
grep -A10 "export default workflow" src/workflows/my_workflow/workflow.ts
# Verify no class-based workflow
grep "class.*Workflow" src/workflows/my_workflow/workflow.ts
# Should return nothing
step() functioninputSchema definedValidation Commands:
# List all steps
grep "export const.*= step" src/workflows/my_workflow/steps.ts
# Verify inputSchema for each step
grep -c "inputSchema:" src/workflows/my_workflow/steps.ts
ValidationError used for validation failuresFatalError used for unrecoverable errorsValidation Commands:
# Check for try-catch in workflow
grep -A20 "fn: async" src/workflows/my_workflow/workflow.ts | grep "try {"
# Should return nothing or minimal results
Manual Review:
npm run lint passesValidation Commands:
# Run lint
npm run lint -- src/workflows/my_workflow/
# Should pass with no errors
Validation Commands:
# Build
npm run output:workflow:build
# Run with test input
npx output workflow run my_workflow --input '{"testKey": "testValue"}'
Run this to check common issues:
#!/bin/bash
WORKFLOW_PATH="src/workflows/my_workflow"
echo "=== Migration Validation ==="
echo -e "\n1. Checking for wrong zod imports..."
grep -r "from 'zod'" $WORKFLOW_PATH && echo "FAIL: Found direct zod imports" || echo "PASS"
echo -e "\n2. Checking for Handlebars syntax..."
grep -r "{{#if" $WORKFLOW_PATH && echo "FAIL: Found Handlebars syntax" || echo "PASS"
echo -e "\n3. Checking for Flow SDK imports..."
grep -r "@flow/sdk" $WORKFLOW_PATH && echo "FAIL: Found Flow SDK imports" || echo "PASS"
echo -e "\n4. Checking for class-based workflow..."
grep "class.*Workflow" $WORKFLOW_PATH/workflow.ts && echo "FAIL: Found class-based workflow" || echo "PASS"
echo -e "\n5. Checking for try-catch in workflow..."
grep -A20 "fn: async" $WORKFLOW_PATH/workflow.ts | grep "try {" && echo "WARN: Found try-catch" || echo "PASS"
echo -e "\n6. Checking import extensions..."
grep "from './" $WORKFLOW_PATH/*.ts | grep -v ".js'" && echo "FAIL: Missing .js extension" || echo "PASS"
echo -e "\n7. Verifying file structure..."
[ -f "$WORKFLOW_PATH/workflow.ts" ] && echo "PASS: workflow.ts exists" || echo "FAIL: workflow.ts missing"
[ -f "$WORKFLOW_PATH/steps.ts" ] && echo "PASS: steps.ts exists" || echo "FAIL: steps.ts missing"
[ -f "$WORKFLOW_PATH/types.ts" ] && echo "PASS: types.ts exists" || echo "FAIL: types.ts missing"
echo -e "\n=== Validation Complete ==="
flow-error-zod-import - Fix zod import issuesflow-error-try-catch-removal - Remove try-catch antipatternflow-error-eslint-compliance - Fix ESLint issuesflow-conventions-folder-structure - Folder structure referenceValidate and fix folder structure for Output SDK workflows. Use to ensure migrated workflows follow the correct structure conventions.
Convert Flow SDK activities.ts to Output SDK steps.ts. Use when migrating activity functions to step definitions with typed parameters.
Convert inline prompts and prompt arrays to .prompt files with YAML frontmatter. Use when migrating prompts from Flow SDK format to Output SDK prompt files.
Convert Flow SDK workflow class to Output SDK workflow() function. Use when migrating workflow.ts files from class-based to functional definitions.
Create scenario files for testing migrated Output SDK workflows. Use to set up test inputs in the scenarios/ subfolder.
Fix ESLint issues in migrated Output SDK code. Use when seeing lint errors after migration, or when writing new Output SDK code that needs to follow project conventions.