npx skills add https://github.com/brsbl/ottonomous --skill test参数: $ARGUMENTS
| 命令 | 行为 |
|---|---|
run | 代码检查 + 类型检查 + 运行测试 |
write | 生成测试,然后运行流水线 |
browser | 可视化验证 |
all | 结合 run + browser |
范围(可选,默认:branch):
| 范围 | 命令 |
|---|---|
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
branchgit diff main...HEAD --name-only |
staged | git diff --cached --name-only |
| 配置 | 工具 | 命令 |
|---|---|---|
package.json + vitest | Vitest | npx vitest run |
package.json + jest | Jest | npx jest |
package.json + "test" | npm | npm test |
pyproject.toml | pytest | pytest |
Cargo.toml | cargo | cargo test |
go.mod | go | go test ./... |
.eslintrc* / eslint.config.* | ESLint | npx eslint . |
biome.json | Biome | npx biome check . |
tsconfig.json | TypeScript | npx tsc --noEmit |
# JS/TS 测试运行器
npm install -D vitest
# JS/TS 代码检查器
npm install -D eslint @eslint/js
# JS/TS 类型
npm install -D typescript && npx tsc --init
# Python
pip install pytest ruff mypy
# 1. 代码检查
npx eslint . --fix # 或: npx biome check . --write
# 2. 类型检查
npx tsc --noEmit # 或: mypy .
# 3. 测试
npx vitest run # 或: pytest, cargo test, go test ./...
修复错误,重新运行直到全部通过。
git diff main...HEAD --name-only # branch 范围
git diff --cached --name-only # staged 范围
过滤出源文件(排除测试文件、配置文件、文档)。
将文件交给测试编写子代理。它们判断可测试性并编写测试。
| 文件数 | 子代理数 |
|---|---|
| 1-3 | 1 |
| 4-8 | 2-3 |
| 9+ | 3-5 |
// 任务工具
{
subagent_type: "test-writer",
prompt: "Write tests for: [file list]. Runner: vitest. Convention: *.test.ts"
}
与运行模式的步骤 3 相同。
使用浏览器自动化进行可视化验证。完整 API 请参阅 /browser 技能。
import { connect, waitForPageLoad } from '../otto/lib/browser/client.js'
const client = await connect({ headless: true })
const page = await client.page('test')
// 从 package.json 脚本或运行中的进程确定 URL
await page.goto(url) // 例如,http://localhost:5173
await waitForPageLoad(page)
await page.screenshot({ path: '.otto/test-screenshots/page.png' })
// 使用 ARIA 快照引用进行交互
const snapshot = await client.getAISnapshot('test')
const btn = await client.selectSnapshotRef('test', 'e3')
await btn.click()
await client.disconnect()
完成浏览器验证后,删除截图:
rm -rf .otto/test-screenshots
每周安装次数
1
仓库
GitHub 星标数
10
首次出现
今天
安全审计
安装于
amp1
cline1
opencode1
cursor1
kimi-cli1
codex1
Arguments: $ARGUMENTS
| Command | Behavior |
|---|---|
run | Lint + type check + run tests |
write | Generate tests, then run pipeline |
browser | Visual verification |
all | run + browser combined |
Scope (optional, default: branch):
| Scope | Command |
|---|---|
branch | git diff main...HEAD --name-only |
staged | git diff --cached --name-only |
| Config | Tool | Command |
|---|---|---|
package.json + vitest | Vitest | npx vitest run |
package.json + jest | Jest | npx jest |
package.json + "test" | npm | npm test |
# JS/TS test runner
npm install -D vitest
# JS/TS linter
npm install -D eslint @eslint/js
# JS/TS types
npm install -D typescript && npx tsc --init
# Python
pip install pytest ruff mypy
# 1. Lint
npx eslint . --fix # or: npx biome check . --write
# 2. Type check
npx tsc --noEmit # or: mypy .
# 3. Test
npx vitest run # or: pytest, cargo test, go test ./...
Fix errors, re-run until all pass.
git diff main...HEAD --name-only # branch scope
git diff --cached --name-only # staged scope
Filter to source files (exclude tests, configs, docs).
Hand off files to test-writer subagents. They determine testability and write tests.
| Files | Subagents |
|---|---|
| 1-3 | 1 |
| 4-8 | 2-3 |
| 9+ | 3-5 |
// Task tool
{
subagent_type: "test-writer",
prompt: "Write tests for: [file list]. Runner: vitest. Convention: *.test.ts"
}
Same as Run Mode step 3.
Visual verification using browser automation. See /browser skill for full API.
import { connect, waitForPageLoad } from '../otto/lib/browser/client.js'
const client = await connect({ headless: true })
const page = await client.page('test')
// Determine URL from package.json scripts or running processes
await page.goto(url) // e.g., http://localhost:5173
await waitForPageLoad(page)
await page.screenshot({ path: '.otto/test-screenshots/page.png' })
// Interact using ARIA snapshot refs
const snapshot = await client.getAISnapshot('test')
const btn = await client.selectSnapshotRef('test', 'e3')
await btn.click()
await client.disconnect()
After completing browser verification, remove screenshots:
rm -rf .otto/test-screenshots
Weekly Installs
1
Repository
GitHub Stars
10
First Seen
Today
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
amp1
cline1
opencode1
cursor1
kimi-cli1
codex1
通过 LiteLLM 代理让 Claude Code 对接 GitHub Copilot 运行 | 高级变通方案指南
31,600 周安装
pyproject.toml | pytest | pytest |
Cargo.toml | cargo | cargo test |
go.mod | go | go test ./... |
.eslintrc* / eslint.config.* | ESLint | npx eslint . |
biome.json | Biome | npx biome check . |
tsconfig.json | TypeScript | npx tsc --noEmit |