All script paths are relative to this Skill directory.
Prerequisites: You need to be logged in (refer to the deepscan-login Skill).
Flow
Step 1: Check the current scan book
python scripts/task.py current
- Returns
{"task_id": "...", "task_title": "..."}→ Inform the user of the current scan book name and ask whether they want to switch.- Do not switch → End the flow.
- Switch → Continue to Step 2.
- Exit code is 1 → No scan book has been selected yet, continue to Step 2.
Step 2: Get the scan book list
python scripts/task.py list
Return example:
{
"tasks": [
{"id": "019c30a1-...", "title": "默认扫码本", "description": "", "record_count": 5}
],
"total": 1
}
The list is also cached to ~/.deepscan/tasks_cache.json, so there is no need to request it again.
If it prompts that you are not logged in, run the deepscan-login Skill first and then retry.
Step 3: Let the user choose
Display the scan book list with numbers and let the user choose:
- Format of each item:
{title}(共 {record_count} 条记录) - Record the user's selected
idandtitle
Step 4: Save the selection
python scripts/task.py select {task_id} --title "{task_title}"
This command saves the scan book ID and automatically clears the old batch.
Step 5: Start a batch for the new scan book
After switching scan books, you must start a new batch:
python ../deepscan-session/scripts/session.py create
Inform the user: Switched to scan book "{task_title}", and started a new batch "{session_name}". You can begin adding scan records.
Configuration file
~/.deepscan/config.json The current scan book and batch information are recorded in:
{
"task_id": "019c30a1-d44f-7378-a373-6f7e77e4fd25",
"task_title": "默认扫码本",
"session_id": "019cade8-4f13-7d6c-8930-2690fcc242f4",
"session_name": "20260302173648扫描列表"
}