| name | todo |
| description | Create and manage todo list documents (TodoDoc). Use for task lists, checklists, and simple project tracking. |
Todo Skill
Create and manage todo list documents.
Import
const todo = await workspace.loadSkill("todo");
Types
{ title: string, todos: Todo[] }
{ id: string, description: string, done: boolean }
API
createTodo(title) (async)
Creates a new todo list. Returns { handle, url }.
const { url } = await todo.createTodo("Shopping List");
getTodo(url) (async)
Returns interface for the todo at url:
| Method | Description |
|---|
addItem(description) | Adds a new todo item |
toggleItem(id) | Toggles done state |
removeItem(id) | Removes item by id |
getItems() | Returns all items |
getTitle() | Returns list title |
setTitle(title) | Updates title |
Examples
const todo = await workspace.loadSkill("todo");
const { url } = await todo.createTodo("Weekly Tasks");
const list = await todo.getTodo(url);
list.addItem("Review PRs");
list.addItem("Update docs");
list.addItem("Deploy to staging");
const items = list.getItems();
console.log(items);
list.toggleItem(items[0].id);
list.removeItem(items[2].id);
list.setTitle("Sprint Tasks");