effect

作者: browser-use

在此仓库中处理 Effect v4 / effect-smol TypeScript 代码

npx skills add https://github.com/browser-use/browsercode --skill effect

Effect

This codebase uses Effect for typed, composable TypeScript services, schemas, and workflows.

Source Of Truth

Use the current Effect v4 / effect-smol source, not memory or older Effect v2/v3 examples.

  1. If .opencode/references/effect-smol is missing, clone https://github.com/Effect-TS/effect-smol there. Do this in the project, not in the skill folder.
  2. Search .opencode/references/effect-smol for exact APIs, examples, tests, and naming patterns before answering or implementing Effect-specific code.
  3. Also inspect existing repo code for local house style before introducing new patterns.
  4. Prefer answers and implementations backed by specific source files or nearby repo examples.

Guidelines

  • Prefer current Effect v4 APIs and project-local patterns over old blog posts, examples, or package-memory guesses.
  • Use Effect.gen(function* () { ... }) for multi-step workflows.
  • Use Effect.fn("Name") or Effect.fnUntraced(...) for named effects when adding reusable service methods or important workflows.
  • Prefer Effect Schema for API and domain data shapes. Use branded schemas for IDs and Schema.TaggedErrorClass for typed domain errors when modeling new error surfaces.
  • Keep HTTP handlers thin: decode input, read request context, call services, and map transport errors. Put business rules in services.
  • In Effect service code, prefer Effect-aware platform abstractions and dependencies over ad hoc promises where the surrounding code already does so.
  • Keep layer composition explicit. Avoid broad hidden provisioning that makes missing dependencies hard to see.
  • In tests, prefer the repo's existing Effect test helpers and live tests for filesystem, git, child process, locks, or timing behavior.
  • Do not introduce any, non-null assertions, unchecked casts, or older Effect APIs just to satisfy types.
  • Do not answer from memory. Verify against .opencode/references/effect-smol or nearby code first.

Testing Patterns

  • Use testEffect(...) from packages/opencode/test/lib/effect.ts for tests that exercise Effect services, layers, runtime context, scoped resources, or platform integrations.
  • Use it.live(...) for filesystem, git repositories, HTTP servers, sockets, child processes, locks, real time, and other live platform behavior.
  • Run tests from package directories such as packages/opencode; never run package tests from the repo root.
  • Prefer explicit test layers over ad hoc managed runtimes. Keep dependency provisioning visible in the test file.
  • Use scoped fixtures and finalizers for resources that must be cleaned up, including temporary directories, flags, databases, fibers, servers, and global state.

来自 browser-use 的更多技能

browser-use
browser-use
自动化浏览器交互,用于网页测试、表单填写、截图和数据提取。当用户需要浏览网站、与网页交互、填写表单、截图或从网页提取信息时使用。
browser-automationofficial
browser-execute
browser-use
Use ONLY when calling the `browser_execute` tool or driving a real browser via the Chrome DevTools Protocol. Required reading before the first…
official
qa
browser-use
对网站或网页应用进行QA测试,并返回1-5分的质量评分(5分=完美无瑕,1分=严重损坏),同时提供证据。适用于用户希望测试、QA、评估、评分或…
official
video-use
browser-use
通过对话编辑任意视频。转录、剪辑、调色、生成叠加动画、烧录字幕——适用于人物访谈、混剪、教程、旅行等场景……
official
qa
browser-use
对网站或网页应用进行QA测试,返回1-5的质量评分(5=完美无瑕,1=严重损坏)并附上证据。当用户想要测试、QA、评估、评分或……时使用。
official
cdp
browser-use
Drive Chrome via the DevTools Protocol from JavaScript. Run JS snippets through the `browser-harness-js` CLI — it auto-spawns a long-lived bun HTTP server…
official
browser
browser-use
通过CDP直接控制浏览器。当用户想要自动化、抓取、测试或与网页交互时使用。连接到用户已运行的Chrome。
official
browser-harness
browser-use
通过CDP直接控制浏览器。当用户想要自动化、抓取、测试或与网页交互时使用。连接到用户已运行的Chrome。
official