> For the complete documentation index, see [llms.txt](https://developers.oxylabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.oxylabs.io/products/cn/headless-browser/ai-gong-zuo-liu/agent-skills.md).

# Agent Skills

Oxylabs Agent Skills（`skills.md`）用于教导 LLM 和 AI 编码助手如何配置并与 Oxylabs 产品交互。

适用于 Oxylabs 无头浏览器的 Agent Skills 可帮助你的模型通过 Chrome DevTools Protocol (CDP) 控制远程无头浏览器会话，配置浏览器指纹，处理代理轮换，并在没有语法或参数幻觉的情况下管理 Playwright 或 Puppeteer 自动化。

## 安装

### Claude Code（插件市场）

在 Claude Code 中，运行以下命令：

```
/plugin marketplace add oxylabs/agent-skills
/plugin install oxylabs@oxylabs-agent-skills
```

这会将全部 5 个技能作为单个插件安装：

* [`skills/代理`](https://github.com/oxylabs/agent-skills/blob/main/skills/proxies/SKILL.md)
* [`skills/web-unblocker`](https://github.com/oxylabs/agent-skills/blob/main/skills/web-unblocker/SKILL.md)
* [`skills/web-scraper-api`](https://github.com/oxylabs/agent-skills/blob/main/skills/web-scraper-api/SKILL.md)
* [`skills/headless-browser`](https://github.com/oxylabs/agent-skills/blob/main/skills/headless-browser/SKILL.md)
* [`skills/video-data`](https://github.com/oxylabs/agent-skills/blob/main/skills/video-data/SKILL.md)

要更新技能，请运行此命令：

```
/plugin marketplace update oxylabs-agent-skills
```

### 其他代理（通用）

对于其他代理和自定义环境，请通过标准 skills CLI 将仓库加载到你的项目工作区：

```
npx skills add https://github.com/oxylabs/agent-skills.git
```

## 配置

所有 Oxylabs Agent Skills 通过定义在一个 `.env` 文件中。要使用无头浏览器 skills，请将这些键添加到你的 `.env` 文件：

| 变量                | 描述               |
| ----------------- | ---------------- |
| `OXY_HB_USERNAME` | 你的无头浏览器用户 `用户名`. |
| `OXY_HB_PASSWORD` | 你的无头浏览器用户 `密码`.  |

## 如何使用

一旦该技能在你的工作区中启用，你就可以提示你的 AI 助手使用 Oxylabs 无头浏览器构建自动化浏览器交互。

* **示例 1：** "编写一个使用 `playwright` 通过 CDP 连接到 Oxylabs 无头浏览器，访问一个动态 JavaScript 网站，并提取渲染后的 HTML。"
* **示例 2：** "创建一个使用 `puppeteer` 通过 Oxylabs 无头浏览器从初始化一个自适应 Firefox 浏览器会话的 `美国` 地理位置。"
* **示例 3：** "生成一个浏览器自动化例程，打开 `example.com`，与页面上的动态元素交互，并保存整页截图。"

## 更多 Oxylabs Agent 技能

了解有关其他 Oxylabs 解决方案的 Agent 技能的更多信息：

* [代理](/products/cn/dai-li/residential-proxies/agent-skills.md)
* [网页爬虫API](/products/cn/web-scraper-api/solutions-for-ai-workflows/agent-skills.md)
* [网页解锁器](/products/cn/web-unblocker/agent-skills.md)
* [视频数据](/products/cn/dai-li/high-bandwidth-proxies.md#agent-skills)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.oxylabs.io/products/cn/headless-browser/ai-gong-zuo-liu/agent-skills.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
