Trello Skill
Manage Trello boards, lists, and cards directly from Clawdbot.
Setup
- 1. Get your API key: https://trello.com/app-key
- Generate a token (click "Token" link on that page)
- Set environment variables:
CODEBLOCK0
Usage
All commands use curl to hit the Trello REST API.
List boards
CODEBLOCK1
List lists in a board
CODEBLOCK2
List cards in a list
CODEBLOCK3
Create a card
CODEBLOCK4
Move a card to another list
CODEBLOCK5
Add a comment to a card
CODEBLOCK6
Archive a card
CODEBLOCK7
Notes
- - Board/List/Card IDs can be found in the Trello URL or via the list commands
- The API key and token provide full access to your Trello account - keep them secret!
- Rate limits: 300 requests per 10 seconds per API key; 100 requests per 10 seconds per token;
/1/members endpoints are limited to 100 requests per 900 seconds
Examples
CODEBLOCK8
Trello 技能
直接从 Clawdbot 管理 Trello 看板、列表和卡片。
设置
- 1. 获取你的 API 密钥:https://trello.com/app-key
- 生成一个令牌(点击该页面上的令牌链接)
- 设置环境变量:
bash
export TRELLO
APIKEY=你的-api-密钥
export TRELLO_TOKEN=你的-令牌
使用方法
所有命令均使用 curl 调用 Trello REST API。
列出看板
bash
curl -s https://api.trello.com/1/members/me/boards?key=$TRELLO
APIKEY&token=$TRELLO_TOKEN | jq .[] | {name, id}
列出看板中的列表
bash
curl -s https://api.trello.com/1/boards/{boardId}/lists?key=$TRELLO
APIKEY&token=$TRELLO_TOKEN | jq .[] | {name, id}
列出列表中的卡片
bash
curl -s https://api.trello.com/1/lists/{listId}/cards?key=$TRELLO
APIKEY&token=$TRELLO_TOKEN | jq .[] | {name, id, desc}
创建卡片
bash
curl -s -X POST https://api.trello.com/1/cards?key=$TRELLO
APIKEY&token=$TRELLO_TOKEN \
-d idList={listId} \
-d name=卡片标题 \
-d desc=卡片描述
将卡片移动到另一个列表
bash
curl -s -X PUT https://api.trello.com/1/cards/{cardId}?key=$TRELLO
APIKEY&token=$TRELLO_TOKEN \
-d idList={newListId}
为卡片添加评论
bash
curl -s -X POST https://api.trello.com/1/cards/{cardId}/actions/comments?key=$TRELLO
APIKEY&token=$TRELLO_TOKEN \
-d text=你的评论内容
归档卡片
bash
curl -s -X PUT https://api.trello.com/1/cards/{cardId}?key=$TRELLO
APIKEY&token=$TRELLO_TOKEN \
-d closed=true
注意事项
- - 看板/列表/卡片 ID 可以在 Trello URL 中或通过列表命令找到
- API 密钥和令牌提供对你 Trello 账户的完全访问权限——请保密!
- 速率限制:每个 API 密钥每 10 秒 300 次请求;每个令牌每 10 秒 100 次请求;/1/members 端点限制为每 900 秒 100 次请求
示例
bash
获取所有看板
curl -s https://api.trello.com/1/members/me/boards?key=$TRELLO
APIKEY&token=$TRELLO_TOKEN&fields=name,id | jq
按名称查找特定看板
curl -s https://api.trello.com/1/members/me/boards?key=$TRELLO
APIKEY&token=$TRELLO_TOKEN | jq .[] | select(.name | contains(工作))
获取看板上的所有卡片
curl -s https://api.trello.com/1/boards/{boardId}/cards?key=$TRELLO
APIKEY&token=$TRELLO_TOKEN | jq .[] | {name, list: .idList}