Kan.bn TODO API
Use this skill to run Kan.bn personal task workflows via scripts/kanbn_todo.py.
Keep the interaction goal-oriented: figure out the user's intended task change, discover any missing IDs, execute the smallest correct API operation, then report the result clearly.
Configure authentication
Set auth before running commands:
- -
KANBN_TOKEN for bearer auth, or - INLINECODE2 for API-key auth.
Auth lookup order in kanbn_todo.py:
- 1. CLI flags (
--token, --api-key, --base-url) - Process environment (
KANBN_TOKEN, KANBN_API_KEY, KANBN_BASE_URL) - INLINECODE10
export values (for non-interactive runs)
Optional:
- -
KANBN_BASE_URL (defaults to https://kan.bn/api/v1)
If auth is missing, stop early and ask for credentials or confirm the env source.
Follow the standard execution flow
1) Discover context before mutating data
When the user has not provided concrete Kan.bn IDs, resolve them first.
CODEBLOCK0
Use this discovery flow for requests like:
- - "Add a todo in Kan.bn"
- "Move my task to done"
- "Find the board with invoices"
If the user already provided exact card/list/workspace IDs, skip the discovery steps you do not need.
2) Create, then read back
After creating a TODO, read it back when the user cares about confirmation, due date, labels, or returned IDs.
CODEBLOCK1
3) Prefer the narrowest mutation
Choose the command that most directly matches the requested change.
- - Edit title/description/due date -> INLINECODE14
- Change workflow status/list -> INLINECODE15
- Add or remove a label -> INLINECODE16
- Delete the task -> INLINECODE17
Edit fields:
CODEBLOCK2
Change status by moving lists (e.g., TODO -> DOING -> DONE):
CODEBLOCK3
Delete TODO:
CODEBLOCK4
Apply the priority label policy
When a request asks to set, mark, sort, or batch-assign priorities, use labels (P0-P4) as the source of truth.
- - Apply priority via label changes.
- Do not encode priority in titles.
- Keep task titles focused on the actual work item text.
- If the correct priority label ID is unknown, inspect board metadata first.
- Official Kan.bn docs expose label changes on a dedicated endpoint, not
todo-update.
For an existing card:
CODEBLOCK5
Use personal productivity workflows
Search tasks in a workspace:
CODEBLOCK6
Add personal notes/comments:
CODEBLOCK7
Track subtasks with checklist:
CODEBLOCK8
Update the personal profile only when the user explicitly asks:
CODEBLOCK9
Handle missing information carefully
When the user asks for an operation but key identifiers are missing:
- - Discover the smallest missing context first
- Prefer
search when the user describes a task by text instead of card ID - Prefer
boards when the missing information is board or list structure - Ask a follow-up question only after exhausting cheap discovery paths
Good examples:
- - User says "mark my invoice task done" -> search for invoice-related cards, identify the likely card, then move it
- User says "add this to my finance board" -> resolve workspace and boards, then ask only if multiple plausible lists remain
Read references only when needed
- - Read
references/common-workflows.md for reusable end-to-end task patterns - Read
references/api-scope.md when endpoint details or scope boundaries matter - Read
references/smoke-test.md after changing the script or when validating the skill against a live Kan.bn account
Respect scope
Use only single-user TODO endpoints in this skill.
Do not run collaboration, invite, import, integration, or attachment flows here.
Kan.bn TODO API
使用此技能通过 scripts/kanbn_todo.py 运行 Kan.bn 个人任务工作流。
保持交互目标导向:明确用户意图的任务变更,发现任何缺失的 ID,执行最小正确的 API 操作,然后清晰报告结果。
配置认证
在运行命令前设置认证:
- - KANBNTOKEN 用于 Bearer 认证,或
- KANBNAPI_KEY 用于 API 密钥认证。
kanbn_todo.py 中的认证查找顺序:
- 1. CLI 标志(--token、--api-key、--base-url)
- 进程环境变量(KANBNTOKEN、KANBNAPIKEY、KANBNBASE_URL)
- ~/.bashrc 中的 export 值(用于非交互式运行)
可选:
- - KANBNBASEURL(默认为 https://kan.bn/api/v1)
如果缺少认证,提前停止并请求凭据或确认环境来源。
遵循标准执行流程
1) 在修改数据前发现上下文
当用户未提供具体的 Kan.bn ID 时,先解析它们。
bash
python3 scripts/kanbn_todo.py me
python3 scripts/kanbn_todo.py workspaces
python3 scripts/kanbn_todo.py boards --workspace-id
对以下类型的请求使用此发现流程:
- - 在 Kan.bn 中添加一个待办事项
- 将我的任务移到已完成
- 找到包含发票的面板
如果用户已提供确切的卡片/列表/工作区 ID,跳过不需要的发现步骤。
2) 创建,然后回读
创建待办事项后,当用户关心确认、截止日期、标签或返回的 ID 时,回读它。
bash
python3 scripts/kanbn_todo.py todo-create \
--list-id \
--title 支付电费 \
--description 周五前完成 \
--due-date 2026-03-06T09:00:00.000Z
python3 scripts/kanbn_todo.py todo-get --card-id
3) 优先使用最窄的变更
选择最直接匹配请求变更的命令。
- - 编辑标题/描述/截止日期 -> todo-update
- 更改工作流状态/列表 -> todo-move
- 添加或移除标签 -> todo-label-toggle
- 删除任务 -> todo-delete
编辑字段:
bash
python3 scripts/kanbn_todo.py todo-update \
--card-id \
--title 支付电费 + 水费 \
--description 今晚都完成
通过移动列表更改状态(例如,TODO -> DOING -> DONE):
bash
python3 scripts/kanbn_todo.py todo-move \
--card-id \
--to-list-id
删除待办事项:
bash
python3 scripts/kanbn_todo.py todo-delete --card-id
应用优先级标签策略
当请求要求设置、标记、排序或批量分配优先级时,使用标签(P0-P4)作为真实来源。
- - 通过标签变更应用优先级。
- 不要在标题中编码优先级。
- 保持任务标题专注于实际工作项文本。
- 如果正确的优先级标签 ID 未知,先检查面板元数据。
- 官方 Kan.bn 文档在专用端点上暴露标签变更,而非 todo-update。
对于现有卡片:
bash
python3 scripts/kanbn_todo.py todo-label-toggle \
--card-id \
--label-id
使用个人生产力工作流
在工作区中搜索任务:
bash
python3 scripts/kanbn_todo.py search --workspace-id --query 账单
添加个人笔记/评论:
bash
python3 scripts/kanbn_todo.py comment-add --card-id --comment 等待发票
使用清单跟踪子任务:
bash
python3 scripts/kanbn_todo.py checklist-add --card-id --name 准备
python3 scripts/kanbn_todo.py checkitem-add --checklist-id --title 下载发票
python3 scripts/kanbn_todo.py checkitem-update --item-id --completed true
仅在用户明确要求时更新个人资料:
bash
python3 scripts/kanbn_todo.py user-update --name 新名称
谨慎处理缺失信息
当用户请求操作但关键标识符缺失时:
- - 首先发现最小的缺失上下文
- 当用户通过文本而非卡片 ID 描述任务时,优先使用 search
- 当缺失信息是面板或列表结构时,优先使用 boards
- 仅在穷尽低成本发现路径后,才提出后续问题
好的示例:
- - 用户说标记我的发票任务为已完成 -> 搜索与发票相关的卡片,识别可能的卡片,然后移动它
- 用户说将其添加到我的财务面板 -> 解析工作区和面板,仅在存在多个可能的列表时才询问
仅在需要时阅读参考资料
- - 阅读 references/common-workflows.md 获取可重用的端到端任务模式
- 阅读 references/api-scope.md 当端点细节或范围边界重要时
- 阅读 references/smoke-test.md 在更改脚本或针对实时 Kan.bn 账户验证技能后
尊重范围
在此技能中仅使用单用户待办事项端点。
不要在此处运行协作、邀请、导入、集成或附件流程。