Loading...
Loading...
Use when a user asks to automatically generate a CLI command for a website. Takes a URL and optional goal, runs the full verified generation pipeline (explore, synthesize, cascade, verify), and returns a structured outcome. This is the primary entry point for "帮我生成 xxx.com 的 cli".
npx skill4agent add jackwener/opencli opencli-generateOne-shot automated CLI generation: give a URL, get a verified command or a structured explanation of why not.
opencli-exploreropencli-oneshotopencli-operate| Field | Required | Type | Description |
|---|---|---|---|
| Yes | string | Target website URL |
| No | string | Natural language intent hint (e.g. "热榜", "搜索", "最新帖子") |
goalopencli generate <url> [--goal <goal>] [--format json]generateVerifiedFromUrlinterface SkillOutput {
// Machine-readable decision fields (agent uses these for routing)
conclusion: 'success' | 'blocked' | 'needs-human-check';
reason?: StopReason | EscalationReason;
suggested_action?: SuggestedAction;
reusability?: Reusability;
// Structured data
command?: string; // e.g. "demo/hot"
strategy?: string; // "public" | "cookie"
path?: string; // YAML artifact path
// Human-readable summary (agent can relay to user directly)
message: string;
}no-viable-api-surfaceauth-too-complexno-viable-candidateexecution-environment-unavailableempty-resultsparse-fieldsnon-array-resultunsupported-required-argstimeoutselector-mismatchverify-inconclusivestopinspect-with-operateask-for-loginask-for-sample-argmanual-reviewverified-artifactunverified-candidatenot-reusableInput: url + goal?
|
v
Call generateVerifiedFromUrl(url, goal)
|
v
Receive GenerateOutcome
|
+-- status = 'success'
| conclusion: 'success'
| reusability: 'verified-artifact'
| command: outcome.adapter.command
| strategy: outcome.adapter.strategy
| path: outcome.adapter.path
| message: "已生成 {command},可直接使用 (策略: {strategy})"
| → END
|
+-- status = 'blocked'
| conclusion: 'blocked'
| reason: outcome.reason
| message: (see message templates below)
| → END
|
+-- status = 'needs-human-check'
conclusion: 'needs-human-check'
reason: outcome.escalation.reason
suggested_action: outcome.escalation.suggested_action
reusability: outcome.reusability
path: outcome.escalation?.candidate?.path (optional, only when reusable candidate exists)
message: (see message templates below)
→ END (upper-level agent decides next step)| conclusion | reason | message |
|---|---|---|
| — | "已生成 {command},可直接使用。策略: {strategy}" |
| | "该站点没有发现可用的 JSON API 接口,无法自动生成 CLI" |
| | "所有接口都需要超出自动化能力的认证方式(如 signature/bearer),无法自动生成" |
| | "发现了 API 接口,但未能合成有效的 CLI 候选" |
| | "浏览器未连接,请先运行 opencli doctor 检查环境" |
| | "候选需要参数 {args},请提供示例值后重试" |
| | "候选验证返回空结果,建议用 opencli-operate 检查" |
| | "候选验证结果字段不足,建议人工检查" |
| | "返回结果不是数组格式,建议用 opencli-operate 检查接口返回结构" |
| | "验证超时,建议用 opencli-operate 手动检查接口响应" |
| | "数据路径不匹配,建议用 opencli-operate 检查实际返回结构" |
| | "验证结果不确定,候选已保存在 {path},需要人工审查" |
needs-human-checkopencli-operatereasonsuggested_actionreusabilityGenerateOutcomemessagemessagegoalGenerateOutcomeGenerateOutcomeSkillOutputEarlyHintEarlyHint