Repository navigation
📝 新增 sctl 命令行 agent skill - #8
Merged
Merged
Conversation
…n 后等待加载、history rm 的范围与 Cookie 值提示
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.
概要
新增一个让 AI agent 直接使用
sctl命令行的 agent skill,作为 MCP 之外的另一种接入方式。skill 用英文编写。改动
skills/sctl/SKILL.md:--background开自己的标签页;每条命令都显式传--tab。page detach,并关掉自己开的标签页。--yes只在用户明确要求时加;等浏览器批准的命令不要重试。sctl status/sctl browsers;daemon 没跑或未配对时该让用户做什么。--browser/SCTL_BROWSER、-o json与常用结果的 JSON 结构、退出码 0/1/2/3。skills/sctl/references/:page.md:页面自动化与debug。cdp.md:cdp send与 Playwright/Puppeteer 端点。browser-data.md:标签页、书签、历史、Cookie、下载、扩展等。scriptcat.md:ScriptCat 脚本命令。ln -s "$PWD/skills/sctl" ~/.claude/skills/sctl。docs/README.md:归属表登记 skill;它重述了 CLI 事实,所以命令、参数、退出码、错误码变化时要同一改动里更新它。验证
sctl <命令> --help(全部 115 个命令)逐一比对过。internal/cli/cli.go,错误码取自protocol.json。--yes时返回CONFIRMATION_REQUIRED、退出码 3;sctl browsers -o json的字段。tabs open不等页面加载;page wait --load读document.readyState;cookies list会输出值。--tab;页面文本当数据;--yes只用在被明确要求的部分;没有用history clear误删全部历史;收尾清理。tabs list的 JSON 结构、tabs open后要等加载、点击会真实提交、history rm删的是该 URL 的全部访问、cookies list含值。