据 AlphaMoat 统计,截至 2026-09,tapd-api 累计下载 2,085 次、获 1 个星标,在全部 5,078 个 AI 技能中排名第 4,370 位,在「商业运营」分类(297 个)中排名第 241 位。
| 平台 | 累计安装 | 累计下载 | 星标 | 评论 |
|---|---|---|---|---|
| ClawHub ↗ | 28 | 1,024 | 1 | - |
| SkillHub ↗ | 283 | 2,085 | 1 | — |
各平台的计数口径不同,统计时间不一致。
读取 tapd.json 的 OAuth 凭据与工作空间配置,查询需求、任务、缺陷及迭代。Shell 工具只读且每次换取 token;Python 客户端支持写入并缓存刷新 token。应用需获目标项目授权,工作空间需有效;未授权可能返回 403,token 过期可能返回 401。API 有频率限制,配置文件不得提交到 Git。
资料发布于 2026-10-26
以下是根据技能文档生成的示例,不代表实际运行结果。
2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。
| 月份 | 累计下载 | 环比 | 星标 |
|---|---|---|---|
| 2026-09 | 2,085 | — | 1 |
| 2026-08 | 1,250 | +12.2% | 1 |
| 2026-07 | 1,114 | +19.7% | 1 |
| 2026-06 | 931 | +9.4% | 1 |
| 2026-05 | 851 | — | 1 |
| 2026-03 | 534 | — | 1 |
以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。
---
name: tapd-api
description: TAPD API 完整集成。实现 18 个模块、70+ API 方法,支持 OAuth 和 Basic Auth 认证。涵盖需求、任务、缺陷、迭代、测试、Wiki、工时等所有 TAPD 功能。
metadata:
openclaw:
emoji: "📋"
requires:
bins: ["python3"]
version: "2.1.0"
author: "OpenClaw Community" license: "MIT"
tags: ["tapd", "api", "project-management", "sdk"]
---
# TAPD API Skill
完整的 TAPD 开放平台集成,实现所有 TAPD API 模块。基于 [TAPD PHP SDK](https://github.com/ouronghuang/tapd) 用 Python 重新实现。
## 📋 功能特性
- ✅ 从 `tapd.json` 读取 OAuth 配置
- ✅ 自动换取和刷新 access_token
- ✅ 支持多工作空间切换
- ✅ 完整的 API 封装(18 个模块,70+ 方法)
- ✅ 命令行工具 + Python SDK
- ✅ 详细的使用文档和示例
## 🔧 配置
### 配置文件 (tapd.json)
所有配置存储在 `tapd.json` 文件中,支持多工作空间:
```json
{
"oauth": {
"clientId": "your-client-id",
"clientSecret": "your-client-secret"
},
"workspaces": [
{
"id": "12345678",
"name": "项目A",
"default": true
},
{
"id": "87654321",
"name": "项目B"
}
]
}
```
### 配置项说明
| 参数 | 必需 | 说明 |
|------|------|------|
| `oauth.clientId` | 是 | TAPD OAuth 应用 ID |
| `oauth.clientSecret` | 是 | TAPD OAuth 应用密钥 |
| `workspaces` | 是 | 工作空间列表 |
| `workspaces[].id` | 是 | 工作空间 ID |
| `workspaces[].name` | 否 | 工作空间名称(便于识别) |
| `workspaces[].default` | 否 | 是否为默认工作空间 |
### 获取 OAuth 凭证
1. 登录 TAPD 开放平台: https://open.tapd.cn
2. 创建开放应用
3. 获取 **应用ID** (clientId) 和 **应用密钥** (clientSecret)
4. 配置应用权限(需求、任务、缺陷等)
5. 将应用安装到目标项目
### 获取工作空间 ID
- 打开 TAPD 项目
- URL 中的数字即为 workspace_id
- 例如: `https://www.tapd.cn/12345678/` → workspace_id 是 `12345678`
## 🚀 快速开始
### 1. 创建配置文件
```bash
# 创建 tapd.json
cat > tapd.json << 'EOF'
{
"oauth": {
"clientId": "your-client-id",
"clientSecret": "your-client-secret"
},
"workspaces": [
{
"id": "12345678",
"name": "我的项目",
"default": true
}
]
}
EOF
# 设置权限
chmod 600 tapd.json
```
### 2. Python SDK 使用
```python
from scripts.tapd_client import TapdClient
import json
# 读取配置
with open('tapd.json') as f:
config = json.load(f)
# 获取默认工作空间
default_workspace = next(
(ws for ws in config['workspaces'] if ws.get('default')),
config['workspaces'][0]
)
# 初始化客户端
client = TapdClient(
auth_type='oauth',
client_id=config['oauth']['clientId'],
client_secret=config['oauth']['clientSecret'],
workspace_id=default_workspace['id']
)
# 获取需求列表
stories = client.story.list(
workspace_id=default_workspace['id'],
limit=10
)
print(f"获取到 {len(stories)} 条需求")
```
### 3. 多工作空间切换
```python
# 遍历所有工作空间
for workspace in config['workspaces']:
print(f"工作空间: {workspace['name']}")
client = TapdClient(
auth_type='oauth',
client_id=config['oauth']['clientId'],
client_secret=config['oauth']['clientSecret'],
workspace_id=workspace['id']
)
stories = client.story.list(workspace_id=workspace['id'], limit=5)
print(f" 需求数: {len(stories)}")
```
### 3. Shell 命令行使用
```bash
# 设置环境变量(从配置文件读取)
export TAPD_CLIENT_ID=$(cat tapd.json | jq -r '.oauth.clientId')
export TAPD_CLIENT_SECRET=$(cat tapd.json | jq -r '.oauth.clientSecret')
export TAPD_WORKSPACE_ID=$(cat tapd.json | jq -r '.workspace_id')
# 使用命令行工具
./scripts/tapd-api.sh story list --limit 10
./scripts/tapd-api.sh story count
./scripts/tapd-api.sh bug list --status new
```
# 获取需求列表
stories = client.get_stories(limit=10)
for story in stories:
print(f"{story['id']}: {story['name']}")
# 获取需求详情
story_detail = client.get_story(story_id="1112345678001000001")
# 获取任务列表
tasks = client.get_tasks(limit=5)
# 获取缺陷列表
bugs = client.get_bugs(limit=5)
```
## 📖 API 认证流程
### OAuth 流程图
```
┌─────────────────────────────────────────────────────────┐
│ 1. 从 tapd.json 读取 clientId + clientSecret │
└─────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────┐
│ 2. POST /tokens/request_token │
│ grant_type=client_credentials │
│ Authorization: Basic base64(clientId:clientSecret) │
└─────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────┐
│ 3. 获取 access_token (有效期 7200 秒 / 2 小时) │
└─────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────┐
│ 4. 调用 TAPD API │
│ Authorization: Bearer <access_token> │
└─────────────────────────────────────────────────────────┘
```
### 认证代码示例
```bash
# Shell 方式
CLIENT_ID="your-client-id"
CLIENT_SECRET="your-client-secret"
# 获取 access_token
ACCESS_TOKEN=$(curl -s -u "$CLIENT_ID:$CLIENT_SECRET" \
-d "grant_type=client_credentials" \
"https://api.tapd.cn/tokens/request_token" \
| python3 -c "import json, sys; print(json.load(sys.stdin)['data']['access_token'])")
# 调用 API
curl -H "Authorization: Bearer $ACCESS_TOKEN" \
"https://api.tapd.cn/stories?workspace_id=12345678&limit=10"
```
## 🔌 API 端点
### 需求 (Stories)
| 方法 | 端点 | 参数 | 说明 |
|------|------|------|------|
| GET | `/stories` | workspace_id, limit, page, status | 获取需求列表 |
| GET | `/stories/count` | workspace_id, status | 获取需求数量 |
| POST | `/stories` | workspace_id, name, description | 创建需求 |
| POST | `/stories` | workspace_id, id, ... | 更新需求 |
### 任务 (Tasks)
| 方法 | 端点 | 参数 | 说明 |
|------|------|------|------|
| GET | `/tasks` | workspace_id, limit, page | 获取任务列表 |
| POST | `/tasks` | workspace_id, name, ... | 创建/更新任务 |
### 缺陷 (Bugs)
| 方法 | 端点 | 参数 | 说明 |
|------|------|------|------|
| GET | `/bugs` | workspace_id, limit, page, status | 获取缺陷列表 |
| POST | `/bugs` | workspace_id, title, ... | 创建/更新缺陷 |
### 迭代 (Iterations)
| 方法 | 端点 | 参数 | 说明 |
|------|------|------|------|
| GET | `/iterations` | workspace_id, limit, page | 获取迭代列表 |
### 其他
- `/workspaces/projects` - 获取项目列表
- `/releases` - 发布计划
- `/tcases` - 测试用例
- `/comments` - 评论
## 📝 使用示例
### 示例 1: 获取高优先级需求
```bash
# 使用命令行工具(自动过滤)
./scripts/tapd-api.sh stories 50 | python3 -c "
import json, sys
data = json.load(sys.stdin)
for item in data['data']:
story = item['Story']
if story.get('priority') == '4': # High priority
print(f\"{story['id']}: {story['name']}\")
"
```
### 示例 2: 创建需求
```python
from scripts.tapd_oauth_client import TapdOAuthClient
client = TapdOAuthClient()
new_story = client.create_story(
name="【新功能】实现用户登录",
description="需求描述:\n1. 支持邮箱登录\n2. 支持手机号登录",
priority="4" # High
)
print(f"创建成功: {new_story['id']}")
```
### 示例 3: 批量更新需求状态
```python
client = TapdOAuthClient()
# 获取所有 planning 状态的需求
stories = client.get_stories(status="planning", limit=100)
# 批量更新为进行中
for story in stories:
client.update_story(
story_id=story['id'],
status="status_3" # 进行中
)
```
## 🛠️ 脚本说明
### `scripts/tapd-api.sh`
Shell 命令行工具,支持快速查询。
**优点**:
- 简单易用
- 无需 Python 环境
- 适合快速查询
**限制**:
- 只读操作
- 无状态管理
- 每次都需要获取新 token
### `scripts/tapd_oauth_client.py`
Python 客户端库,支持完整功能。
**优点**:
- 完整 CRUD 支持
- Token 缓存和自动刷新
- 面向对象设计
- 错误处理完善
**推荐用法**:
- 复杂业务逻辑
- 批量操作
- 集成到其他 Python 项目
## 🔐 安全注意事项
### ⚠️ 敏感信息保护
1. **不要提交 tapd.json 到 Git**
```bash
# .gitignore
tapd.json
tapd-*.json
```
2. **设置文件权限**
```bash
chmod 600 tapd.json
```
3. **使用环境变量(可选)**
```bash
export TAPD_CLIENT_ID="your-id"
export TAPD_CLIENT_SECRET="your-secret"
export TAPD_WORKSPACE_ID="12345678"
```
4. **定期更换密钥**
- 定期在 TAPD 开放平台重置应用密钥
- 更新 tapd.json
### 🔒 权限控制
- 只授予必要的应用权限
- 使用安全 IP 白名单(在 TAPD 开放平台设置)
- 监控 API 调用日志
## 📚 参考文档
- [TAPD 开放平台文档](https://open.tapd.cn/document/api-doc/)
- [OAuth 认证流程](https://open.tapd.cn/document/api-doc/API文档/授权凭证/项目态.html)
- [API 使用必读](https://open.tapd.cn/document/api-doc/API文档/使用必读.html)
- [完整 API 列表](https://open.tapd.cn/document/api-doc/API文档/)
## 🐛 故障排除
### 问题 1: 403 Forbidden
**原因**: OAuth 应用未被授权访问项目
**解决**:
1. 在 TAPD 项目设置中安装应用
2. 确认应用权限配置正确
3. 检查安全 IP 白名单
### 问题 2: access_token 过期
**症状**: 返回 401 Unauthorized
**解决**:
- Shell 脚本:每次都会重新获取 token
- Python 客户端:自动检测过期并刷新
### 问题 3: workspace_id 无效
**原因**: 配置的 workspace_id 不存在或无权限
**解决**:
1. 检查 URL 中的 workspace_id
2. 确认 OAuth 应用已安装到该项目
3. 使用 `/workspaces/projects` API 列出可访问的项目
## 📊 性能优化
### Token 缓存
Python 客户端会缓存 access_token:
```python
# Token 缓存到 ~/.tapd_token_cache.json
# 有效期内不会重复请求
```
### 批量请求
```python
# 批量获取(推荐)
stories = client.get_stories(limit=100)
# 逐个获取(不推荐)
for id in story_ids:
story = client.get_story(id) # 会触发多次 API 请求
```
### 并发限制
TAPD API 有频率限制,建议:
- 使用 `limit` 参数批量获取
- 添加请求间隔(0.1-0.5 秒)
- 缓存不常变化的数据
## 🔄 更新日志
---
**作者**: OpenClaw Community
**许可**: MIT
**支持**: https://github.com/openclaw/skills
PollyReach gives every AI agent a phone number and the ability to get things done over the phone — finding contacts, making calls, and completing tasks. Just...
通过 Trello REST API 管理看板、列表与卡片。
全网招中标数据查询与分析助手。当用户涉及以下任何场景时,必须使用此SKILL:查询招标/中标公告、搜索标讯、查找临期/即将到期项目、查询拟建项目与立项审批阶段的早期商机、追踪某个项目各阶段进展与全流程时间线、商机预测、推荐潜在投标供应商、查询企业工商登记信息(统一社会信用代码/注册资本/法定代表人/经营范围/成立日期/登记机关/曾用名)、分析公司主营业务/历史中标、查询公司上下游合作客户与供应商、分析竞争对手/竞对企业、查询Top采购单位/Top中标单位/Top中标品牌、招中标数据统计分析(按月/季/年/省份/品牌等维度)、查询品牌型号历史中标单价/价格趋势、查询当前账户余额/剩余积分/累计充值消费、市场分析/行业分析/采购寻源/渠道拓展等采购与投标相关场景。即使用户没有提到「知了标讯」,只要涉及招投标、采购、中标、供应商、竞争对手、企业工商信息、账户余额、剩余积分等关键词,都应使用本SKILL。
需求分析、PRD编写、产品需求文档、详细设计、BRD、MRD、PRD模板、用户故事、用户访谈、需求挖掘、痛点分析、功能设计、KANO模型、Y模型、5W1H、优先级排序、需求池管理、写过需求、写PRD、做需求分析、产品设计、产品策略、SWOT分析、波特五力、PESTLE、安索夫矩阵、商业模式画布、价值主张、产品愿景、OKR制定、Sprint规划、回顾会、发布说明、干系人管理、竞品分析、市场调研、用户研究、机会解决方案树、指标看板、测试场景、头脑风暴、假设验证
面向日历管理与会议排期的技能。
提供市场趋势、竞品与用户行为分析的市场分析服务。
电商平台爆款产品筛选分析 - 基于数据分析的智能选品工具,支持淘宝、京东、拼多多、抖音、亚马逊等平台
通过托管 OAuth 与 Salesforce CRM API 集成。仅在需要 Salesforce CRM 管理时才安装。使用最小权限连接 Salesforce,破坏性或批量操作首选沙箱组织,每次请求前验证目标连接 ID,并撤销未使用的连接。
数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。