---
description: Use for Trello — list boards/lists/cards, create/move cards, complete tasks, execute TODO→DONE workflow via REST API.
allowed-tools: Bash, Read, Write, Edit, Glob, Grep, Agent
---


# Trello Skill

## Credentials

In `~/.secrets/trello.api` (mode 0600), as `api`, `secret`, `multidealbot_token`.
Load with: `set -a; . ~/.secrets/trello.api; set +a`

All requests use: `?key={api}&token={multidealbot_token}`

Base URL: `https://api.trello.com/1`

## Core Workflow: TODO → DONE

```
1. Find board ID (list boards or use known ID)
2. Get lists on board → find TODO list ID + DONE list ID
3. Get cards on TODO list
4. Pick card → perform task
5. Move card to DONE list (PUT /cards/{id} with idList=DONE_LIST_ID)
```

## Quick Reference

### Boards
```bash
# List all boards for token owner
curl "https://api.trello.com/1/members/me/boards?key=KEY&token=TOKEN&fields=id,name"

# Get board
curl "https://api.trello.com/1/boards/{BOARD_ID}?key=KEY&token=TOKEN"
```

### Lists
```bash
# Get all lists on board
curl "https://api.trello.com/1/boards/{BOARD_ID}/lists?key=KEY&token=TOKEN&fields=id,name"

# Get cards on a list
curl "https://api.trello.com/1/lists/{LIST_ID}/cards?key=KEY&token=TOKEN"
```

### Cards
```bash
# Create card
curl -X POST "https://api.trello.com/1/cards" \
  -d "idList=LIST_ID&name=TITLE&desc=DESCRIPTION&key=KEY&token=TOKEN"

# Move card to another list (TODO → DONE)
curl -X PUT "https://api.trello.com/1/cards/{CARD_ID}" \
  -d "idList=TARGET_LIST_ID&key=KEY&token=TOKEN"

# Update card (name, desc, due, pos)
curl -X PUT "https://api.trello.com/1/cards/{CARD_ID}" \
  -d "name=NEW_NAME&desc=NEW_DESC&key=KEY&token=TOKEN"

# Archive card (close)
curl -X PUT "https://api.trello.com/1/cards/{CARD_ID}" \
  -d "closed=true&key=KEY&token=TOKEN"

# Add comment
curl -X POST "https://api.trello.com/1/cards/{CARD_ID}/actions/comments" \
  -d "text=COMMENT&key=KEY&token=TOKEN"

# Get card details
curl "https://api.trello.com/1/cards/{CARD_ID}?key=KEY&token=TOKEN"
```

### Labels
```bash
# Add label to card
curl -X POST "https://api.trello.com/1/cards/{CARD_ID}/idLabels" \
  -d "value=LABEL_ID&key=KEY&token=TOKEN"
```

### Members
```bash
# Get board members
curl "https://api.trello.com/1/boards/{BOARD_ID}/members?key=KEY&token=TOKEN"
```

## Scripted TODO→DONE Session

```bash
set -a; . ~/.secrets/trello.api; set +a
KEY="$api"
TOKEN="$multidealbot_token"
BASE="https://api.trello.com/1"

# 1. Get boards
curl -s "$BASE/members/me/boards?key=$KEY&token=$TOKEN&fields=id,name" | jq '.[] | {id,name}'

# 2. Get lists (replace BOARD_ID)
curl -s "$BASE/boards/BOARD_ID/lists?key=$KEY&token=$TOKEN&fields=id,name" | jq '.[] | {id,name}'

# 3. Get TODO cards (replace LIST_ID)
curl -s "$BASE/lists/LIST_ID/cards?key=$KEY&token=$TOKEN" | jq '.[] | {id,name,desc}'

# 4. Move card to DONE (replace CARD_ID and DONE_LIST_ID)
curl -s -X PUT "$BASE/cards/CARD_ID?key=$KEY&token=$TOKEN" \
  -d "idList=DONE_LIST_ID" | jq '{id,name,idList}'
```

## Common Mistakes

- Missing `key` + `token` on every request → 401
- Using `secret` instead of `multidealbot_token` as token → 401
- Moving card: PUT body needs `idList`, not `listId`
- Card position: use `"pos=top"` or `"pos=bottom"` or float
- POST requests: `-d` form data OR JSON with `-H "Content-Type: application/json"` + `-d '{"key":"..."}'` — not mixed

$ARGUMENTS
