fix: 修正 SKILL.md 中 35 处 search 参数形式(文档写 --query/--keyword,实际是位置参数) - #12
Open
fanyange wants to merge 2 commits into
Open
fix: 修正 SKILL.md 中 35 处 search 参数形式(文档写 --query/--keyword,实际是位置参数)#12fanyange wants to merge 2 commits into
fanyange wants to merge 2 commits into
Conversation
SKILL.md 把各站 search/suggest/news 的参数写成 `--query <str>` /
`--keyword <str>`,但二进制实际全是位置参数。照文档执行必然报错:
$ autocli zhihu search --keyword "大模型"
error: unexpected argument '--keyword' found
逐条对照 `autocli <site> <cmd> --help` 校准了 35 个表格行和 4 行示例代码。
参数名沿用各命令 help 里的真实写法(`<query>` / `<keyword>` / `<link>` /
可选的 `[keyword]`),未做统一改写。
另修 `bloomberg news`:它接受 `<link>`,是按 URL 读取单篇文章,
并非搜索,原描述 "Search news" 会把用法带偏。
校验方式:解析改后文档里每条位置参数声明,与 `--help` 输出逐条比对,
38 条全部一致(其中 3 条为顶层命令)。
`twitter search` 底层只读 X 的 Top 标签页,没有 Latest/live 入口。 Top 页会做模糊扩展,喂裸关键词串会静默丢词并返回数年前的内容—— 搜三个词往往只有第一个生效,结果看起来正常但完全跑题。 补一段说明和正反例,指出对策是用引号短语加 X 原生操作符 (`from:` / `since:` / `until:` / `OR` / `-filter:replies` 均可透传)。 如果后续打算给 search 加 `--product top|live` 之类的开关, 这段可以随之替换。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
SKILL.md 把各站
search/suggest/news的参数写成--query <str>或--keyword <str>,但 autocli 二进制实际全部使用位置参数。Agent 照文档执行会直接报错:因为 SKILL.md 是给 agent 读的,这类偏差的代价比普通文档错误高——agent 会先按文档失败一次,再自己摸索正确用法,每个新会话重复一遍。
改动
Commit 1 — 参数形式(35 处)
逐条对照
autocli <site> <cmd> --help校准了 35 个表格行和 4 行示例代码。参数名沿用各命令 help 里的真实写法,没有做统一改写:twitter search--query <str><query>zhihu search--keyword <str><query>weibo search--keyword <str><keyword>google news--query <str>[keyword](可选)bloomberg news--query <str><link>同时修了
bloomberg news的功能描述:它接受<link>,是按 URL 读取单篇文章,并非搜索,原来的 "Search news" 会把用法带偏。确实使用 flag 的命令未做改动。
Commit 2 — twitter search 精度说明(新增)
twitter search底层只读 X 的 Top 标签页,没有 Latest/live 入口。Top 页会做模糊扩展,喂裸关键词串会静默丢词:搜三个词往往只有第一个生效,返回数年前的内容,结果看起来正常但完全跑题。补了一段说明和正反例,指出对策是用引号短语加 X 原生操作符(from:/since:/until:/OR/-filter:replies均可透传)。这一条是新增内容而非修 bug,如果不合适可以只取 commit 1。若后续打算给
search加--product top|live之类的开关,这段也可以随之替换。校验
解析改后文档里每条位置参数声明,与
--help输出逐条比对,38 条全部一致(其中 3 条为顶层命令explore/cascade/generate),无残留的--query <str>/--keyword <str>声明,示例代码块同步修正。改后按文档实跑通过:
对照版本 autocli 0.3.8 / macOS arm64。