• 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-workflow-trace-file

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

ローカル(パソコン内に保存された)Output SDK ワークフロー追跡ファイルを読み込んで、きれいに整形された読みやすいマークダウン形式で結果を表示します。 次のような場合に使用: - ユーザーが最近実行したワークフローの出力結果を確認したい - ローカル追跡ファイルからの結果を見たい - 追跡出力をドキュメント形式で表示したい

原文を表示

Read and render the output of a local Output SDK workflow trace file as clean readable markdown. Use when the user wants to view what a recent workflow produced, see the result from a local trace file, or render trace output as a document.

ユースケース
  • ワークフローの出力結果を確認したい
  • ローカル追跡ファイルから結果を表示したい
  • 追跡出力をドキュメント形式で確認したい
本文(日本語訳)

Output.ai ワークフロー結果表示

ワークフロー実行のトレース(実行記録)から最終的な結果だけを抽出し、読みやすいマークダウン形式で表示します。

ユーザーが指定する引数は、ワークフロー名(例:context_competitors)または実行ID のいずれかです。引数が指定されない場合は、すべてのワークフローの中で最も新しいトレースを使用します。

実行手順

  1. トレースJSONファイルを探す:

    • トレースファイルは logs/runs/<ワークフロー名>/ フォルダ内にJSON形式で保存されています
    • ファイル名の形式: <タイムスタンプ>_<ワークフローID>.json
    • ワークフロー名が指定された場合:logs/runs/<ワークフロー名>/ 内で最新の .json ファイルを探します
    • 実行IDが指定された場合:すべての logs/runs/*/ フォルダを検索して、そのIDを含むファイル名のファイルを見つけます
    • 何も指定されない場合:すべての logs/runs/*/ フォルダ内で最も新しく更新されたJSONファイルを探します
  2. トレースファイルから結果を取り出す

    JSON ルートレベルの output フィールドだけが必要です。children や input は読み込みません。

    大きなファイル対応(トレースファイルは1万行以上になることがあります):

    • 最初に jq '.output' <ファイル> を試す — これが最速です
    • jq が使えない場合:ファイルの最後の500行を読む(output フィールドはJSON の根元にあり、ファイルの終わり近くにあります)。必要に応じてさかのぼって処理します
    • ファイルの最初から全体を読まないでください — children 配列には数千行のステップ詳細が含まれており、必要ありません
  3. マークダウンファイルを tmp/trace_result_<ワークフロー名>_<ID>.md に保存(tmp/ ディレクトリがなければ作成)します。以下の内容を含めます:

    ヘッダー(簡潔に)

    • 1行:ワークフロー名、ID、実行時間

    結果

    output を読みやすくきれいなマークダウン形式でレンダリング:

    • マークダウンを含む文字列フィールド → そのまま表示
    • オブジェクトの配列 → それぞれをサブセクションとして重要フィールド付きで表示
    • 文字列の配列 → 番号付きリスト
    • ネストされたオブジェクト → 主要な キー・バリューペア付きサブセクション
    • URL → リンク形式で表示
    • 長いテキスト抜粋 → ブロッククォート形式で表示

    目標は「デバッグ用」ではなく「読んで理解したい」ドキュメントです。見栄えよく整形してください。

  4. ユーザーに保存ファイルのパスを伝えます

重要な注意点

  • これは結果表示用 — デバッグ目的ではなく、読みやすさを優先します
  • ステップの詳細、入出力内容、ステップごとのタイミング情報は含めません
  • JSON コードブロックで囲まないでください — ドキュメントのように読める形式にします
  • 結果全体を省略なく含めます
原文(English)を表示

Show just the final output of an Output.ai workflow trace — the actual result, rendered as readable markdown.

The argument the user provided is either a workflow name (e.g. context_competitors) or a workflow run ID. If no argument is provided, use the most recent trace across all workflows.

Instructions

  1. Find the trace JSON file:

    • Trace files live in logs/runs/<workflow_name>/ as JSON files
    • Filenames follow the pattern: <timestamp>_<workflow_id>.json
    • If a workflow name is given, find the latest .json file in logs/runs/<workflow_name>/
    • If a run ID is given, search across all logs/runs/*/ folders for a file containing that ID in its filename
    • If no argument, find the most recently modified .json file across all logs/runs/*/ folders
  2. Extract the output from the trace file. You only need output from the JSON root — skip children and input.

    Strategy for large files (trace files can be 10k+ lines):

    • First, try jq '.output' <file> to extract directly — this is the fastest path
    • If jq is not available: read the last 500 lines of the file (the output field is at the root level, near the end of the JSON). Work backwards in chunks if needed
    • Do NOT read the entire file from the top — the children array with step details can be thousands of lines and you don't need any of it
  3. Save a markdown file to tmp/trace_result_<workflow_name>_<id>.md (create the tmp/ directory if it doesn't exist) with:

    Header (brief)

    • One line: workflow name, ID, duration

    Result

    Render output as clean, readable markdown:

    • String fields that contain markdown → render directly
    • Arrays of objects → render each as a sub-section with key fields
    • Arrays of strings → numbered lists
    • Nested objects → sub-sections with key-value pairs
    • URLs → render as links
    • Long text excerpts → render as blockquotes

    The goal is a document you'd want to READ, not debug. Make it look good.

  4. Tell the user the saved file path.

Important

  • This is a RESULT view — render for readability, not debugging
  • Do NOT include step details, inputs/outputs, or timing per step
  • Do NOT wrap things in JSON code blocks — this should read like a document
  • Include the full output without truncation

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