opensea by basezh/agent-skills-on-base
npx skills add https://github.com/basezh/agent-skills-on-base --skill opensea查询 NFT 数据、在 Seaport 市场进行交易以及交换 ERC20 代币,支持以太坊、Base、Arbitrum、Optimism、Polygon 等网络。
这是一个用于 AI 编程助手的 Agent Skill。安装后,您的智能体可以通过 OpenSea API 交互,查询 NFT 数据、执行市场操作,并使用 OpenSea CLI、shell 脚本或 MCP 服务器交换 ERC20 代币。
OPENSEA_API_KEY 环境变量 — 用于 CLI、SDK 和 REST API 脚本OPENSEA_MCP_TOKEN 环境变量 — 用于 MCP 服务器(与 API 密钥不同)@opensea/clicurl 用于 REST shell 脚本jq(推荐)用于解析 JSON 响应在 opensea.io/settings/developer 获取这两个凭证。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
npx skills add ProjectOpenSea/opensea-skill
/skill install ProjectOpenSea/opensea-skill
将此仓库克隆到您的技能目录:
git clone https://github.com/ProjectOpenSea/opensea-skill.git ~/.skills/opensea
请参考您 AI 工具的文档来配置技能目录。
SKILL.md — 主要的技能文件,指导您的智能体如何使用 OpenSea API,包括 CLI、任务指南、脚本参考、MCP 工具文档以及购买、出售和交换代币的端到端工作流。
@opensea/cli 包为所有 OpenSea API 操作提供了命令行界面和编程 SDK。使用 npm install -g @opensea/cli 安装,或使用 npx @opensea/cli。
opensea collections get mfers
opensea listings best mfers --limit 5
opensea tokens trending --limit 5
opensea search "cool cats"
opensea swaps quote --from-chain base --from-address 0x0000000000000000000000000000000000000000 \
--to-chain base --to-address 0xTokenAddress --quantity 0.02 --address 0xYourWallet
支持 JSON、表格和 TOON 输出格式。TOON 比 JSON 少用约 40% 的令牌,非常适合 AI 智能体的上下文窗口(--format toon)。
完整的 CLI 命令参考和 SDK 用法请参见 SKILL.md。
scripts/ 目录中提供了用于常见操作的即用型脚本(作为 CLI 的替代方案):
| 脚本 | 用途 |
|---|---|
opensea-collection.sh | 通过 slug 获取合集信息 |
opensea-nft.sh | 通过链/合约/代币 ID 获取单个 NFT |
opensea-best-listing.sh | 获取 NFT 的最低挂单 |
opensea-best-offer.sh | 获取 NFT 的最高报价 |
opensea-swap.sh | 通过 OpenSea DEX 聚合器交换代币 |
opensea-fulfill-listing.sh | 获取购买交易数据 |
opensea-fulfill-offer.sh | 获取出售交易数据 |
完整的脚本参考和使用示例请参见 SKILL.md。
references/ 目录中包含详细的 API 文档:
rest-api.md — REST 端点系列和分页marketplace-api.md — 购买/出售工作流和 Seaport 详情stream-api.md — WebSocket 事件流seaport.md — Seaport 协议和 NFT 购买执行token-swaps.md — 通过 MCP 进行代币交换的工作流官方的 MCP 服务器为代币交换和 NFT 操作提供了直接的 LLM 集成。添加到您的 MCP 配置中:
{
"mcpServers": {
"opensea": {
"url": "https://mcp.opensea.io/mcp",
"headers": {
"Authorization": "Bearer YOUR_MCP_TOKEN"
}
}
}
}
可用的 MCP 工具完整列表请参见 SKILL.md。
安装后,向您的 AI 助手发出提示:
在 OpenSea 上获取 Pudgy Penguins 合集的底价
使用 OpenSea 在 Base 上将 0.02 ETH 兑换成 USDC
显示 BAYC #1234 的最佳报价
智能体将使用 opensea CLI 直接查询 API。
此技能支持 OpenSea 上可用的所有链,包括 ethereum、solana、abstract、ape_chain、arbitrum、avalanche、b3、base、bera_chain、blast、flow、gunzilla、hyperevm、hyperliquid、ink、megaeth、monad、optimism、polygon、ronin、sei、shape、somnia、soneium、unichain 和 zora。
每周安装数
1
仓库
GitHub 星标数
8
首次出现
今天
安全审计
安装于
mcpjam1
claude-code1
replit1
junie1
windsurf1
zencoder1
Query NFT data, trade on the Seaport marketplace, and swap ERC20 tokens across Ethereum, Base, Arbitrum, Optimism, Polygon, and more.
This is an Agent Skill for AI coding assistants. Once installed, your agent can interact with the OpenSea API to query NFT data, execute marketplace operations, and swap ERC20 tokens using the OpenSea CLI, shell scripts, or the MCP server.
OPENSEA_API_KEY environment variable — for CLI, SDK, and REST API scriptsOPENSEA_MCP_TOKEN environment variable — for the MCP server (separate from API key)@opensea/clicurl for REST shell scriptsjq (recommended) for parsing JSON responsesGet both credentials at opensea.io/settings/developer.
npx skills add ProjectOpenSea/opensea-skill
/skill install ProjectOpenSea/opensea-skill
Clone this repository to your skills directory:
git clone https://github.com/ProjectOpenSea/opensea-skill.git ~/.skills/opensea
Refer to your AI tool's documentation for skills directory configuration.
SKILL.md — the main skill file that teaches your agent how to use the OpenSea API, including the CLI, task guides, script references, MCP tool documentation, and end-to-end workflows for buying, selling, and swapping tokens.
The @opensea/cli package provides a command-line interface and programmatic SDK for all OpenSea API operations. Install with npm install -g @opensea/cli or use npx @opensea/cli.
opensea collections get mfers
opensea listings best mfers --limit 5
opensea tokens trending --limit 5
opensea search "cool cats"
opensea swaps quote --from-chain base --from-address 0x0000000000000000000000000000000000000000 \
--to-chain base --to-address 0xTokenAddress --quantity 0.02 --address 0xYourWallet
Supports JSON, table, and TOON output formats. TOON uses ~40% fewer tokens than JSON, ideal for AI agent context windows (--format toon).
See SKILL.md for the full CLI command reference and SDK usage.
Ready-to-use scripts in scripts/ for common operations (alternative to the CLI):
| Script | Purpose |
|---|---|
opensea-collection.sh | Fetch collection by slug |
opensea-nft.sh | Fetch single NFT by chain/contract/token |
opensea-best-listing.sh | Get lowest listing for an NFT |
opensea-best-offer.sh | Get highest offer for an NFT |
opensea-swap.sh | Swap tokens via OpenSea DEX aggregator |
opensea-fulfill-listing.sh |
See SKILL.md for the full scripts reference and usage examples.
Detailed API documentation in references/:
rest-api.md — REST endpoint families and paginationmarketplace-api.md — Buy/sell workflows and Seaport detailsstream-api.md — WebSocket event streamingseaport.md — Seaport protocol and NFT purchase executiontoken-swaps.md — Token swap workflows via MCPAn official MCP server provides direct LLM integration for token swaps and NFT operations. Add to your MCP config:
{
"mcpServers": {
"opensea": {
"url": "https://mcp.opensea.io/mcp",
"headers": {
"Authorization": "Bearer YOUR_MCP_TOKEN"
}
}
}
}
See SKILL.md for the full list of available MCP tools.
Once installed, prompt your AI assistant:
Get me the floor price for the Pudgy Penguins collection on OpenSea
Swap 0.02 ETH to USDC on Base using OpenSea
Show me the best offer on BAYC #1234
The agent will use the opensea CLI to query the API directly.
This skill supports all chains available on OpenSea, including ethereum, solana, abstract, ape_chain, arbitrum, avalanche, b3, base, bera_chain, blast, flow, gunzilla, , , , , , , , , , , , , , and .
Weekly Installs
1
Repository
GitHub Stars
8
First Seen
Today
Security Audits
Gen Agent Trust HubFailSocketFailSnykWarn
Installed on
mcpjam1
claude-code1
replit1
junie1
windsurf1
zencoder1
通过 LiteLLM 代理让 Claude Code 对接 GitHub Copilot 运行 | 高级变通方案指南
29,800 周安装
API文档生成器 - 自动生成REST/GraphQL/WebSocket API专业文档
1 周安装
Algolia 搜索集成指南:React Hooks、Next.js SSR 与数据同步最佳实践
1 周安装
Agent Tool Builder - 构建高效可靠的大语言模型工具,优化Function Calling与错误处理
1 周安装
Agent Manager Skill - 并行管理多个本地CLI代理的tmux工具,支持任务分配与监控
1 周安装
A/B测试设置指南:从假设到分析的完整流程与最佳实践
1 周安装
Stripe支付集成指南:Node.js结账会话、支付意图、订阅与Webhooks完整教程
1 周安装
| Get buy transaction data |
opensea-fulfill-offer.sh | Get sell transaction data |
hyperevmhyperliquidinkmegaethmonadoptimismpolygonroninseishapesomniasoneiumunichainzora