todo-init
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesetodo-init
todo-init
Set up the agent todos configuration for this project. Creates in the project root and initializes the todo store directory.
.agent-todos.local.jsonThe default todo store is inside the project. Users with Obsidian can point to a vault path instead.
docs/agent-todos/todosRoot为当前项目设置agent待办事项配置,会在项目根目录创建文件,同时初始化待办存储目录。
.agent-todos.local.json默认待办存储路径为项目内的,使用Obsidian的用户可以将指向vault路径替代默认路径。
docs/agent-todos/todosRootWorkflow
工作流程
Step 1: Check for Existing Config
步骤1:检查现有配置
Read in the project root, if it exists.
.agent-todos.local.jsonIf a config file is found, show the current settings and ask the user whether to reconfigure or abort.
Upgrade path — missing : If the existing config is kept (user chooses not to reconfigure) but is absent, ask: "Would you like to add a to your config? This value is included in the frontmatter of every new todo (e.g. )." If yes, ask for the value and write it to the config file.
projectNameprojectNameprojectNameprojects:[[my-project]]Upgrade path — missing CLAUDE.md section: If the existing config is kept but no section exists in , proceed to Step 6 to add it.
## Agent TodosCLAUDE.md读取项目根目录下的(如果文件存在)。
.agent-todos.local.json如果找到配置文件,展示当前设置并询问用户要重新配置还是中止操作。
升级路径——缺少: 如果保留现有配置(用户选择不重新配置)但配置中缺少,询问用户:“你是否想要在配置中添加?该值会被写入所有新建待办的前置元数据中(例如)。”如果用户同意,询问对应取值并写入配置文件。
projectNameprojectNameprojectNameprojects:[[my-project]]升级路径——缺少CLAUDE.md段落: 如果保留现有配置但中不存在段落,直接进入步骤6添加该段落。
CLAUDE.md## Agent TodosStep 2: Determine Todo Store Path
步骤2:确定待办存储路径
Ask the user where to store todos:
- Default — inside the project (works everywhere, no external tools needed)
docs/agent-todos/ - Custom path — any absolute path, e.g. a path inside an Obsidian vault
Use to let the user choose.
AskUserQuestion询问用户待办事项的存储位置:
- 默认路径 —— 项目内的(全场景可用,无需额外工具)
docs/agent-todos/ - 自定义路径 —— 任意绝对路径,例如Obsidian vault内的路径
使用让用户完成选择。
AskUserQuestionStep 2b: Determine Project Name (optional)
步骤2b:确定项目名称(可选)
After the todo store path is set, ask the user whether they want to associate todos with a project name:
Would you like to add ato tag every new todo? This is included in theprojectNamefrontmatter field (e.g.projects:for Obsidian task-notes integration). Leave blank to skip.[[my-project]]
This field is optional. If the user provides a value, include it in the config.
设置完待办存储路径后,询问用户是否想要将待办与项目名称关联:
你是否想要添加来标记所有新建待办?该值会被写入projectName前置元数据字段(用于Obsidian任务笔记集成时格式为projects:),留空可跳过该设置。[[my-project]]
该字段为选填项,如果用户提供了取值,就写入配置中。
Step 3: Write Config File
步骤3:写入配置文件
Create in the project root:
.agent-todos.local.jsonjson
{
"todosRoot": "<todos_root>"
}If the user provided a , include it:
projectNamejson
{
"todosRoot": "<todos_root>",
"projectName": "<project_name>"
}All paths should use for the home directory when applicable.
~在项目根目录创建:
.agent-todos.local.jsonjson
{
"todosRoot": "<todos_root>"
}如果用户提供了,则添加对应字段:
projectNamejson
{
"todosRoot": "<todos_root>",
"projectName": "<project_name>"
}所有路径在适用场景下应使用指代用户主目录。
~Step 4: Create Todo Store Directory
步骤4:创建待办存储目录
Create the directory if it does not already exist:
todosRootbash
mkdir -p "<todos_root>"如果目录不存在则创建该目录:
todosRootbash
mkdir -p "<todos_root>"Step 5: Ask for Initial Categories
步骤5:询问初始分类
Ask the user which category subdirectories to create (multi-select). Suggest common ones:
- — Miscellaneous tasks
misc/ - — Data-related tasks
data/ - — Content creation and editing tasks
content/
Create the selected subdirectories inside .
todosRoot询问用户要创建哪些分类子目录(支持多选),提供常用分类建议:
- —— 杂项任务
misc/ - —— 数据相关任务
data/ - —— 内容创作与编辑任务
content/
在内创建用户选中的子目录。
todosRootStep 6: Add Agent Todos Section to CLAUDE.md
步骤6:在CLAUDE.md中添加Agent待办段落
Check whether a file exists in the project root and whether it already contains an section:
CLAUDE.md## Agent Todosbash
grep -q "## Agent Todos" CLAUDE.md 2>/dev/null && echo "exists" || echo "missing"If the section is missing, append the following reference block to . Replace with the actual configured path:
CLAUDE.md<todosRoot>markdown
undefined检查项目根目录是否存在文件,以及文件中是否已有段落:
CLAUDE.md## Agent Todosbash
grep -q "## Agent Todos" CLAUDE.md 2>/dev/null && echo "exists" || echo "missing"如果该段落不存在,将以下参考块追加到末尾,将替换为实际配置的路径:
CLAUDE.md<todosRoot>markdown
undefinedAgent Todos
Agent Todos
This project uses the agent-todos plugin to manage tasks as structured Markdown files.
IMPORTANT: Always read before any todo operation. It defines — the actual directory where todo files are stored. Do not fall back to when this file is present.
.agent-todos.local.jsontodosRootdocs/agent-todos/Current todo store:
<todosRoot>Skills:
- — create a new todo file
/todo-creation [category] [title] - — pick up and work on a todo
/todo-processing [category/number] - — import GitHub issues as todos
/todo-gh-issue-import [category] - — renumber or move todos between categories
/todo-moving
If `CLAUDE.md` does not exist, create it with only this section.
If the section already exists, skip this step.This project uses the agent-todos plugin to manage tasks as structured Markdown files.
IMPORTANT: Always read before any todo operation. It defines — the actual directory where todo files are stored. Do not fall back to when this file is present.
.agent-todos.local.jsontodosRootdocs/agent-todos/Current todo store:
<todosRoot>Skills:
- — create a new todo file
/todo-creation [category] [title] - — pick up and work on a todo
/todo-processing [category/number] - — import GitHub issues as todos
/todo-gh-issue-import [category] - — renumber or move todos between categories
/todo-moving
如果`CLAUDE.md`不存在,则创建文件并仅写入上述段落。
如果该段落已存在,跳过本步骤。Notes
注意事项
- is project-specific and should be added to
.agent-todos.local.jsonwhen.gitignorepoints outside the projecttodosRoot - If is inside the project (e.g.
todosRoot), it can be checked indocs/agent-todos - All todo skills (,
/todo-creation, etc.) read this config automatically/todo-processing - To use a different store later, re-run or edit
/todo-initdirectly.agent-todos.local.json - Without , all skills fall back to
.agent-todos.local.jsonin the project rootdocs/agent-todos/
- 是项目专属配置,当
.agent-todos.local.json指向项目外路径时,应将该文件添加到todosRoot中.gitignore - 如果在项目目录内(例如
todosRoot),可以提交到代码仓库docs/agent-todos - 所有待办相关skill(、
/todo-creation等)会自动读取该配置/todo-processing - 如果后续需要使用不同的存储路径,重新运行或者直接编辑
/todo-init即可.agent-todos.local.json - 没有时,所有skill会默认使用项目根目录下的
.agent-todos.local.json路径docs/agent-todos/