> 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/web-scraper-api/solutions-for-ai-workflows/agent-skills.md).

# Agent 技能

使用面向网页抓取和视频数据采集的 Oxylabs 网页爬虫API 官方 Agent Skills 配置 AI 工具和编码助手。

Oxylabs 代理技能 (`SKILL.md`) 教授 LLM 和 AI 编码助手如何配置并与 Oxylabs 产品交互。

**网页爬虫API 凭据支持两种不同的代理技能** 取决于你的目标工作流：

* [**web-scraper-api**](/products/cn/web-scraper-api/solutions-for-ai-workflows/agent-skills.md#web-scraper-api) – 从各种网站和公共数据源收集并解析结构化数据。
* [**video-data**](#video-data) – 提取视频元数据、搜索结果、字幕，或处理原始媒体下载。

## 安装

### 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/无头浏览器`](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
```

## 网页爬虫API

`web-scraper-api` 该技能可在使用 Oxylabs 网页爬虫API 从任何 Web 目标提取数据时，改进载荷构建、自定义解析参数、地理定位字段和 JSON 输出格式。

### 配置

将你的网页爬虫API凭证添加到项目的本地 `.env` 文件：

| 变量                 | 描述                 |
| ------------------ | ------------------ |
| `OXY_WSA_USERNAME` | 你的网页爬虫API用户 `用户名`. |
| `OXY_WSA_PASSWORD` | 你的网页爬虫API用户 `密码`.  |

### 使用方法

一旦该技能在你的工作区中激活，你就可以提示你的 AI 助手构建完整的数据抓取脚本。

* **示例 1：** “编写一个使用网页爬虫API抓取的 Python 脚本 `e-commerce-website.net` ，并使用自定义解析模式和 `美国` 地理定向。”
* **示例 2：** “创建一个 Node.js 函数，将 URL 列表传递给网页爬虫API端点，以抓取并解析 JSON 响应。”

## 视频数据

`video-data` 该技能涵盖使用网页爬虫API进行视频数据提取（元数据、搜索、频道）以及 `yt-dlp` 通过 High-Bandwidth Proxy agent skill 进行视频/音频文件下载。

### 配置

所有 Oxylabs Agent Skills 都通过在一个 `.env` 文件中定义的环境变量进行身份验证。要使用视频数据技能，请将这些键添加到你的 `.env` 文件：

| 变量                 | 描述                                                                                                              |
| ------------------ | --------------------------------------------------------------------------------------------------------------- |
| `OXY_WSA_USERNAME` | 你的网页爬虫API用户 `用户名`.                                                                                              |
| `OXY_WSA_PASSWORD` | 你的网页爬虫API用户 `密码`.                                                                                               |
| `OXY_HB_ENDPOINT`  | （可选）用于媒体下载的 High-Bandwidth Proxy 网关字符串。更多详情 [见此处](/products/cn/proxies/high-bandwidth-proxies.md#agent-skills). |

### 使用方法

一旦该技能在你的工作区中启用，你就可以提示你的 AI 代理编写面向公开视频内容采集的代码。

* **示例 1：** "编写一个使用 Oxylabs 视频数据API 目标的 Python 脚本，以提取特定视频 ID 的完整字幕文本和上传元数据。"
* **示例 2：** "编写一个 Node.js 函数，在视频平台上搜索某个关键词字符串，并提取匹配频道 URL 的结构化 JSON 列表。"

## 更多 Oxylabs Agent Skills

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

* [代理](/products/cn/proxies/residential-proxies/agent-skills.md)
* [网页解锁器](/products/cn/web-unblocker/agent-skills.md)
* [无头浏览器](/products/cn/headless-browser/ai-workflows/agent-skills.md)


---

# 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/web-scraper-api/solutions-for-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.
