关于 steel-developer
Steel Developer 是用于编写 Steel 实现指南和后续运行代码的技能。它按需引导开发者查阅 SDK、浏览器自动化、API 和会话设置资料,并强调遵循当前用法及清理会话。
主要功能
- 01按任务引导至对应参考资料
- 02涵盖 TypeScript、JavaScript 和 Python
- 03提供 Playwright、Puppeteer 和 Stagehand 指南
- 04包含 CLI 设置与验证
- 05要求清理会话并安全处理凭据
适用场景
- 01在应用中实现 Steel 浏览器会话
- 02选择浏览器自动化或 Agent 框架
- 03配置本地 CLI 访问并验证设置
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ steel-dev/ skills --skill steel-developer安装后在 Claude Code 中输入/steel-developer确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
README.mdevals/evals.jsonreferences/anti-patterns.mdapis.mdcli-setup.mdcomputer-use.mdecosystem.mdlive-embed.mdpython.mdreliability-handoff.mdtypescript.md详细介绍
Steel 开发者
技能边界
- 当用户需要可供之后运行的代码或实现指导时,使用此技能。
- 当用户希望 Agent 现在浏览、提取内容、截图、创建 PDF 或填写表单时,不要使用此技能;请使用
steel-browser。 - 当主要任务是诊断失败的会话时,使用
steel-session-debugging。 - 当主要任务是缓解机器人检测、代理、CAPTCHA、身份验证、操作节奏或登录可靠性问题时,使用
steel-reliability。
按需路由
编写代码前加载相关参考资料:
- CLI 设置和本地验证:
references/cli-setup.md - TypeScript、JavaScript、Node.js、Playwright、Puppeteer、Stagehand:
references/typescript.md - Python、Playwright Python、Browser Use:
references/python.md - 第一方 API、精确的文档/API/SDK 查询、浏览器工具、文件、扩展、身份验证上下文、嵌入、跟踪记录、移动模式、多区域:
references/apis.md - 框架选择、Stagehand、Browser Use、类型化 Agent 框架、编码 Agent 集成:
references/ecosystem.md - 应避免的过时 SDK/API 模式:
references/anti-patterns.md - 计算机使用循环:
references/computer-use.md - 实时和历史会话嵌入:
references/live-embed.md - 可靠性边界和交接:
references/reliability-handoff.md
必须遵守的要求
- 身份验证环境变量为
STEEL_API_KEY。 - Node 示例从
steel-sdk导入Steel;SDK 源代码位于steel-dev/steel-node。 - Node SDK 构造函数使用
steelAPIKey。 - Python SDK 构造函数使用
steel_api_key。 - 清理时务必释放会话。
- 显式构造 CDP URL:
wss://connect.steel.dev?apiKey=...&sessionId=...。 - 连接后重用默认浏览器上下文;除非用户明确需要隔离,否则不要创建新上下文。
- 不要将目标网站的凭据放入提示词、代码注释、页面脚本或日志中。
- 如需确认确切的 API 字段或 SDK 方法签名,请通过
curl -sSfL检查 API 参考、SDK 文档、本地已安装类型或 Steel 文档。 - 绝不要使用
references/anti-patterns.md中列出的过时模式。
最简会话结构
TypeScript:
const steelAPIKey = process.env.STEEL_API_KEY;
if (!steelAPIKey) throw new Error("STEEL_API_KEY is required");
const client = new Steel({ steelAPIKey });
const session = await client.sessions.create();
const cdpUrl = `wss://connect.steel.dev?apiKey=${steelAPIKey}&sessionId=${session.id}`;
const browser = await chromium.connectOverCDP(cdpUrl);
const context = browser.contexts()[0];
const page = context.pages()[0] ?? (await context.newPage());
try {
await page.goto("https://example.com");
} finally {
await browser.close();
await client.sessions.release(session.id);
}
Python:
steel_api_key = os.environ["STEEL_API_KEY"]
client = Steel(steel_api_key=steel_api_key)
session = client.sessions.create()
cdp_url = f"wss://connect.steel.dev?apiKey={steel_api_key}&sessionId={session.id}"
browser = await playwright.chromium.connect_over_cdp(cdp_url)
context = browser.contexts[0]
page = context.pages[0] if context.pages else await context.new_page()
try:
await page.goto("https://example.com")
finally:
await browser.close()
await playwright.stop()
client.sessions.release(session.id)
设置验证
steel --version
steel login
steel doctor --preflight
steel skills doctor
权威信息链接
- API 参考:https://steel.apidocumentation.com/api-reference
- Node SDK/类型:https://github.com/steel-dev/steel-node
- Python SDK/类型:https://github.com/steel-dev/steel-python
- 文档索引:
curl -sSfL https://docs.steel.dev/llms.txt - 完整文档合集:
curl -sSfL https://docs.steel.dev/llms-full.txt - 单页文档:
curl -sSfL https://docs.steel.dev/llms.mdx/<page-path>
评论
支持 Markdown