> 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-workflows/agent-skills.md).

# Agent 技能

使用面向 Oxylabs 无头浏览器的官方 Agent Skills 配置 AI 工具和编码助手。

Oxylabs 智能体技能（`skills.md`）教会 LLM 和 AI 编码助手如何配置并与 Oxylabs 产品交互。

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

## 安装

### Claude Code（插件市场）

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

```
/插件市场 添加 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` 文件。要使用无头浏览器技能，请将这些键添加到你的 `.env` 文件中：

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

## 如何使用

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

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

## 更多 Oxylabs 智能体技能

了解其他 Oxylabs 解决方案的智能体技能：

* [代理](/products/cn/proxies/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/proxies/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-workflows/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.
