用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Demerzels-lab/elsamultiskillagent --skill browserbase-create命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
The philosophical layer for AI agents.
Agents can sign plugins, rotate credentials without losing identity, and publicly attest to behavior.
A relaxing resource-gathering RPG where AI agents collect resources, trade with NPCs, and manage and build their world at their own pace.
基于 SOC 职业分类
正在显示 SKILL.md
| name | browserbase-create |
| description | Guide Claude through creating new browser automation scripts using the stagehand CLI |
Guide Claude through creating new browser automation scripts using the stagehand CLI.
Use this skill when:
Ask clarifying questions:
Start a local browser session to understand the site structure:
stagehand session create --local
stagehand goto https://example.com
Use snapshot to understand the DOM:
stagehand snapshot
Take screenshots to see the visual layout:
stagehand screenshot -o exploration.png
For each step of the automation, identify:
Use the accessibility tree refs to understand element relationships:
[@0-5] button: "Submit"
[@0-6] textbox: "Email"
[@0-7] textbox: "Password"
Before writing code, verify each step works:
stagehand fill @0-6 "test@example.com"
stagehand fill @0-7 "password123"
stagehand click @0-5
stagehand wait networkidle
stagehand snapshot
For API-based automations or debugging:
stagehand network on
# perform actions
stagehand network list
stagehand network show 0
Once you understand the flow, create a full function project:
stagehand fn init my-automation
cd my-automation
This creates a complete project with:
package.json with dependencies.env with credentials (from ~/.stagehand/config.json if available)tsconfig.jsonindex.ts templateEdit index.ts with your automation logic:
import { defineFn } from "@browserbasehq/sdk-functions";
import { chromium } from "playwright-core";
defineFn("my-automation", async (context) => {
const { session } = context;
const browser = await chromium.connectOverCDP(session.connectUrl);
const page = browser.contexts()[0]!.pages()[0]!;
// Your automation steps here
await page.goto("https://example.com");
await page.fill('input[name="email"]', context.params.email);
await page.click('button[type="submit"]');
// Extract and return data
const result = await page.textContent('.result');
return { success: true, result };
});
Start the local development server:
pnpm bb dev index.ts
# or: stagehand fn dev index.ts
Then invoke locally via curl:
curl -X POST http://127.0.0.1:14113/v1/functions/my-automation/invoke \
-H "Content-Type: application/json" \
-d '{"params": {"email": "test@example.com"}}'
When ready for production:
pnpm bb publish index.ts
# or: stagehand fn publish index.ts
Invoke the deployed function:
stagehand fn invoke <function-id> -p '{"email": "test@example.com"}'
data-testid) over CSS classestext=Submit)waitForSelector for dynamic contentpage.evaluate() for complex extractiondefineFn("price-monitor", async (context) => {
const { session, params } = context;
const browser = await chromium.connectOverCDP(session.connectUrl);
const page = browser.contexts()[0]!.pages()[0]!;
await page.goto(params.productUrl);
await page.waitForSelector('.price');
const price = await page.evaluate(() => {
const el = document.querySelector('.price');
return el?.textContent?.replace(/[^0-9.]/g, '');
});
return {
url: params.productUrl,
price: parseFloat(price || '0'),
timestamp: new Date().toISOString(),
};
});