Trade Pipeline Runのロゴ

Trade Pipeline Run

コミュニティ
Dangooy
trade-pipeline-run

Execute the trade document pipeline (RFQ → Quotation → PI → CI → PL) or price write-back

概要

公開者Dangooy
リポジトリtrade-pipeline-skill
スキル名trade-pipeline-run
スター
39
フォーク
7
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    DangooyがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Trade Pipeline Run」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/Dangooy/trade-pipeline-skill/tree/main/.claude/skills/trade-pipeline-run
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Dangooy/trade-pipeline-skill.git /tmp/trade-pipeline-skill
mkdir -p .claude/skills
cp -r /tmp/trade-pipeline-skill/.claude/skills/trade-pipeline-run .claude/skills/trade-pipeline-run
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでTrade Pipeline Runを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にTrade Pipeline Runを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Trade Pipeline Runは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Trade Pipeline Run — Execute the Document Pipeline

Trigger

When the user says: 处理询价单, 生成报价单, 做报价, 做PI, 做CI, 做PL, 跑管线, run pipeline, generate quotation, process inquiry, 处理这个Excel, 帮我出单

Prerequisites

Before running, verify in order:

  1. Current directory: must contain trade_pipeline/ directory. If not, cd to the repo root.

  2. Installation check: run trade-pipeline --help. If that command is not found, try python -m trade_pipeline --help, then python3 -m trade_pipeline --help (Mac / Linux have no bare python). If all fail, prompt:

    管线未安装。请在项目根目录(含 pyproject.toml)先建虚拟环境再安装:
    
      Mac / Linux:
        python3 -m venv .venv && source .venv/bin/activate
      Windows PowerShell:
        py -m venv .venv; .\.venv\Scripts\Activate.ps1
    
      pip install -e .
    
    (不能跳过虚拟环境:Homebrew 和多数 Linux 发行版的系统 Python 受 PEP 668 保护,
    直接 pip install 会报 externally-managed-environment。)
  3. Config check: Read trade_pipeline/config/config.yaml.

    • If seller name_en contains "ACME EXPORT" or buyer email contains ".example.com" → inform user: "当前使用示例配置,可以跑 demo 体验。真实业务请先说"初始化配置"运行 init skill。"
    • Continue regardless (demo mode is fine).

Flow 1: Pipeline Execution

Step 1: Collect Input

Use AskUserQuestion to ask:

Question 1 — 询价单路径:

  • If user already provided a file path in their message, use it directly
  • Otherwise ask: "询价单 Excel 文件路径?"
  • Verify the file exists with Read tool

Question 2 — 订单号:

  • Ask: "订单号?(用于命名输出文件)"
  • Options can include suggestions like DEMO, or user types custom

Question 3 — 选择客户:

  • Read trade_pipeline/config/config.yaml, extract buyer keys and name_en
  • Use AskUserQuestion with options:
    • Each configured buyer: buyer_id — name_en
    • _new — 新客户(buyer 信息填 TBD)
    • "Other" for manual input
  • Maximum 4 options (AskUserQuestion limit), prioritize most recently used

Step 2: Execute

Run via Bash:

bash
trade-pipeline --input <path> --order <order_no> --buyer <buyer_id>

If trade-pipeline command not found, fallback to:

bash
python -m trade_pipeline --input <path> --order <order_no> --buyer <buyer_id>

Do NOT add --interactive flag (default to review.json mode for safety).

Step 3: Report Results

If successful (exit code 0):

  • List all 6 generated files with paths
  • Show key stats: item count, buyer, seller, currency
  • If the output contains "⚠ 本次为降级结果" (LLM parse fell back to rules mode due to a malformed response, not a network/auth error): surface this warning to the user verbatim, don't bury it — the parsed data may be less accurate than a normal --use-llm run, so ask the user to double-check item details.
  • Prompt next step: "报价单已生成,单价列(黄色高亮)待填写。填好后说'价格填好了'触发回写。"

If buyer match failed (output contains "review.json"):

  • Show the review.json path
  • Explain: "buyer 匹配失败,已生成 review.json。"
  • review.json's candidate_values only contains raw buyer_id strings (e.g. global_fasteners) — not company names. Read trade_pipeline/config/config.yaml yourself and look up each candidate id's name_en (and address, if helpful) before showing anything to the user. Never show a bare buyer_id list.
  • Must display the full candidate list with real company names using AskUserQuestion, and have the user explicitly pick the correct one (or say "都不是,是新客户"). Only after the user's explicit choice, edit review.json to set resolved_value to that buyer_id, then rerun with --confirm.
  • Do NOT infer or guess a buyer_id from context (order history, similar past orders, etc.) and write it into resolved_value without the user naming it.

Flow 2: Price Write-Back

Trigger

价格填好了, 回写价格, 重新生成PI/CI, price update, 单价已填

Steps

  1. Locate the most recent quotation and model files:

    • Look in output/<most_recent_order>/ for *_quotation.xlsx and *_model.json
    • Or ask user to confirm paths
  2. Execute:

    bash
    trade-pipeline --price-update <quotation_path> --model <model_path>
  3. Report:

    • How many prices were updated
    • Whether PI/CI were regenerated
    • If errors occurred: show errors, advise to fix and retry
    • If PI/CI were regenerated, always end with this reminder — do not skip it: "PI/CI 是正式对外单证,发送给客户前请人工核对买家抬头、金额、税号是否正确。" Automated checks (precheck) only catch structurally invalid data (missing weight, bad format, unknown seller) — they cannot detect a correctly-formatted document sent to the wrong buyer or with a wrong amount that's still valid-looking.

Notes

  • This skill handles the runtime execution. For first-time configuration, use the trade-pipeline-init skill.
  • All generated files go to output/<order_no>/.
  • The pipeline generates 6 files: rfq.json, model.json, quotation.xlsx, pi.xlsx, ci.xlsx, pl.xlsx.
  • PI/CI are legally consequential documents. Whenever they're generated or regenerated, remind the user to manually verify buyer name/address, amounts, and tax IDs before sending — the pipeline's automated checks validate structure, not business correctness.
  • Price column in quotation is yellow-highlighted — this is the manual input point.
  • After price write-back, PI and CI are regenerated with actual amounts.

よくある質問

AIスキル「Trade Pipeline Run」では何ができますか?

Execute the trade document pipeline (RFQ → Quotation → PI → CI → PL) or price write-back

TypingMindでTrade Pipeline Runを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Trade Pipeline Runはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにTrade Pipeline Runをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/Dangooy/trade-pipeline-skill/tree/main/.claude/skills/trade-pipeline-runを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Trade Pipeline Runを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Trade Pipeline Runで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもTrade Pipeline Runを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Trade Pipeline Run」は無料ですか?

はい。DangooyがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇