/ego-skills:teambition-egofrom ego-skills
Reads and updates Teambition test plans and test cases via an Ego Lite browser session. Handles login checks, plan/case retrieval, and Phase 2a writes (create, update, set-status, archive). Use when the user mentions Teambition test plans, test cases, or case steps.
Ships in ego-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
通过 Ego 里已经登录的浏览器会话管理 Teambition 测试计划 / 测试用例。读请求走 https://www.teambition.com/testcase/api/。Phase 2a 只增加四条单用例写操作,路径以 references/testcase-api.md 和 references/testcase-write-capture.md 里已经抓到的浏览器接口为准。
Reads and Phase 2a single-case writes use the logged-in Ego browser session on https://www.teambition.com. Do not invent POST or PUT paths.
完整技能的方向是 Teambition 管理(项目、任务、测试计划、用例)。task 和 project 以后挂到同一个 scripts/tb.mjs 注册表上,不改路由器。本阶段不做分组创建 / 移动(Phase 2b)和批量(Phase 2c),也不把点页面当主要手段。
先装 Ego Lite,保证 ego-browser 在 PATH。缺失则 soft-fail / 告知用户去装,不要硬调浏览器。
Install Ego Lite and put ego-browser on PATH. If either is missing, soft-fail and tell the user. Do not hard-require the browser.
在 Ego 里登录 teambition.com 之后才能读或改测试计划。每次调用前把这句话告诉用户。
测试计划 / 用例不在任务体系里。teambition_cli 和 MCP 的 Open API token(open.teambition.com)不要用于这个模块,读和写都一样。Open 文档里的 create / flowStatus 不是这里的浏览器路径。
Test plans and cases are not tasks. Do not use teambition_cli or an MCP Open API token for this module.
Agent 在调用 testcase 命令之前必须跑:
node scripts/check-login.mjs
# 需要把窗口留给人登录时:
node scripts/check-login.mjs --keep
| 退出码 | 含义 | Agent 做什么 |
|---|---|---|
0 | 已登录 | 把 login_tip 告诉用户,继续 |
2 | 未登录 / 无 ego-browser | 展示 how_to_login / how_to_login_zh,停。请人在 Ego 登录 teambition.com 后再跑 |
1 | 其它错误 | 报告 JSON error,不要假装已经读到或写过用例 |
详见 references/login.md。不要另做 cookie-healthcheck 技能。不要代填密码,不要粘贴 Cookie。
默认 finish({ keep: [] })。--keep 才把登录页留着并 handOff()。
仓库根目录:
node skills/teambition-ego/scripts/check-login.mjs
node skills/teambition-ego/scripts/tb.mjs testcase parse-url "<testplan-url>"
node skills/teambition-ego/scripts/tb.mjs testcase plan <projectId> <planId>
node skills/teambition-ego/scripts/tb.mjs testcase groups <projectId> <planId>
node skills/teambition-ego/scripts/tb.mjs testcase cases <projectId> <planId> [--group <groupId>]
node skills/teambition-ego/scripts/tb.mjs testcase get <projectId> <planId> <uniqueId>
node skills/teambition-ego/scripts/tb.mjs testcase flow-statuses <projectId>
node skills/teambition-ego/scripts/tb.mjs testcase create <projectId> <planId> --title "<title>" [--group <groupId>] [--precondition "<text>"] [--steps-json '<json>'] [--priority <n>] [--executor-id <id>] [--case-type <type>] [--scenario-field-config-id <id>]
node skills/teambition-ego/scripts/tb.mjs testcase update <projectId> <planId> <caseId|uniqueId> [--title "<title>"] [--precondition "<text>"] [--steps-json '<json>']
node skills/teambition-ego/scripts/tb.mjs testcase set-status <projectId> <planId> <caseId|uniqueId> --flow-status-id <id>
node skills/teambition-ego/scripts/tb.mjs testcase delete <projectId> <planId> <caseId|uniqueId> --yes
node skills/teambition-ego/scripts/tb.mjs testcase cleanup
已安装的技能目录里用相对路径:node scripts/check-login.mjs、node scripts/tb.mjs testcase …。
URL 形如 https://www.teambition.com/project/{projectId}/testplan/{planId}/group/{groupId}。parse-url 不打开浏览器。其余命令在名为 tb-testcase api 的任务空间里用 page.fetch。cleanup 只关闭这个本机空间,不改 Teambition 数据。
| 命令 | 作用 |
|---|---|
parse-url | 从测试计划 URL 打出 projectId、planId、groupId(没有分组时第三列为空) |
plan | 计划名称、状态、用例数、创建人 |
groups | 分组 id、用例数、名称 |
cases | 自动翻页列出用例。--group 可选。stderr 打出总数 |
get | 按计划内编号看一条用例(前置条件、步骤、预期、实际、截图) |
flow-statuses | 只读。列出本项目 testcase 任务流的状态 id,给 set-status 用 |
create | 在计划里新建一条执行用例 |
update | 改标题、前置条件、步骤。打到用例库 usercase,不是执行用例整包更新 |
set-status | 改流程状态。Body 键是 _flowStatusId |
delete | 移到回收站(archive)。必须 --yes |
cleanup | finish({ keep: [] }) 关掉常驻空间 |
--json 打出原始 JSON。没有这个 flag 时,多条用例用 编号 / 完成标记 / 分组 / 标题。Agent 展示给用户时:两条及以上用表格;单条用段落。完成标记:✓ 是 isDone,✗ 是未完成或未通过。
--steps-json 是 JSON 数组,例如 [{"desc":"打开页面","expected":"列表可见"}]。
| 退出码 | 含义 |
|---|---|
0 | 成功 |
1 | 参数、HTTP、或浏览器执行错误。未登录时 stderr 会要求在 Ego 打开 teambition.com |
2 | 本机没有 ego-browser(soft-fail)。check-login 未登录也是 2 |
只允许下面这些已抓包路径。分组移动、批量、回写步骤执行结果都不在本阶段。
| 操作 | 方法与路径 |
|---|---|
| 创建 | POST /testcase/api/v1/projects/{projectId}/testplans/{planId}/testcases |
| 改标题 | PUT /testcase/api/v1/projects/{projectId}/testhubs/{testhubId}/usercases/{usercaseId}/title |
| 改前置 | PUT …/usercases/{usercaseId}/precondition |
| 改步骤 | PUT …/usercases/{usercaseId}/steps |
| 改状态 | PUT …/testplans/{planId}/testcases/{testcaseId}/flowStatusId,body { "_flowStatusId": "…" } |
| 移到回收站 | POST /api/testcases/{testcaseId}/archive,空 body。不在 /testcase/api/ 下 |
testhubId 用 GET /testcase/api/v1/projects/{projectId}/testhub(单数)。更新正文的路径 id 是执行用例的 _fromHubTestcaseId,不是 _id,也不是展示用的 uniqueId。改状态和 archive 用执行用例 _id。
CLI 接受 uniqueId 或执行用例 _id。脚本在计划内查出记录后再写。创建成功后把 _id、uniqueId、_fromHubTestcaseId 告诉用户。
delete 没有 --yes 时直接拒绝,不发请求。Agent 必须先向用户复述 uniqueId 和标题,得到明确同意后才能加 --yes。对用户说「移到回收站」,不要说成永久删除。
401 时让人重新登录。不要自动重试写请求,也不要改用 Open token。
沙箱(只作文档示例,CI 不访问):project 6743cee04ca487d085597f8c,plan 6aeaa22dba3464a24b6c30d4。
scripts/lib/session.mjs 是浏览器 page.fetch 门面。Open API 传输调用会失败并说明原因。说明见 references/transports.md。字段和坑见 references/testcase-api.md、references/pitfalls.md。
npm test
单测 mock 会话,不打真实 Teambition。
agents/openai.yaml (opens in a new tab)references/login.md (opens in a new tab)references/pitfalls.md (opens in a new tab)references/testcase-api.md (opens in a new tab)references/testcase-write-capture.md (opens in a new tab)references/transports.md (opens in a new tab)scripts/check-login.mjs (opens in a new tab)scripts/lib/domains/testcase.mjs (opens in a new tab)scripts/lib/ego-deps.mjs (opens in a new tab)scripts/lib/launch-check.mjs (opens in a new tab)scripts/lib/pure.mjs (opens in a new tab)scripts/lib/run-check.mjs (opens in a new tab)scripts/lib/session.mjs (opens in a new tab)scripts/lib/write.mjs (opens in a new tab)scripts/tb.mjs (opens in a new tab)scripts/test/ego-deps.test.mjs (opens in a new tab)scripts/test/launch-check.test.mjs (opens in a new tab)scripts/test/pure.test.mjs (opens in a new tab)scripts/test/run-check.test.mjs (opens in a new tab)scripts/test/session.test.mjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub terryso/ego-skills --plugin ego-skills14 skills in this plugin
/bilibili-videoPublish a local video to the Bilibili creator platform (member.bilibili.com) with Ego Lite via ego-browser. Login-check first. Bilibili wants TWO covers uploaded separately: --cover-4x3 (首页推荐) and --cover-16x9 (个人空间). Nothing is submitted without --yes: that run only prints a local plan and exits 3. --type selects a partition from the human-type list and reads it back; a missing name stops before 立即投稿. Success is 投稿成功 / 审核中, with a BV URL or identity unconfirmed. Bilibili has no private visibility on web upload: approved submissions go public. Use when the user asks to post to B站, 哔哩哔哩, B站投稿, or publish a video to bilibili./chatgpt-image-genExpand a rough image idea with the six-axis domain engine from codex-imagegen, then create one image on the free ChatGPT website inside Ego Lite. Login-check first. Soft-fail with exit 2 when ego-browser is missing, chatgpt.com is logged out, or login cannot be proven. enrich and generate without --yes are offline. --yes sends one prompt and saves the image to --out. Flowcharts and timelines are SVG, not images. Does not call codex exec and does not use an API key. Use when the user asks to generate an image, enrich a prompt, or use ChatGPT Images without a Codex subscription./douyin-videoPublish a local video to the Douyin creator center (creator.douyin.com) with Ego Lite via ego-browser. Login-check first. Title is a separate field of at most 30 characters. Success is a redirect to content management or a publish-success message. The caller supplies a local video file. This skill does not download video. Use when the user asks to post to 抖音, 抖音发视频, 发布到抖音创作者中心, or creator.douyin.com./instagram-saved-downloadDownload the user's own Instagram Saved posts (images, and MP4 when asked) with Ego Lite cookies via ego-browser. Soft-fails if Instagram is logged out and tells the user that signing in is what makes Saved readable. Personal archive only. Each run checks login itself./kuaishou-videoPublish a local video to the Kuaishou creator platform (cp.kuaishou.com) with Ego Lite via ego-browser. Login-check first. Success means the work shows 审核中. Optional comment from the creator comment manager. The caller supplies a local video file and a description. This skill does not download video. Use when the user asks to post to 快手, 快手发视频, 发布到快手创作者平台, or comment on a Kuaishou work from the creator backend./pinterest-downloadSearch Pinterest and save images or MP4s with the user's Ego Lite cookies. Also related pins, board feeds, and small previews the model can read. Parity with @sunkimkk/pinterest-mcp. Soft-fails if Pinterest is logged out, and always tells the user that signing in inside Ego improves results. Personal use only.Other plugins' skills for the same job