todoist
Todoist CRUD
Wraps the Todoist REST API v1 via a bundled Python script. Authentication token lives in ${CLAUDE_SKILL_DIR}/.apikey (or TODOIST_API_TOKEN env var, which takes precedence).
Invocation
Call the script with python3:
python3 ~/.claude/skills/todoist/scripts/todoist.py <resource> <action> [args...]
Resources: tasks, projects, sections, labels, comments. Every successful call prints the API response as JSON; errors print HTTP <code> to stderr and exit non-zero.
For full endpoint/parameter details see references/api-reference.md.
Common playbooks
Add a task (the 90% case)
python3 ~/.claude/skills/todoist/scripts/todoist.py tasks add "買牛奶" --due "tomorrow 9am" --priority 2
--dueaccepts Todoist natural-language strings (today,tomorrow 9am,every monday,2026-05-01).--due-langif the user wrote Chinese natural-language (e.g."下週二"→ add--due-lang zh).--priorityis 1 (lowest) to 4 (highest, p1 in the Todoist UI).--labelsis comma-separated, e.g.--labels work,urgent.--project-idto target a specific project. Resolve project name → id withprojects listfirst.
See today's tasks
python3 ~/.claude/skills/todoist/scripts/todoist.py tasks list --filter "today"
Other filter strings: overdue, 7 days, p1, @work, #Inbox.
Complete a task
python3 ~/.claude/skills/todoist/scripts/todoist.py tasks close <task_id>
Use reopen to un-complete, delete to remove entirely.
Reschedule / edit
python3 ~/.claude/skills/todoist/scripts/todoist.py tasks update <task_id> --due "friday"
python3 ~/.claude/skills/todoist/scripts/todoist.py tasks update <task_id> --content "new title" --priority 3
Only pass the flags you want to change — omitted fields are left untouched.
Project / label bookkeeping
# projects
python3 ~/.claude/skills/todoist/scripts/todoist.py projects list
python3 ~/.claude/skills/todoist/scripts/todoist.py projects add "Side project"
# labels
python3 ~/.claude/skills/todoist/scripts/todoist.py labels list
python3 ~/.claude/skills/todoist/scripts/todoist.py labels add "deep-work"
Workflow guidance
- Resolve names before acting. Todoist uses numeric IDs. When the user names a project/label/task, first
listthe relevant resource, match byname/content, then act on theid. - Confirm before destructive ops.
deleteis irreversible. Confirm with the user when unsure.close/archiveare reversible and safer defaults. - Prefer
closeoverdeletefor completed tasks — it preserves history. - Dates: pass what the user said verbatim to
--due(e.g."tomorrow 3pm","下週一"). The API parses it. Set--due-langwhen the user wrote non-English. - Soft-delete:
DELETEflipsis_deleted: true; a follow-upGETreturns 200 with the tombstone, not 404. The script detects this and exits 2 with a stderr warning while still printing the JSON. Treat exit 2 as "gone", not success — don't trust only stdout. - Token errors: if the script exits with
HTTP 401orHTTP 403, the token is missing/invalid — tell the user to regenerate it at Todoist Settings → Integrations → Developer and write it to~/.claude/skills/todoist/.apikey. - Rate limits: Todoist allows ~450 requests / 15 min per user. For bulk operations, batch via
tasks list --ids "1,2,3"instead of loopingget.
Token file
Stored at ~/.claude/skills/todoist/.apikey, permissions 600. To rotate:
printf '%s' "<new-token>" > ~/.claude/skills/todoist/.apikey
chmod 600 ~/.claude/skills/todoist/.apikey
Or export TODOIST_API_TOKEN to override without touching the file.
More from htlin222/dotfiles
cpp
Write modern C++ with RAII, smart pointers, and STL. Use for C++ development, memory safety, or performance optimization.
130refactor
Refactor code for quality and maintainability. Use for cleanup and tech debt reduction.
76data-science
Data analysis, SQL queries, BigQuery operations, and data insights. Use for data analysis tasks and queries.
52c-lang
Write efficient C code with proper memory management and system calls. Use for C optimization, memory issues, or system programming.
46quarto-book
Generate Quarto Book project structure with chapters, configuration, and output settings. Use when user wants to create a book, multi-chapter document, technical manual, or asks about Quarto book setup.
45scientific-figure-assembly
Assemble multi-panel scientific figures with panel labels (A, B, C) at publication quality (300 DPI) using R. Use when combining individual plots into journal-ready figures.
43