Usercase

io.usercase由 usercase.io 发布v0.2.15更新于 Nov 14, 2026

Ask real users on your site and run virtual users in a real browser, then fix what they hit.

概览

AI 生成的概览

在真实浏览器中以虚拟用户和真实访客调研你的网站,并协助修复他们遇到的问题。

可以做什么
  • 检查与接入站点:确认 Usercase SDK 是否运行、获取安装脚本、连接项目、安装访客子代理。
  • 创建并运行虚拟用户:保存和列出人物,以某个人物身份开始访问、在页面上操作、回答问卷卡片、查看访问结果。
  • 录制并校验任务路径:开始录制、点击、输入、滚动、泛化页面模式、回放校验并保存路径。
  • 构建问题与调研:读取近期访问上下文,校验并保存问题条件,把步骤发送到仪表盘,保存调研草稿。
  • 读取并修复发现与问题:列出和阅读带证据的报告,把发现或问题标记为修复中或已修复,并附上文件与 PR 链接。
适用场景
当你希望用模拟访客或真实用户调研来测试网页应用、获取反馈,录制任务的预期路径,或在编码助手中处理 Usercase 仪表盘里的可用性发现与问题时使用。
运行要求
以本地 stdio 进程运行(npm 包),仅支持桌面端。需要 Usercase 账号与项目;USERCASE_API_KEY 为可选项,首次使用可通过浏览器登录连接。登录和路径录制会打开可见浏览器,setup 工具会为用户级安装 Claude Code 或 Codex 的代理定义。
安装前请注意
访客的写入操作(注册、发帖、评论、保存、点赞)默认被拦截;用 set_writes 设为 send 会真实提交到站点,只应在测试或预发布站点并在用户确认后使用。登录 Cookie 保存在 .usercase/sessions/,人物数据保存在 .usercase/people.json。除非把 USERCASE_DIAGNOSTICS 设为 off,工具失败诊断信息会发送给 Usercase 团队。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Usercase,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

工具

34

check_site

Open the site once as a virtual user and report: does it load, is the Usercase SDK running (which project), is a firewall/bot protection blocking us (and how to unblock, per vendor), is the secret key set. Always run this before starting visits. If it reports a block, stop and tell the user. If you have not read the research procedure yet, call the instructions tool with command research first.

输入参数url必填

install_snippet

Get the Usercase script for the connected project, with where to put it per framework. If nothing is connected yet, it opens the browser to connect and says what to tell the user. Use when check_site says the SDK is not running and you are in the site's repository: add the script once to the root layout/document, show the user the diff, then run check_site on the local site to confirm. Do not commit or deploy unless asked. If you have not read the install procedure yet, call the instructions tool with command install first.

无需输入参数。

save_people

Save virtual users to .usercase/people.json (adds to what is there). People have no names — like real visitors; each gets a number (p1, p2…) to refer to them by. Make people who would really come to this site — varied goals, devices, arrival paths, and states of mind. Do not make everyone a perfect fit for one feature. Show the list to the user before running visits.

输入参数site必填people必填researchsite_about必填

list_people

List the virtual users in .usercase/people.json and whether each has visited yet.

无需输入参数。

results

Recent visit results (one summary per visit) and what the safety guard blocked. Call after each round of visitor sub-agents finishes — it also says whether the research run goes on to another round.

输入参数limit

login

Open a visible browser on the user's screen so THEY can sign in to the site with one demo account. Only the resulting session (cookies) is saved, under an account name in .usercase/sessions/ — the password never passes through you or us. Call it once per demo account, one at a time. Returns immediately; tell the user to sign in and close the window, then run check_site — it checks whether the sign-in really worked. If an account is not signed in or has expired, call login again with that same account name. Members (member=true) are spread across the signed-in accounts. Never ask the user for their password.

输入参数url必填windowaccountlifetimeHours

set_writes

Choose whether visitors' writes reach the site: signing up, posting, commenting, saving, liking. 'block' (the default) sends nothing to the site; 'send' lets those through for real. Only the user can decide this — ask them, and only call this with their answer. 'send' suits a test or staging site, or data that may be messed up; on a live site real users will see what visitors post. Payments, deleting, wallet connections and sign-out stay blocked either way. Saved in .usercase/settings.json.

输入参数mode必填

connect

Connect Usercase to a project in the browser, or switch to another project. Opens the Usercase dashboard where the user signs in and picks the project. Other tools connect by themselves when nothing is connected — use this only when the user wants another project, or check_site says the SDK sends to a different project.

无需输入参数。

setup

Install the visitor sub-agent definition (Claude Code: ~/.claude/agents/, Codex: ~/.codex/agents/ — user-wide, nothing is added to the repository) so visitors can be started. Run once if that agent type is not available. The user may need to restart Claude Code afterwards.

无需输入参数。

question_context

Screens and element words from this project's recent real visits. Call first in the question procedure, before writing a condition — page globs and click targets must match what visitors actually saw. If you have not read the question procedure yet, call the instructions tool with command question first.

无需输入参数。

question_check

Run a condition over this project's recent visits: how many it matches, grammar problems, overlap with existing questions, and what matched visitors did. Repeat until there are no problems.

输入参数condition必填

question_save

Save the question as a DRAFT in the dashboard Inbox, after the user approved it. The server checks the condition again and refuses it if there are problems. Nobody sees it until someone turns it on.

输入参数whytitlechoicesquestion必填condition必填triggerEnallowOtheranswerTypeacceptWarnings

steps_brief

What is in the user's Several steps window: whether the card is a question or a research invite, the page under Where, and the words they wrote. Call first in the steps procedure. If you have not read the steps procedure yet, call the instructions tool with command steps first.

输入参数session必填

steps_send

Send the condition back to the user's Several steps window (a question or a research invite), after question_check shows no problems. The server checks it again and refuses it if there are problems. The user saves it there.

输入参数session必填condition必填triggerEn必填acceptWarnings

report_findings

List the findings of a Usercase research's latest report (key, severity, title, who, and whether one is being fixed). Use when the fix command has no finding key. If you have not read the fix procedure yet, call the instructions tool with command fix first.

输入参数audienceresearch必填

report_finding

Read one finding of a Usercase research report with all its evidence: why, who, the screen checks from the recordings, the paths people took, what they wrote, and the suggested changes. Read it before looking for the code. If you have not read the fix procedure yet, call the instructions tool with command fix first.

输入参数finding必填audienceresearch必填

report_fix

Record on the research report that you are fixing a finding (status fixing, once the user approved the change) or have fixed it (status fixed, with the files, a one-sentence summary for the team, and the pull request link if any). If the last fix of this finding is already live on the site, this starts the next fix (fix 2, 3 …); otherwise it adds to the current one. The report compares people after each fix goes live with the version right before it.

输入参数filesprUrlstatus必填finding必填summaryaudienceresearch必填

issue_list

List the open issues of the Usercase project (problems found from visitors' answers to questions on the site): id, title, where, whether it is a clear fix, and whether one is being fixed. Use when the fix command has no issue id. If you have not read the fix procedure yet, call the instructions tool with command fix first.

无需输入参数。

issue_read

Read one issue of the Usercase project with all its evidence: the question and page, what people chose, what they wrote, the AI's reading, other issues with the same cause, and earlier fixes. Read it before looking for the code. If you have not read the fix procedure yet, call the instructions tool with command fix first.

输入参数issue必填

issue_fix

Record on a Usercase issue that you are fixing it (status fixing, once the user approved the change) or have fixed it (status fixed, with the files, a one-sentence summary for the team, and the pull request link if any). After a finished fix, starting again records the next fix.

输入参数filesissue必填prUrlstatus必填summary

path_tasks

List the tasks of a Usercase research (from the dashboard) and whether each already has an expected path. Call first in the path procedure. If you have not read the path procedure yet, call the instructions tool with command path first.

输入参数research必填

path_start

Open a fresh browser on the page where the task's intended route begins and start recording its expected path. The page itself is step 1. Starting again discards the recording in progress.

输入参数url必填task必填deviceaccount

path_click

Click a numbered element from the latest screen. By default it becomes a step of the path (the element is recorded; a new page reached is recorded too). record=false for clicks that are not part of the route (closing a cookie banner) — they are still repeated by path_check. press=false records the element as the final click without pressing it (a Pay or Submit button the safety guard will not press).

输入参数index必填pressrecord

path_type

Type into a numbered field (a search box, a quantity). Not a path step, but repeated by path_check.

输入参数text必填index必填

path_scroll

Scroll the recording page to see more.

输入参数direction

path_pattern

Make a page step match any page of its kind: /notice/6553c3ba → /notice/:id. Use when participants would open a different item than the one you did (the route reads from the code). Applies to every step on that page.

输入参数url必填step必填

path_check

Walk the recorded path again in a fresh browser: every clicked element must still be found at its recorded position with the same text, and every page must be reached. Lists the screenshots to show the user. Required before path_save.

无需输入参数。

path_save

Upload the checked path to the dashboard, replacing the task's expected path. Only after the user approved it. success: keep (default) leaves the task's success condition; page = done on reaching the last page of the path; click = done on the last recorded click. With page or click the saved path ends at that point (later steps are left out: the task ends there, so nobody could reach them). Ask the user before changing it.

输入参数success

research_context

What this project's data says is worth researching: open findings, where real visitors and virtual users left, what virtual users said when they left without getting what they came for, and the researches and drafts that already exist. Call first in the new-research procedure. If you have not read the new-research procedure yet, call the instructions tool with command new-research first.

无需输入参数。

research_save

Save the research as a DRAFT in the dashboard Inbox, after the user approved it. It becomes a research only when someone creates it there. Paths are page paths starting with / (no host), with :name for the parts that change. Expected paths recorded and saved beforehand as plan-<n> (n = the task's position in tasks, from 1) are uploaded with it.

输入参数basis必填taskstitle必填inviteminutespurpose必填questionsfindingIdshypothesesstart_screen

open_visit

Start a visit as one virtual user from people.json. Returns a visit_id and what you see first. You ARE this person from now on. If it says the site is blocking us, stop and report that.

输入参数person必填

act

Do one thing on the screen, as the person. Numbers refer to the latest screen you were shown — only what is in view; scroll to see more. It happens after the pause a real person would take on that screen, then you get the new screen — or a survey card, or the end of the visit.

输入参数towhy必填donetextindex必填timesaction必填visit_id必填

answer_card

Respond to the survey card on screen, as the person. Decide `bothered` FIRST — most people close these without reading. Only if bothered, pick an option, write your own words, or still close.

输入参数why必填action必填bothered必填visit_id必填other_textbothered_why必填choice_index必填

instructions

Start here for any Usercase work — whether the user typed a command or just asked in their own words. Returns the step-by-step procedure; follow it as the user's request, and call this before the other Usercase tools. Commands: research (test or get feedback on the site with virtual users; `research` id to have them take part in a research), new-research (plan or create a research / usability study), install (add or install the Usercase script on the site), question (make a question to ask visitors at a moment on the site), steps (write the steps for the question open in the dashboard; `session` = its window id), path (record the expected paths of a research's tasks; `research` id, optional `task`), fix (fix a finding from a research report: `research` id + `finding` key like F1, `audience` real for the real-people report; or an issue from Issues: `issue` id), connect (connect this repository to another Usercase project).

输入参数urltaskcountfocusissuecommand必填findingsessionaudienceresearch

版本历史

1
  1. v0.2.15最新Nov 14, 2026

评分

已满足适用检查项的 65%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分

    请声明包含 README 的 GitHub 仓库,或在 OAuth 受保护资源元数据中提供 resource_documentation。

  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。