• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialdevelopment

output-build-workflow

プラグイン
outputai
ソース
GitHub で見る ↗
説明

計画書から出力SDK(アウトプット用の開発キット)ワークフローを実装する 次のような場合に使用: ユーザーが既存の計画から、ワークフローの構築・実装・コード化を依頼した場合、または「出力-計画-ワークフロー」によって計画が作成され、ユーザーがそれを実装する準備ができた場合

原文を表示

Implement an Output SDK workflow from a plan document. Use when the user asks to build, implement, or code a workflow from an existing plan, or after output-plan-workflow has produced a plan and the user is ready to build.

ユースケース
  • 既存の計画からワークフローを構築するとき
  • 計画をコード化して実装するとき
  • 出力SDKワークフローの実装準備ができたとき
本文(日本語訳)

Output.ai ワークフロー実装タスク

計画書に基づいて Output.ai ワークフローを実装してください。

ワークフローディレクトリはコマンドライン引数として指定されます(ワークフローディレクトリパス)。ワークフロー骨組みはそこに既に作成されているはずですが、作成されていない場合は最初に作成してください。

計画ファイルを読み込み、その仕様に従ってワークフローを実装してください。

実装プロセス全体の進捗追跡には todo ツールを使用してください。

実装ルール

概要

計画書に記載されたワークフローを実装します。Output SDK のパターンとベストプラクティスに従ってください。

<pre_flight_check> 実行: Claude スキル「output-meta-pre-flight」 </pre_flight_check>

<process_flow>

<step number="1" name="plan_analysis" subagent="workflow-context-fetcher">

ステップ 1: 計画の分析

計画書を読み込み、内容を理解してください。

  1. 指定された計画ファイルパスから計画ファイルを読み込む
  2. ワークフロー名、説明、目的を把握する
  3. 入出力スキーマの定義を抽出する
  4. 必要なステップとその関連性をすべてリストアップする
  5. プロンプトテンプレートが必要な LLM ベースのステップをメモする
  6. エラー処理と再試行の要件を理解する

</step>

<step number="2" name="workflow_implementation" subagent="workflow-quality">

ステップ 2: ワークフロー実装

ワークフローディレクトリの workflow.ts をワークフロー定義で更新してください。

<implementation_checklist>

  • 必要な依存関係をインポートする(workflow、z from '@outputai/core')
  • 計画仕様に基づいて inputSchema を定義する
  • 計画仕様に基づいて outputSchema を定義する
  • steps.ts からステップ関数をインポートする
  • 適切なオーケストレーション(組み合わせ・統合)ロジックでワークフロー関数を実装する
  • 計画に指定されている場合は条件分岐ロジックを追加する
  • 適切なエラー処理を追加する
  • 特定のステップまたはエバリュエーターエラーをキャッチする場合、instanceof ではなく hasErrorType(error, ErrorClass) を使う(「output-error-try-catch」参照) </implementation_checklist>

<workflow_template>

import { workflow, z } from '@outputai/core';
import { stepName } from './steps.js';

const inputSchema = z.object( {
  // 計画に基づいて定義
} );

const outputSchema = z.object( {
  // 計画に基づいて定義
} );

export default workflow( {
  name: 'workflow-name-from-plan',
  description: '計画からの説明',
  inputSchema,
  outputSchema,
  fn: async input => {
    // 計画からのオーケストレーションロジックを実装
    const result = await stepName( input );
    return { result };
  }
} );

</workflow_template>

</step>

<step number="3" name="steps_implementation" subagent="workflow-quality">

ステップ 3: ステップの実装

ワークフローディレクトリの steps.ts を計画のすべてのステップ定義で更新してください。

<implementation_checklist>

  • 必要な依存関係をインポートする(step、z from '@outputai/core')
  • 各ステップを適切なスキーマ検証とともに実装する
  • 計画で指定されているエラー処理と再試行ロジックを追加する
  • ステップ名が計画仕様と一致することを確認する
  • 複雑なロジックに対しては説明的なコメントを追加する </implementation_checklist>

<step_template>

import { step, z } from '@outputai/core';

export const stepName = step( {
  name: 'stepName',
  description: '計画からの説明',
  inputSchema: z.object( {
    // 計画に基づいて定義
  } ),
  outputSchema: z.object( {
    // 計画に基づいて定義
  } ),
  fn: async input => {
    // 計画からのステップロジックを実装
    return output;
  }
} );

</step_template>

</step>

<step number="3.5" name="evaluators_implementation" subagent="workflow-quality">

ステップ 3.5: エバリュエーターの実装(必要な場合)

計画にエバリュエーター関数が含まれている場合は、ワークフローディレクトリの evaluators.ts に実装してください。

<decision_tree> IF 計画にエバリュエーターが含まれている: evaluators.ts を作成 計画に従ってエバリュエーター関数を実装 ELSE: ステップ 4 にスキップ </decision_tree>

<implementation_checklist>

  • 必要な依存関係をインポートする(evaluator、z、結果タイプ from '@outputai/core')
  • LLM ベースのエバリュエーターを使う場合は generateText と aiSdk を '@outputai/llm' からインポートする
  • 各エバリュエーターを適切なスキーマ検証とともに実装する
  • 適切な結果タイプを使う(EvaluationBooleanResult、EvaluationNumberResult、EvaluationStringResult)
  • 信頼度スコア(0.0~1.0)を含める
  • 透明性のため理由を記載する
  • すべてのインポートは .js 拡張子を使う
  • データセット駆動検証のためのオフライン評価テストを検討する(「output-dev-eval-testing」スキル参照) </implementation_checklist>

<evaluator_template>

import { evaluator, z, EvaluationBooleanResult } from '@outputai/core';

export const evaluateName = evaluator( {
  name: 'evaluate_name',
  description: '計画からの説明',
  inputSchema: z.object( {
    // 計画に基づいて定義
  } ),
  fn: async input => {
    // 計画からの評価ロジックを実装
    return new EvaluationBooleanResult( {
      value: true,
      confidence: 0.95,
      reasoning: '評価の説明'
    } );
  }
} );

</evaluator_template>

</step>

<step number="4" name="prompt_templates" subagent="workflow-prompt-writer">

ステップ 4: プロンプトテンプレート(必要な場合)

計画に LLM ベースのステップが含まれている場合は、ワークフローディレクトリの prompts/ サブディレクトリにプロンプトテンプレートを作成してください。

<decision_tree> IF 計画に LLM ステップが含まれている: プロンプトテンプレートを作成 steps.ts を更新して loadPrompt と generateText を使う ELSE: ステップ 6 にスキップ </decision_tree>

<llm_step_template>

import { step, z } from '@outputai/core';
import { generateText } from '@outputai/llm';

export const llmStep = step( {
  name: 'llmStep',
  description: 'LLM ベースのステップ',
  inputSchema: z.object( {
    param: z.string()
  } ),
  outputSchema: z.string(),
  fn: async ( { param } ) => {
    const { result } = await generateText( {
      prompt: 'prompt_name@v1',
      variables: { param }
    } );
    return result;
  }
} );

</llm_step_template>

<prompt_file_template>

---
provider: anthropic
# 2026年5月4日現在 — 最新情報は output-dev-model-selection を実行してください
model: claude-sonnet-4-6
temperature: 0.7
---

<assistant>
あなたは役立つアシスタントです。
</assistant>

<user>

</user>

</prompt_file_template>

</step>

<step number="5" name="readme_update">

ステップ 5: README の更新

ワークフローディレクトリの README.md をワークフロー固有のドキュメントで更新してください。

<documentation_requirements>

  • ワークフロー名と説明を更新する
  • 例を含めて入力スキーマをドキュメント化する
  • 例を含めて出力スキーマをドキュメント化する
  • 各ステップの目的を説明する
  • 使用方法の例を提供する
  • 前提条件やセットアップ要件がある場合はドキュメント化する
  • テスト方法を含める </documentation_requirements>

</step>

<step number="6" name="scenario_creation">

ステップ 6: シナリオファイルの作成

ワークフロー テスト用にワークフローディレクトリの scenarios/ サブディレクトリに少なくとも 1 つのシナリオファイルを作成してください。

<scenario_requirements>

  • ディレクトリが存在しない場合は scenarios/ ディレクトリを作成する
  • inputSchema に一致する有効なサンプル入力を含む test_input.json を作成する
  • 入力値は現実的で、ワークフローの目的を示すものにする
  • JSON は有効でパースできる必要がある </scenario_requirements>

<scenario_template>

{
  // inputSchema に一致する例の値を入力
  // ワークフローを実演する現実的なテストデータを使う
}

</scenario_template>

<example> inputSchema が以下のワークフロー向け:

z.object( {
  topic: z.string(),
  maxLength: z.number().optional()
} )

scenarios/test_input.json を作成:

{
  "topic": "人工知能の歴史",
  "maxLength": 500
}

</example>

</step>

<step number="7" name="validation" subagent="workflow-quality">

ステップ 7: 実装の検証

実装が完了し、正しいことを確認してください。

<validation_checklist>

  • 計画のすべてのステップが実装されている
  • 入出力スキーマが計画仕様と一致している
  • ワークフロー オーケストレーションロジックが正しい
  • エラー処理が実装されている
  • LLM プロンプトが作成されている(必要な場合)
  • エバリュエーターが実装されている(計画に指定されている場合)
  • エバリュエーターが正しい結果タイプと信頼度スコアを使っている
  • README が正確な情報で更新されている
  • コードが Output SDK パターンに従っている
  • TypeScript 型が適切に定義されている
  • シナリオファイルが有効なサンプル入力とともに存在する
  • オフライン評価テストが作成されている(該当する場合) </validation_checklist>

</step>

<step number="8" name="post_flight_check">

ステップ 8: 飛行後チェック

実装が使用可能な状態になっていることを確認してください。

<post_flight_check> 実行: Claude スキル「output-meta-post-flight」 </post_flight_check>

</step>

</process_flow>

---- 開始 ----

引数として指定されたワークフロー名、ワークフローディレクトリ、計画ファイルパス、およびユーザーが指定した追加の指示を使用してください。

原文(English)を表示

Your task is to implement an Output.ai workflow based on a provided plan document.

The workflow directory is provided as an argument (the workflow directory path). The workflow skeleton should already have been created there; if it has not, create it first.

Please read the plan file and implement the workflow according to its specifications.

Use the todo tool to track your progress through the implementation process.

Implementation Rules

Overview

Implement the workflow described in the plan document, following Output SDK patterns and best practices.

<pre_flight_check> EXECUTE: Claude Skill: output-meta-pre-flight </pre_flight_check>

<process_flow>

<step number="1" name="plan_analysis" subagent="workflow-context-fetcher">

Step 1: Plan Analysis

Read and understand the plan document.

  1. Read the plan file from the provided plan file path
  2. Identify the workflow name, description, and purpose
  3. Extract input and output schema definitions
  4. List all required steps and their relationships
  5. Note any LLM-based steps that require prompt templates
  6. Understand error handling and retry requirements

</step>

<step number="2" name="workflow_implementation" subagent="workflow-quality">

Step 2: Workflow Implementation

Update workflow.ts in the workflow directory with the workflow definition.

<implementation_checklist>

  • Import required dependencies (workflow, z from '@outputai/core')
  • Define inputSchema based on plan specifications
  • Define outputSchema based on plan specifications
  • Import step functions from steps.ts
  • Implement workflow function with proper orchestration
  • Handle conditional logic if specified in plan
  • Add proper error handling
  • When catching a specific step or evaluator error, use hasErrorType(error, ErrorClass) instead of instanceof (see output-error-try-catch) </implementation_checklist>

<workflow_template>

import { workflow, z } from '@outputai/core';
import { stepName } from './steps.js';

const inputSchema = z.object( {
  // Define based on plan
} );

const outputSchema = z.object( {
  // Define based on plan
} );

export default workflow( {
  name: 'workflow-name-from-plan',
  description: 'Description from plan',
  inputSchema,
  outputSchema,
  fn: async input => {
    // Implement orchestration logic from plan
    const result = await stepName( input );
    return { result };
  }
} );

</workflow_template>

</step>

<step number="3" name="steps_implementation" subagent="workflow-quality">

Step 3: Steps Implementation

Update steps.ts in the workflow directory with all step definitions from the plan.

<implementation_checklist>

  • Import required dependencies (step, z from '@outputai/core')
  • Implement each step with proper schema validation
  • Add error handling and retry logic as specified
  • Ensure step names match plan specifications
  • Add descriptive comments for complex logic </implementation_checklist>

<step_template>

import { step, z } from '@outputai/core';

export const stepName = step( {
  name: 'stepName',
  description: 'Description from plan',
  inputSchema: z.object( {
    // Define based on plan
  } ),
  outputSchema: z.object( {
    // Define based on plan
  } ),
  fn: async input => {
    // Implement step logic from plan
    return output;
  }
} );

</step_template>

</step>

<step number="3.5" name="evaluators_implementation" subagent="workflow-quality">

Step 3.5: Evaluators Implementation (if needed)

If the plan includes evaluator functions, implement them in evaluators.ts in the workflow directory.

<decision_tree> IF plan_includes_evaluators: CREATE evaluators.ts IMPLEMENT evaluator functions per plan ELSE: SKIP to step 4 </decision_tree>

<implementation_checklist>

  • Import required dependencies (evaluator, z, result types from '@outputai/core')
  • Import generateText and aiSdk from @outputai/llm if using LLM-powered evaluators
  • Implement each evaluator with proper schema validation
  • Use appropriate result types (EvaluationBooleanResult, EvaluationNumberResult, EvaluationStringResult)
  • Include confidence scores (0.0-1.0)
  • Add reasoning for transparency
  • All imports use .js extension
  • Consider offline eval tests for dataset-driven verification (see output-dev-eval-testing skill) </implementation_checklist>

<evaluator_template>

import { evaluator, z, EvaluationBooleanResult } from '@outputai/core';

export const evaluateName = evaluator( {
  name: 'evaluate_name',
  description: 'Description from plan',
  inputSchema: z.object( {
    // Define based on plan
  } ),
  fn: async input => {
    // Implement evaluation logic from plan
    return new EvaluationBooleanResult( {
      value: true,
      confidence: 0.95,
      reasoning: 'Explanation of evaluation'
    } );
  }
} );

</evaluator_template>

</step>

<step number="4" name="prompt_templates" subagent="workflow-prompt-writer">

Step 4: Prompt Templates (if needed)

If the plan includes LLM-based steps, create prompt templates in the prompts/ subdirectory of the workflow directory.

<decision_tree> IF plan_includes_llm_steps: CREATE prompt_templates UPDATE steps.ts to use loadPrompt and generateText ELSE: SKIP to step 6 </decision_tree>

<llm_step_template>

import { step, z } from '@outputai/core';
import { generateText } from '@outputai/llm';

export const llmStep = step( {
  name: 'llmStep',
  description: 'LLM-based step',
  inputSchema: z.object( {
    param: z.string()
  } ),
  outputSchema: z.string(),
  fn: async ( { param } ) => {
    const { result } = await generateText( {
      prompt: 'prompt_name@v1',
      variables: { param }
    } );
    return result;
  }
} );

</llm_step_template>

<prompt_file_template>

---
provider: anthropic
# current as of 2026-05-04 — run output-dev-model-selection for the latest
model: claude-sonnet-4-6
temperature: 0.7
---

<assistant>
You are a helpful assistant.
</assistant>

<user>

</user>

</prompt_file_template>

</step>

<step number="5" name="readme_update">

Step 5: README Update

Update README.md in the workflow directory with workflow-specific documentation.

<documentation_requirements>

  • Update workflow name and description
  • Document input schema with examples
  • Document output schema with examples
  • Explain each step's purpose
  • Provide usage examples
  • Document any prerequisites or setup requirements
  • Include testing instructions </documentation_requirements>

</step>

<step number="6" name="scenario_creation">

Step 6: Scenario File Creation

Create at least one scenario file in the scenarios/ subdirectory of the workflow directory for testing the workflow.

<scenario_requirements>

  • Create scenarios/ directory if it doesn't exist
  • Create test_input.json with valid example input matching the inputSchema
  • Input values should be realistic and demonstrate the workflow's purpose
  • JSON must be valid and parseable </scenario_requirements>

<scenario_template>

{
  // Populate with example values matching inputSchema
  // Use realistic test data that demonstrates the workflow
}

</scenario_template>

<example> For a workflow with inputSchema:

z.object( {
  topic: z.string(),
  maxLength: z.number().optional()
} )

Create scenarios/test_input.json:

{
  "topic": "The history of artificial intelligence",
  "maxLength": 500
}

</example>

</step>

<step number="7" name="validation" subagent="workflow-quality">

Step 7: Implementation Validation

Verify the implementation is complete and correct.

<validation_checklist>

  • All steps from plan are implemented
  • Input/output schemas match plan specifications
  • Workflow orchestration logic is correct
  • Error handling is in place
  • LLM prompts are created (if needed)
  • Evaluators are implemented (if specified in plan)
  • Evaluators use correct result types and confidence scores
  • README is updated with accurate information
  • Code follows Output SDK patterns
  • TypeScript types are properly defined
  • Scenario file exists with valid example input
  • Offline eval tests created (if applicable) </validation_checklist>

</step>

<step number="8" name="post_flight_check">

Step 8: Post-Flight Check

Verify the implementation is ready for use.

<post_flight_check> EXECUTE: Claude Skill: output-meta-post-flight </post_flight_check>

</step>

</process_flow>

---- START ----

Use the workflow name, workflow directory, and plan file path provided as arguments, along with any additional instructions the user provided.

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。