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.
Fixes ESLint issues in migrated Output SDK code. Use when `npm run lint` shows errors after migration, or when writing new code that needs to follow project conventions.
/plugin marketplace add growthxai/output-claude-plugins/plugin install growthxai-outputai-flow-migrator-plugins-outputai-flow-migrator@growthxai/output-claude-pluginsThis skill is limited to using the following tools:
This skill helps fix ESLint issues that commonly arise during Flow to Output SDK migration. The Output SDK project enforces strict ESLint rules that must be followed in all code.
After Migration:
npm run lint shows errorsDuring Code Review:
Never use trailing commas in arrays, objects, or function parameters.
// WRONG
const config = {
name: 'workflow',
version: '1.0', // trailing comma
};
const items = [
'item1',
'item2', // trailing comma
];
// CORRECT
const config = {
name: 'workflow',
version: '1.0'
};
const items = [
'item1',
'item2'
];
Always include spaces inside array brackets.
// WRONG
const items = [item1, item2];
const empty = [];
// CORRECT
const items = [ item1, item2 ];
const empty = []; // empty arrays don't need spaces
Don't use return await, just return the promise directly.
// WRONG
async function getData() {
return await fetchData();
}
// CORRECT
async function getData() {
return fetchData();
}
// Also CORRECT (if you need to do something after)
async function getData() {
const result = await fetchData();
console.log( 'Fetched:', result );
return result;
}
Break long lines to stay under 150 characters.
// WRONG
const result = await generateObject( { prompt: 'analyze@v1', variables: { topic: input.topic, context: input.context, additionalInfo: input.additionalInfo } } );
// CORRECT
const result = await generateObject( {
prompt: 'analyze@v1',
variables: {
topic: input.topic,
context: input.context,
additionalInfo: input.additionalInfo
}
} );
Always include spaces inside parentheses (except empty ones).
// WRONG
if (condition) {
doSomething(arg1, arg2);
}
for (let i = 0; i < 10; i++) {
}
// CORRECT
if ( condition ) {
doSomething( arg1, arg2 );
}
for ( let i = 0; i < 10; i++ ) {
}
// Empty parentheses don't need spaces
fn();
new Class();
Use single quotes for strings, not double quotes.
// WRONG
const name = "workflow";
import { step } from "@output.ai/core";
// CORRECT
const name = 'workflow';
import { step } from '@output.ai/core';
Add spaces around operators.
// WRONG
const sum = a+b;
const isValid = count>0&&count<10;
// CORRECT
const sum = a + b;
const isValid = count > 0 && count < 10;
Use camelCase for variable names.
// WRONG
const user_name = 'John';
const UserData = {};
// CORRECT
const userName = 'John';
const userData = {};
Never use var, always use const or let.
// WRONG
var count = 0;
var name = 'test';
// CORRECT
let count = 0;
const name = 'test';
Include spaces inside object braces.
// WRONG
const obj = {key: 'value'};
// CORRECT
const obj = { key: 'value' };
npm run lint:fix
npx eslint src/workflows/my-workflow/*.ts
npx eslint --fix src/workflows/my-workflow/*.ts
import {z} from "@output.ai/core";
import {step, workflow} from "@output.ai/core";
const InputSchema = z.object({
user_id: z.string(),
search_query: z.string(),
});
export const searchStep = step({
name: "searchStep",
inputSchema: InputSchema,
fn: async (input) => {
var results = [];
if(input.search_query.length>0) {
const data = await fetchResults(input.search_query, input.user_id);
results = [data.item1, data.item2,];
}
return await processResults({results: results,});
},
});
import { z } from '@output.ai/core';
import { step, workflow } from '@output.ai/core';
const InputSchema = z.object( {
userId: z.string(),
searchQuery: z.string()
} );
export const searchStep = step( {
name: 'searchStep',
inputSchema: InputSchema,
fn: async ( input ) => {
let results = [];
if ( input.searchQuery.length > 0 ) {
const data = await fetchResults( input.searchQuery, input.userId );
results = [ data.item1, data.item2 ];
}
return processResults( { results: results } );
}
} );
// Flow SDK style (may have inconsistent quotes/spacing)
import {z} from "zod";
import { WorkflowScope } from "@flow/sdk";
// Output SDK style (consistent single quotes, spacing)
import { z, step, workflow } from '@output.ai/core';
// Flow SDK style
async function myActivity(param1: string, param2: number) {
// ...
}
// Output SDK style with ESLint compliance
export const myStep = step( {
name: 'myStep',
inputSchema: z.object( {
param1: z.string(),
param2: z.number()
} ),
fn: async ( input ) => {
const { param1, param2 } = input;
// ...
}
} );
npm run lint
npm run lint:fix
Review any errors that couldn't be auto-fixed and apply the rules above.
npm run lint
# Should exit with 0 errors
flow-error-zod-import - Zod import source issuesflow-convert-activities-to-steps - Step conversion with proper styleflow-validation-checklist - Complete migration validationCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.