Agent skill
trello-api-4-labels-management
Sub-skill of trello-api: 4. Labels Management (+1).
Install this agent skill to your Project
npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/_archive/business/productivity/trello-api/4-labels-management
SKILL.md
4. Labels Management (+1)
4. Labels Management
REST API - Labels:
# Get labels for board
curl -s "https://api.trello.com/1/boards/BOARD_ID/labels?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN" | jq
# Create label
curl -s -X POST "https://api.trello.com/1/labels" \
-d "key=$TRELLO_API_KEY" \
-d "token=$TRELLO_TOKEN" \
-d "name=Bug" \
-d "color=red" \
-d "idBoard=BOARD_ID" | jq
# Available colors: yellow, purple, blue, red, green, orange, black, sky, pink, lime
# Update label
curl -s -X PUT "https://api.trello.com/1/labels/LABEL_ID" \
-d "key=$TRELLO_API_KEY" \
-d "token=$TRELLO_TOKEN" \
-d "name=Critical Bug" \
-d "color=red" | jq
# Delete label
curl -s -X DELETE "https://api.trello.com/1/labels/LABEL_ID?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN"
# Add label to card
curl -s -X POST "https://api.trello.com/1/cards/CARD_ID/idLabels" \
-d "key=$TRELLO_API_KEY" \
-d "token=$TRELLO_TOKEN" \
-d "value=LABEL_ID" | jq
# Remove label from card
curl -s -X DELETE "https://api.trello.com/1/cards/CARD_ID/idLabels/LABEL_ID?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN"
Python SDK - Labels:
# Get all labels for board
labels = board.get_labels()
for label in labels:
print(f"Label: {label.name} (Color: {label.color})")
# Create new label
new_label = board.add_label(
name="Enhancement",
color="blue"
)
# Add label to card
card.add_label(new_label)
# Remove label from card
card.remove_label(new_label)
# Update label (using API directly)
import requests
requests.put(
f"https://api.trello.com/1/labels/{label.id}",
params={
"key": os.environ["TRELLO_API_KEY"],
"token": os.environ["TRELLO_TOKEN"],
"name": "New Name",
"color": "green"
}
)
5. Checklists Management
REST API - Checklists:
# Get checklists on card
curl -s "https://api.trello.com/1/cards/CARD_ID/checklists?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN" | jq
# Create checklist
curl -s -X POST "https://api.trello.com/1/checklists" \
-d "key=$TRELLO_API_KEY" \
-d "token=$TRELLO_TOKEN" \
-d "idCard=CARD_ID" \
-d "name=Deployment Checklist" | jq
# Add item to checklist
curl -s -X POST "https://api.trello.com/1/checklists/CHECKLIST_ID/checkItems" \
-d "key=$TRELLO_API_KEY" \
-d "token=$TRELLO_TOKEN" \
-d "name=Run tests" \
-d "pos=bottom" \
-d "checked=false" | jq
# Update checklist item (mark complete)
curl -s -X PUT "https://api.trello.com/1/cards/CARD_ID/checkItem/CHECKITEM_ID" \
-d "key=$TRELLO_API_KEY" \
-d "token=$TRELLO_TOKEN" \
-d "state=complete" | jq
# Delete checklist
curl -s -X DELETE "https://api.trello.com/1/checklists/CHECKLIST_ID?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN"
Python SDK - Checklists:
# Get checklists on card
checklists = card.fetch_checklists()
for checklist in checklists:
print(f"Checklist: {checklist.name}")
for item in checklist.items:
status = "[x]" if item["checked"] else "[ ]"
print(f" {status} {item['name']}")
# Create checklist with items
checklist = card.add_checklist(
title="Release Checklist",
items=[
"Code review completed",
"Tests passing",
"Documentation updated",
"Changelog updated",
"Version bumped"
]
)
# Check/uncheck item
checklist.set_checklist_item("Code review completed", checked=True)
# Delete checklist item
checklist.delete_checklist_item("Documentation updated")
# Rename checklist
checklist.rename("Pre-Release Checklist")
# Delete checklist
checklist.delete()
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gsd-complete-milestone
Archive completed milestone and prepare for next version
gsd-reapply-patches
Reapply local modifications after a GSD update
gsd-verify-work
Validate built features through conversational UAT
gsd-thread
Manage persistent context threads for cross-session work
clinical-trial-protocol
Generate clinical trial protocols for medical devices or drugs through a modular, waypoint-based architecture with research-only and full protocol modes.
single-cell-rna-qc
Performs quality control on single-cell RNA-seq data (.h5ad or .h5 files) using scverse best practices with MAD-based filtering and comprehensive visualizations.
Didn't find tool you were looking for?