$npx -y skills add Xuxchloris/export_skills --skill trade-workflow-routerUse when a user mentions foreign trade, export sales, overseas customer development, B2B outreach, 外贸, 海外客户开发, or asks what trade-agent work can be done next
| 1 | # Trade Workflow Router |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Act as the entry point for foreign-trade workflows. The core rule is to ask the user to choose a clear task when their request is broad, then route the selected work to the relevant skill or executable tool. |
| 6 | |
| 7 | ## When to Use |
| 8 | |
| 9 | Use this skill when the user only mentions foreign trade, export sales, customer development, or asks what the agent can do. |
| 10 | |
| 11 | When the user already asks for a specific task, route directly to the matching skill without showing the full menu. |
| 12 | |
| 13 | ## Inputs |
| 14 | |
| 15 | - User request |
| 16 | - Existing profile configuration, if available |
| 17 | - Existing customer list, website URL, reply text, or quotation details, if provided |
| 18 | |
| 19 | ## Outputs |
| 20 | |
| 21 | ```json |
| 22 | { |
| 23 | "intent": "", |
| 24 | "selected_workflow": "", |
| 25 | "required_inputs": [], |
| 26 | "skills_to_use": [], |
| 27 | "tools_to_run": [], |
| 28 | "next_step": "" |
| 29 | } |
| 30 | ``` |
| 31 | |
| 32 | ## Procedure |
| 33 | |
| 34 | 1. If the user request is broad, ask the user to choose from this 外贸工作菜单: |
| 35 | 1. Find overseas prospects and collect lead candidates |
| 36 | 2. Process a CSV or Excel customer list in batch |
| 37 | 3. Research a company website |
| 38 | 4. Score and prioritize prospects |
| 39 | 5. Find decision-maker clues |
| 40 | 6. Write personalized outreach emails |
| 41 | 7. Classify buyer replies |
| 42 | 8. Plan follow-up tasks |
| 43 | 9. Create a quotation draft |
| 44 | 10. Export quotation HTML, PDF, or Excel files |
| 45 | 2. Ask the user to choose one item or describe the desired result in their own words. |
| 46 | 3. When file output is needed, ask for the preferred output format once and use the recommended default if the user does not care: |
| 47 | - prospect discovery: `csv` + `json` |
| 48 | - quotation export: `html` + `excel` |
| 49 | - pass the chosen formats to tools with `--formats` |
| 50 | 4. Route prospect collection to `prospect-discovery`; use `tools/collect_prospects.py` when file output is needed. If the agent has source pages for the current task, pass them as runtime `--source-url` values. If `DISCOVERY.yaml` sets `discovery_mode: "native_scrapling_spider"` or `scrapling_spider.enabled: true`, `collect_prospects.py` uses `tools/scrapling_spider_runner.py` and writes `prospects.raw.csv`, `prospects.raw.json`, and `crawl_report.json`. If MCP is configured, the same workflow is exposed by `tools/scrapling_mcp_server.py`. |
| 51 | 5. Route batch list processing to `prospect-list-enrichment`; use `tools/batch_prospect_pipeline.py` when one-step file output is needed. |
| 52 | 6. Route website background research to `company-research`. |
| 53 | 7. Route ranking and qualification to `prospect-scoring`. |
| 54 | 8. Route decision-maker work to `decision-maker-finder`; use `tools/decision_maker_finder.py` when JSON output is needed. |
| 55 | 9. Route personalized email drafting to `email-crafting`. |
| 56 | 10. Route inbound buyer messages to `reply-classification`. |
| 57 | 11. Route reminders and next-touch timing to `follow-up-planner`. |
| 58 | 12. Route quotations to `quotation-generator`; use `tools/render_quotation.py` for HTML, PDF, or Excel file export. |
| 59 | 13. When the user provides a website, CSV, Excel file, or discovery configuration, run the tool for the selected workflow before summarizing results. |
| 60 | 14. Do not output company facts, scores, buyer claims, or personalized email lines unless they are backed by fetched evidence from the downstream tool output. |
| 61 | 15. After completing one workflow, recommend the most relevant next workflow and ask whether the user wants to continue. |
| 62 | |
| 63 | ## Verification |
| 64 | |
| 65 | - Broad foreign-trade requests receive the menu before work begins. |
| 66 | - Specific requests route directly to the matching skill. |
| 67 | - The selected workflow lists missing inputs before execution. |
| 68 | - File-output workflows ask for an output format once, then use the recommended default when the user has no preference. |
| 69 | - The router does not claim completion before the selected downstream workflow finishes. |
| 70 | - Website and list workflows are based on fetched evidence, not generic examples. |
| 71 | - Prospect discovery with configured public source URLs produces `crawl_report.json`; if no rows are found, report that status instead of inventing prospects. |
| 72 | - The router offers a relevant next step after each completed workflow. |
| 73 | |
| 74 | ## Common Mistakes |
| 75 | |
| 76 | | Mistake | Fix | |
| 77 | | --- | --- | |
| 78 | | Showing the menu after a specific request | Route directly to the requested skill | |
| 79 | | Running every skill at once | Use only the selected workflow and required dependencies | |
| 80 | | Asking vague follow-up questions | List the exact missing files or fields | |
| 81 | | Stopping after one task without context | Offer the most relevant next workflow | |