diff --git a/SKILL.md b/SKILL.md index f52f6c4..92a73a7 100644 --- a/SKILL.md +++ b/SKILL.md @@ -5,58 +5,35 @@ description: "找客户、找买家、开发客户、cold outreach。当用户 # Client Finder -Use `skill-credit` + `ecom run-flow` so agents only need workflow input `client_key`. -This skill includes query expansion before calling `/ecom/cold-outreach/run-flow`. +Skill-credit + ecom run-flow: query expansion → `/ecom/cold-outreach/run-flow`. Execution mode is fire-and-return: start workflow fast and return accepted immediately; terminal callbacks are handled by backend webhook delivery. +> Auth (CLIENT_KEY) is loaded automatically from `~/.openclaw/.env` by auth-runtime. No need to pass it. + ## Run Skill -Run the skill runner (primary entrypoint agents should call): - ```bash -/scripts/cliet-finder.sh --client-key='' "office machine" "us" +/scripts/cliet-finder.sh "office machine" "us" ``` -Optional: provide LLM-generated query expansion JSON. If provided, it must be valid and non-empty: +Optional: provide LLM-generated query expansion JSON: ```bash QUERY_EXPANSION_JSON='{"expandedQueries":["office machine supplier us","office equipment distributor us"],"primaryQuery":"office machine supplier us"}' \ -/scripts/cliet-finder.sh --client-key='' "office machine" "us" +/scripts/cliet-finder.sh "office machine" "us" ``` -Use dry-run to verify endpoint sequence without network calls: +Dry-run (no network calls): ```bash -/scripts/cliet-finder.sh --client-key='' "office machine" "us" --dry-run -``` - -## Quick Test - -Run the test wrapper (it calls the skill runner above): - -```bash -/scripts/run-endpoint-test.sh "office machine" "us" -``` - -Default behavior is `--dry-run`. For live execution, pass mode + client key as 3rd/4th args. - -```bash -/scripts/run-endpoint-test.sh "office machine" "us" --dry-run -/scripts/run-endpoint-test.sh "office machine" "us" --live "sk_xxx.yyy" +/scripts/cliet-finder.sh "office machine" "us" --dry-run ``` ## Required Inputs -For live execution: - -- `client_key` from workflow input (pass into script as `--client-key=`) - `query` (string) - `country` (optional, default `us`) -Optional runtime config: - -- `AUTH_BASE` (default: `https://api-gw-test.yuanwei-lnc.com`, can be passed as `--auth-base=`) - Optional: - `QUERY_EXPANSION_JSON` (optional LLM expansion input) @@ -74,8 +51,8 @@ For client onboarding and billing flow (Chinese), read [how-to-use.md](how-to-us - Remove leading `cold-outreach:` prefix (case-insensitive). 2. Exchange runtime token. -- Call `POST /auth/skill-credit/session` with `{ "clientKey": "" }`. -- Require `accessToken` in response. +- auth-runtime handles this automatically via `~/.openclaw/.env`. +- Calls `POST /auth/skill-credit/session` with `CLIENT_KEY`, caches token with TTL. 3. Expand query. - Build candidate queries from skill logic (`rule`) or `QUERY_EXPANSION_JSON` (`llm`). @@ -87,11 +64,9 @@ For client onboarding and billing flow (Chinese), read [how-to-use.md](how-to-us - `query` = `primaryQuery` - `country` - Require `workflowId` in response. -- This workflow only covers discovery + email-find data collection. 5. Return accepted immediately. - Return JSON with `workflowStatus = "accepted"` and `workflowId`. -- This runner does not poll or finalize billing. - Backend pushes terminal callback to webhook bound on the client key. ## Output Contract (Strict)