ms-todo-syncA CLI skill to manage Microsoft To Do tasks via Microsoft Graph API. Supports listing, creating, completing, deleting, searching tasks and lists, viewing overdue/today/pending tasks, and exporting data.
Install via ClawdBot CLI:
clawdbot install xiaoski/ms-todo-syncA Microsoft To Do command-line client for managing tasks and lists via Microsoft Graph API.
pip install uv or see https://docs.astral.sh/uv/.~/.mstodo_token_cache.json (persists across sessions, auto-refreshed)~/.mstodo_device_flow.json (temporary)Before using this skill for the first time, dependencies must be installed:
```bash
cd
uv sync
pip install -r requirements.txt
```
Dependencies:
msal (Microsoft Authentication Library) and requestsrequirements.txtuv creates an isolated virtual environment to avoid conflictsAfter installation, verify the setup:
```bash
uv run scripts/ms-todo-sync.py --help
```
Troubleshooting:
uv: command not found, install uv: pip install uvPython not found, install Python 3.9 or higher from https://python.orguv sync or pip install -r requirements.txtmsal library~/.mstodo_token_cache.jsonAll commands follow this pattern:
```
uv run scripts/ms-todo-sync.py [GLOBAL_OPTIONS]
```
| Option | Description |
|--------|-------------|
| -v, --verbose | Show detailed information (IDs, dates, notes). Must be placed BEFORE the subcommand. |
| --debug | Enable debug mode to display API requests and responses. Useful for troubleshooting. Must be placed BEFORE the subcommand. |
ā ļø Common mistake: Global options MUST come before the subcommand.
- ā
uv run scripts/ms-todo-sync.py -v lists
- ā
uv run scripts/ms-todo-sync.py --debug add "Task"
- ā uv run scripts/ms-todo-sync.py lists -v
Authentication uses a two-step device code flow designed for non-interactive/agent environments.
login get ā Get verification code```bash
uv run scripts/ms-todo-sync.py login get
```
Output example:
```
ā Verification code generated
Please visit the following link to log in:
https://microsoft.com/devicelogin
Enter verification code: ABC123XYZ
Verify with command: ms-todo-sync.py login verify
```
Agent behavior: Present the URL and verification code to the user. Wait for the user to confirm they have completed the browser login before proceeding.
login verify ā Complete login```bash
uv run scripts/ms-todo-sync.py login verify
```
Output on success:
```
ā Authentication successful! Login information saved, you will be logged in automatically next time.
```
Output on failure:
```
ā Authentication failed:
```
ā ļø This command blocks until Microsoft's server confirms the user completed browser authentication. Do NOT run this until the user confirms they have completed the browser step.
Exit code: 0 on success, 1 on failure.
logout ā Clear saved login```bash
uv run scripts/ms-todo-sync.py logout
```
Only use when the user explicitly asks to switch accounts or clear login data. Under normal circumstances, the token is cached and login is automatic.
lists ā List all task lists```bash
uv run scripts/ms-todo-sync.py lists
uv run scripts/ms-todo-sync.py -v lists # with IDs and dates
```
Output example:
```
š Task Lists (3 total):
```
create-list ā Create a new list```bash
uv run scripts/ms-todo-sync.py create-list "
```
| Argument | Required | Description |
|----------|----------|-------------|
| name | Yes | Name of the new list |
Output: ā List created:
delete-list ā Delete a list```bash
uv run scripts/ms-todo-sync.py delete-list "
```
| Argument/Option | Required | Description |
|-----------------|----------|-------------|
| name | Yes | Name of the list to delete |
| -y, --yes | No | Skip confirmation prompt |
ā ļø This is a destructive operation. Without -y, the command will prompt for confirmation. Consider asking the user before deleting important lists.
Output: ā List deleted:
add ā Add a new task```bash
uv run scripts/ms-todo-sync.py add "
```
| Option | Required | Default | Description |
|--------|----------|---------|-------------|
| title | Yes | ā | Task title (positional argument) |
| -l, --list | No | (default list) | Target list name. If not specified, uses your Microsoft To Do default list. |
| -p, --priority | No | normal | Priority: low, normal, high |
| -d, --due | No | ā | Due date. Accepts days from now (3 or 3d) or date (2026-02-15). Note: Only date is supported, not time. |
| -r, --reminder | No | ā | Reminder datetime. Formats: 3h (hours), 2d (days), 2026-02-15 14:30 (date+time with space, needs quotes), 2026-02-15T14:30:00 (ISO format), 2026-02-15 (date only, defaults to 09:00). |
| -R, --recurrence | No | ā | Recurrence pattern. Formats: daily (every day), weekdays (Mon-Fri), weekly (every week), monthly (every month). With interval: daily:2 (every 2 days), weekly:3 (every 3 weeks), monthly:2 (every 2 months). Note: Automatically sets start date. |
| -D, --description | No | ā | Task description/notes |
| -t, --tags | No | ā | Comma-separated tags (e.g., "work,urgent") |
Behavior: If the specified list doesn't exist, it will be automatically created.
Output example:
```
ā List created: Work
ā Task added: Complete report
```
complete ā Mark a task as completed```bash
uv run scripts/ms-todo-sync.py complete "
```
| Option | Required | Default | Description |
|--------|----------|---------|-------------|
| title | Yes | ā | Exact task title |
| -l, --list | No | (default list) | List name where the task resides. If not specified, uses your default list. |
Output: ā Task completed:
delete ā Delete a task```bash
uv run scripts/ms-todo-sync.py delete "
```
| Option | Required | Default | Description |
|--------|----------|---------|-------------|
| title | Yes | ā | Exact task title |
| -l, --list | No | (default list) | List name. If not specified, uses your default list. |
| -y, --yes | No | ā | Skip confirmation prompt |
ā ļø This is a destructive operation. Without-y, the command will prompt for confirmation. For routine cleanup or when user intent is clear,-ycan be used to avoid blocking.
Output: ā Task deleted:
tasks ā List tasks in a specific list```bash
uv run scripts/ms-todo-sync.py tasks "" [-a]
```
| Option | Required | Default | Description |
|--------|----------|---------|-------------|
| list | Yes | ā | List name (positional argument) |
| -a, --all | No | ā | Include completed tasks (default: only incomplete) |
Output example:
```
š Tasks in list "Work" (2 total):
```
pending ā All incomplete tasks across all lists```bash
uv run scripts/ms-todo-sync.py pending [-g]
```
| Option | Required | Description |
|--------|----------|-------------|
| -g, --group | No | Group results by list |
Output example (with -g):
```
š All incomplete tasks (3 total):
š Work:
[In Progress] Write documentation ā
[In Progress] Review PR
š Shopping:
[In Progress] Buy groceries
```
today ā Tasks due today```bash
uv run scripts/ms-todo-sync.py today
```
Lists incomplete tasks with due date matching today. Output: š
No tasks due today if none found.
overdue ā Overdue tasks```bash
uv run scripts/ms-todo-sync.py overdue
```
Output example:
```
ā ļø Overdue tasks (1 total):
[In Progress] Submit report ā
List: Work
Overdue: 3 days
```
detail ā View full task details```bash
uv run scripts/ms-todo-sync.py detail "
```
| Option | Required | Default | Description |
|--------|----------|---------|-------------|
| title | Yes | ā | Task title (supports partial/fuzzy match) |
| -l, --list | No | (default list) | List name. If not specified, uses your default list. |
When multiple tasks match, returns the most recently modified incomplete task. If all matches are completed, returns the most recently modified completed task.
search ā Search tasks by keyword```bash
uv run scripts/ms-todo-sync.py search "
```
Searches across all lists in both task titles and notes (case-insensitive).
Output example:
```
š Search results (1 found):
[In Progress] Write documentation ā
List: Work
```
stats ā Task statistics```bash
uv run scripts/ms-todo-sync.py stats
```
Output example:
```
š Task Statistics:
Total lists: 3
Total tasks: 15
Completed: 10
Pending: 5
High priority: 2
Overdue: 1
Completion rate: 66.7%
```
export ā Export all tasks to JSON```bash
uv run scripts/ms-todo-sync.py export [-o "
```
| Option | Required | Default | Description |
|--------|----------|---------|-------------|
| -o, --output | No | todo_export.json | Output file path |
Output: ā Tasks exported to:
| Code | Meaning |
|------|---------|
| 0 | Success |
| 1 | Failure (not logged in, API error, invalid arguments, etc.) |
| Error | Cause | Resolution |
|-------|-------|------------|
| ā Not logged in | No cached token or token expired | Run login get then login verify |
| ModuleNotFoundError: No module named 'msal' | Dependencies not installed | Run uv sync or pip install -r requirements.txt |
| ā List not found: | Specified list does not exist | Check list name with lists command |
| ā Task not found: | No task with exact matching title | Check task title with tasks or search |
| ā Error: | API or network error | Retry; check network; use --debug for details |
cd to the directory containing this SKILL.md before running commands.uv sync to ensure all dependencies are installed.lists to see available task listsdelete and delete-list commands:-y flag to skip confirmation ONLY when:-y-v and --debug must come BEFORE the subcommand, not after.login verify automatically: This command blocks waiting for user browser interaction. Only call it after the user confirms completion.lists) to verify authentication. Handle the "Not logged in" error gracefully.```
ā If fails with exit code 1 ("Not logged in"):
a. uv run scripts/ms-todo-sync.py login get # Get code
b. Present URL + code to user
c. Wait for user confirmation
d. uv run scripts/ms-todo-sync.py login verify
ā Analyze task context from user's description
ā Choose or create appropriate list name:
ā Add task with appropriate list via -l option
```
Example task categorization:
Note: If no list is specified, tasks are added to the user's default Microsoft To Do list.
complete and delete require exact title match.detail and search support partial/fuzzy keyword match (case-insensitive).search first to find the exact title, then use it in subsequent commands.When -l is not specified, the tool uses your Microsoft To Do default list (typically "Tasks"). To target a specific list, provide the -l option.
```bash
uv run scripts/ms-todo-sync.py lists
uv run scripts/ms-todo-sync.py add "Report" -l "Work" -p high -d 3 -D "Q4 financials"
uv run scripts/ms-todo-sync.py add "Buy milk"
uv run scripts/ms-todo-sync.py add "Call client" -r 2h
uv run scripts/ms-todo-sync.py add "Meeting" -d 2026-03-15 -r "2026-03-15 14:30"
uv run scripts/ms-todo-sync.py add "Daily standup" -l "Work" -R daily -d 7
uv run scripts/ms-todo-sync.py add "Weekly review" -R weekly -d 2026-02-17
uv run scripts/ms-todo-sync.py add "Gym" -R weekdays -l "Personal"
uv run scripts/ms-todo-sync.py add "Monthly report" -R monthly -p high -d 30
uv run scripts/ms-todo-sync.py search "report"
uv run scripts/ms-todo-sync.py complete "Report" -l "Work"
uv run scripts/ms-todo-sync.py delete "Old task" -y
uv run scripts/ms-todo-sync.py -v pending -g # all pending, grouped
uv run scripts/ms-todo-sync.py -v detail "report" # task detail with fuzzy match
uv run scripts/ms-todo-sync.py export -o "backup.json" # export all
```
Generated Mar 1, 2026
Individuals use this CLI tool to manage their Microsoft To Do tasks directly from the terminal, ideal for developers or power users who prefer command-line interfaces over GUI apps. It allows quick task addition, completion tracking, and list organization without switching contexts, enhancing personal productivity.
Small teams or project groups utilize the tool to synchronize tasks across shared Microsoft To Do lists, enabling members to add, update, or mark tasks as done via automated scripts. This supports agile workflows and remote collaboration by keeping task statuses current and accessible.
Businesses integrate this skill into automated pipelines, such as CI/CD systems or monitoring tools, to create tasks based on events like build failures or alerts. It triggers task creation in Microsoft To Do for follow-up, ensuring issues are tracked without manual intervention.
Users export task data to JSON or CSV formats for backup purposes or to generate custom reports on productivity metrics. This is useful for freelancers or consultants who need to log task completion for client billing or performance analysis.
Students and educators manage academic assignments and deadlines by creating task lists for courses, setting due dates, and tracking overdue items. It helps in organizing study schedules and ensuring timely submission of projects.
Offer a basic version of the CLI tool for free with limited features, such as task listing and adding, while charging for advanced capabilities like bulk operations, API rate limit increases, or premium support. Revenue is generated through subscription tiers targeting power users and enterprises.
Sell customized versions of the skill to businesses for internal use, with added features like enhanced security, audit logs, and integration with corporate systems. Revenue comes from one-time licenses or annual maintenance fees, focusing on large organizations with strict compliance needs.
Provide paid consulting services to help clients set up, customize, and integrate the tool into their workflows, along with offering technical support and training. Revenue is generated through hourly rates or retainer agreements, catering to non-technical users or complex deployment scenarios.
š¬ Integration Tip
Ensure Python 3.9+ and uv are installed, and run commands from the skill root directory; use the login flow for initial authentication, which caches tokens for automatic future use.
Manage Trello boards, lists, and cards via the Trello REST API.
Sync and query CalDAV calendars (iCloud, Google, Fastmail, Nextcloud, etc.) using vdirsyncer + khal. Works on Linux.
Manage tasks and projects in Todoist. Use when user asks about tasks, to-dos, reminders, or productivity.
Master OpenClaw's timing systems. Use for scheduling reliable reminders, setting up periodic maintenance (janitor jobs), and understanding when to use Cron v...
Calendar management and scheduling. Create events, manage meetings, and sync across calendar providers.
Kanban-style task management dashboard for AI assistants. Manage tasks via CLI or dashboard UI. Use when user mentions tasks, kanban, task board, mission con...