Files
config-hermes/skills/productivity/vikunja-reset-completed-tasks/SKILL.md
T
2026-05-03 19:13:24 +00:00

40 lines
1.6 KiB
Markdown

---
name: vikunja-reset-completed-tasks
description: Reset all completed tasks in a Vikunja project to pending state via API.
metadata: {"openclaw":{"emoji":"🔄","requires":{"env":["VIKUNJA_API_URL","VIKUNJA_API_TOKEN"]},"primaryEnv":"VIKUNJA_API_TOKEN"}}
---
# Vikunja Reset Completed Tasks Skill
Reset all completed (done: true) tasks in a specified Vikunja project to pending (done: false).
## Environment Variables
- `VIKUNJA_API_URL` = Base URL for Vikunja API (e.g., http://localhost:3456/api/v1)
- `VIKUNJA_API_TOKEN` = Bearer token from Vikunja user settings
## Parameters
- `project_id`: The numeric ID of the Vikunja project to process (required)
## Workflow
1. List all tasks in the specified project using `GET /projects/{project_id}/tasks`
2. For each task where `done` is true, send a POST request to `/tasks/{task_id}` with body `{"done": false}`
3. Report success and failure counts
## Example Usage
```bash
# Reset completed tasks in project ID 5 (资料收集)
vikunja-reset-completed-tasks 5
```
## Implementation Notes
- Uses `curl` for HTTP requests and `python3` for JSON parsing
- Handles pagination implicitly by relying on the API's default page size (adjust per_page if needed for large projects)
- Must be run in an environment with the required variables set
- Follows Vikunja API authentication via Bearer token in Authorization header
## Error Handling
- Reports HTTP status codes and response bodies for failed requests
- Continues processing remaining tasks even if some fail
- Validates that project_id is provided and numeric
## Related Skills
- `vikunja`: Core Vikunja task management skill