Steam 社区库存:利用 Openclaw Skills 管理游戏数据
作者:互联网
2026-03-26
什么是 Steam 社区库存?
Steam 社区库存技能为 AI 代理与 Steam 社区平台的交互提供了一个精简的界面。通过将其集成到 Openclaw Skills 中,开发者可以从任何公开个人资料中提取有关虚拟物品、交易卡和特定游戏资产的细粒度数据。它旨在处理 Steam 库存 API 的复杂性,包括元数据映射和会话身份验证。
该工具对于开发游戏助手或市场分析工具的开发者特别有价值。利用 Openclaw Skills,您可以绕过常见的基于 IP 的速率限制,并以高精度和可靠性编程化管理《反恐精英 2》、《军团要塞 2》和《Dota 2》等热门游戏的大规模库存。
下载入口:https://github.com/openclaw/skills/tree/main/skills/bluesyparty-src/steam-community-inventory
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install steam-community-inventory
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 steam-community-inventory。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
Steam 社区库存 应用场景
- 自动化跟踪 CS2 或 Rust 库存中的高价值皮肤和物品。
- 生成 Steam 交易卡和社区奖励的详细分类摘要。
- 使用 Openclaw Skills 构建用于电子商务研究的游戏资产市场就绪数据集。
- 监控竞争性游戏概况中库存随时间的变化。
- 该技能需要有效的 SteamID64 和会话 Cookie 来进行身份验证并绕过严格的速率限制。
- 它使用特定的 App ID(例如 CS2 的 730)定位 Steam 社区库存端点。
- 请求通过 curl 执行,并包含用户的会话标头以进行授权访问。
- 使用 jq 解析数据,将原始资产 ID 与详细的物品描述分离。
- 对于大型收藏,该技能使用 start_assetid 参数实现分页获取逻辑,以确保完整的数据检索。
Steam 社区库存 配置指南
要在 Openclaw Skills 环境中使用此技能,请按照以下步骤操作:
- 通过您的个人资料 URL 或查询工具找到您的 SteamID64。
- 登录 steamcommunity.com 并从浏览器的开发者工具中复制
steamLoginSecureCookie 值。 - 配置您的环境变量:
export STEAM_ID="your-steamid64"
export STEAM_COOKIES="steamLoginSecure=your-cookie-value"
Steam 社区库存 数据架构与分类体系
该技能将库存数据组织成结构化格式,以便于使用:
| 对象 | 关键字段 | 用途 |
|---|---|---|
assets |
appid, assetid, classid, amount | 识别物品的特定实例。 |
descriptions |
name, market_hash_name, type, icon_url | 提供人类可读的元数据和视觉效果。 |
metadata |
total_inventory_count, more_items | 管理分页和库存规模。 |
资产通过 classid 和 instanceid 对映射到描述,从而实现对物品属性的高效查询。
name: steamcommunity
description: Retrieves Steam inventory data for a user from steamcommunity.com
homepage: https://steamcommunity.com/dev
metadata: {"clawdbot":{"emoji":"⚔","requires":{"bins":["jq","curl"],"env":["STEAM_ID","STEAM_COOKIES"]}}}
Steam Community Inventory Skill
Retrieve and browse a Steam user's inventory from steamcommunity.com.
Setup
-
Find your Steam ID (SteamID64):
- Go to your Steam profile page
- If your URL is
https://steamcommunity.com/profiles/76561198012345678, your Steam ID is76561198012345678 - If your URL uses a vanity name like
https://steamcommunity.com/id/myname, visit steamid.io and paste your profile URL to get your SteamID64
-
Get your Steam session cookies (required to bypass rate limits when fetching your own inventory):
- Log in to steamcommunity.com in your browser
- Open Developer Tools (F12) > Application tab > Cookies >
https://steamcommunity.com - Copy the value of the
steamLoginSecurecookie
-
Set environment variables:
export STEAM_ID="your-steamid64" export STEAM_COOKIES="steamLoginSecure=your-cookie-value"
Usage
All commands use curl to hit the Steam Community inventory endpoint. The context ID is 2 for all standard game inventories.
Common App IDs
| Game | App ID |
|---|---|
| CS2 / CS:GO | 730 |
| Team Fortress 2 | 440 |
| Dota 2 | 570 |
| Rust | 252490 |
| PUBG | 578080 |
| Steam Community (trading cards, etc.) | 753 |
Get inventory for a game
Replace $APP_ID with the game's App ID (see table above). Context ID is 2 for all standard game inventories.
curl -s "https://steamcommunity.com/inventory/$STEAM_ID/$APP_ID/2?l=english&count=2000" r
-H "Cookie: $STEAM_COOKIES" | jq '.'
Get CS2 inventory
curl -s "https://steamcommunity.com/inventory/$STEAM_ID/730/2?l=english&count=2000" r
-H "Cookie: $STEAM_COOKIES" | jq '.'
Get a summary of items (names and quantities)
curl -s "https://steamcommunity.com/inventory/$STEAM_ID/730/2?l=english&count=2000" r
-H "Cookie: $STEAM_COOKIES" | jq '[.descriptions[] | {market_hash_name, type}]'
Get item details (asset IDs mapped to descriptions)
curl -s "https://steamcommunity.com/inventory/$STEAM_ID/730/2?l=english&count=2000" r
-H "Cookie: $STEAM_COOKIES" | jq '{assets: [.assets[] | {assetid, classid, instanceid, amount}], total: .total_inventory_count}'
Paginated fetch (for inventories over 2000 items)
The API returns a last_assetid field when there are more items. Pass it as start_assetid to get the next page:
curl -s "https://steamcommunity.com/inventory/$STEAM_ID/730/2?l=english&count=2000&start_assetid=$LAST_ASSET_ID" r
-H "Cookie: $STEAM_COOKIES" | jq '.'
Check for more pages by looking at the more_items field in the response (equals 1 if there are more).
Response Format
The inventory endpoint returns JSON with these key fields:
| Field | Description |
|---|---|
assets |
Array of items with appid, contextid, assetid, classid, instanceid, amount |
descriptions |
Array of item metadata: market_hash_name, name, type, icon_url, tradable, marketable, tags, etc. |
total_inventory_count |
Total number of items in the inventory |
more_items |
1 if more pages available (absent otherwise) |
last_assetid |
Last asset ID returned; use as start_assetid for next page |
success |
1 if the request succeeded |
Assets are linked to descriptions via classid + instanceid.
Notes
- Rate limits: The community endpoint is heavily rate-limited by IP. Using your own cookies bypasses this for your own inventory. Without cookies, expect IP bans after a few requests (cooldown ~6 hours).
- Spacing: If fetching multiple inventories or pages, wait at least 4 seconds between requests.
- count parameter: Max value is 5000, but 2000 is recommended to avoid issues.
- Context ID: Use
2for all standard game inventories. Steam Community items (appid 753) also use context ID6for some item types. - Private profiles: Inventory must be set to public, or you must be authenticated as the owner.
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
读取 Intercom 对话:提取支持数据 - Openclaw Skills
DocuClaw: 本地 AI 文档智能与归档 - Openclaw 技能
Pywayne Cross Comm:WebSocket 多语言消息通信 - Openclaw Skills
ERC-8004:区块链 AI 代理身份与声誉 - Openclaw Skills
行动建议器:人工智能驱动的潜客跟进建议 - Openclaw Skills
会话成本追踪器:优化 Token 投资回报率 - Openclaw Skills
Memoria: AI 智能体结构化记忆系统 - Openclaw Skills
Deno 运行时专家:安全 TypeScript 开发 - Openclaw Skills
为 AI 代理部署 Spark Bitcoin L2 代理 - Openclaw Skills
加密货币价格技能:实时市场数据集成 - Openclaw Skills
AI精选
