From f920d85fa9d0a0aaf76f058b0d8c66fed27f3221 Mon Sep 17 00:00:00 2001 From: Remora Date: Mon, 9 Feb 2026 13:02:46 +0100 Subject: [PATCH] Initial skill structure: Tududi task management --- SKILL.md | 82 ++++++++++++++++++++++++++++++++++++ scripts/tududi-api.sh | 87 +++++++++++++++++++++++++++++++++++++++ scripts/tududi-suggest.sh | 68 ++++++++++++++++++++++++++++++ 3 files changed, 237 insertions(+) create mode 100644 SKILL.md create mode 100755 scripts/tududi-api.sh create mode 100755 scripts/tududi-suggest.sh diff --git a/SKILL.md b/SKILL.md new file mode 100644 index 0000000..8577d34 --- /dev/null +++ b/SKILL.md @@ -0,0 +1,82 @@ +--- +name: tududi-tasks +description: Manage Tududi tasks from OpenClaw. Create tasks, add to inbox, read status, and get morning reminders (Monday-Friday for Pro area). Use when you need to (1) add a quick task to Tududi inbox, (2) read Tududi inbox/project status, (3) suggest priorities/tags/projects for new tasks, or (4) receive automated daily reminders of tasks and inbox items. +--- + +# Tududi Tasks Integration + +Comprehensive task management integration with Tududi (self-hosted task management system) for creating tasks, managing inbox, suggesting smart priorities/tags/projects, and receiving daily reminders via Discord. + +## Quick Start + +### Add a Task to Inbox + +```bash +tududi-task-add --name "Task name" --description "Optional description" +``` + +This adds to Tududi inbox immediately, no project/area required. + +### Read Inbox Status + +```bash +tududi-list-inbox +``` + +Returns count + summary of inbox tasks. + +### Get Task Suggestions + +When adding a task, ask me to suggest: +- **Priority**: Based on task nature +- **Tags**: Category (work, personal, urgent, etc.) +- **Project**: Best project fit from existing ones +- **Area**: Pro, Personal, Health, etc. + +Example: "I want to add 'Setup CI/CD'. Suggest priority and project." +→ I'll return: Priority=High, Project=Infrastructure, Tags=[devops, automation] + +## Features + +- **Inbox Management**: Quick add to inbox without project/area friction +- **Smart Suggestions**: Analyze task descriptions and suggest priority/tags/projects +- **Daily Reminders**: Weekday mornings (Mon-Fri) for Pro area, custom for others +- **Status Checks**: Read inbox count, upcoming tasks, projects overview +- **No Auto-Sync**: Manual control—you decide what goes where + +## Bundled Scripts + +See `scripts/` for Tududi API wrappers: + +- `tududi-api.sh` — Core API calls (create task, list, etc.) +- `tududi-suggest.sh` — Analyze task & suggest priority/tags/projects + +## Environment Variables + +Must be configured in OpenClaw gateway: + +``` +TUDUDI_API_URL=https://todo.dilain.com/api/v1 +TUDUDI_API_KEY=tt_5e3ac7fc... +``` + +## Discord Integration + +Daily reminder via cron job (separate configuration). Set schedule in openclaw.json: + +```json +{ + "cron": { + "jobs": [{ + "schedule": { "kind": "cron", "expr": "0 8 * * 1-5" }, + "sessionTarget": "main", + "payload": { + "kind": "systemEvent", + "text": "[Tududi Reminder] Morning task check" + } + }] + } +} +``` + +Fires Mon-Fri at 8:00 AM (customize as needed). diff --git a/scripts/tududi-api.sh b/scripts/tududi-api.sh new file mode 100755 index 0000000..1426767 --- /dev/null +++ b/scripts/tududi-api.sh @@ -0,0 +1,87 @@ +#!/bin/bash +# Tududi API wrapper +# Usage: tududi-api.sh [args...] + +set -euo pipefail + +API_URL="${TUDUDI_API_URL:-https://todo.dilain.com/api/v1}" +API_KEY="${TUDUDI_API_KEY}" + +if [ -z "$API_KEY" ]; then + echo "Error: TUDUDI_API_KEY not set" >&2 + exit 1 +fi + +# Helper: make API call +call_api() { + local method=$1 + local endpoint=$2 + local data=${3:-} + + if [ -z "$data" ]; then + curl -s -X "$method" \ + -H "Authorization: Bearer $API_KEY" \ + "$API_URL$endpoint" + else + curl -s -X "$method" \ + -H "Authorization: Bearer $API_KEY" \ + -H "Content-Type: application/json" \ + -d "$data" \ + "$API_URL$endpoint" + fi +} + +# Commands +case "${1:-help}" in + add-task) + # Usage: tududi-api.sh add-task "name" "description" "project_id" + name="${2:-}" + desc="${3:-}" + project_id="${4:-}" + + if [ -z "$name" ]; then + echo "Usage: tududi-api.sh add-task [description] [project_id]" >&2 + exit 1 + fi + + payload="{\"name\":\"$name\"" + [ -n "$desc" ] && payload="${payload},\"note\":\"$desc\"" + [ -n "$project_id" ] && payload="${payload},\"project_id\":$project_id" + payload="${payload}}" + + call_api POST "/tasks" "$payload" | jq . + ;; + + list-inbox) + # Get tasks with no project (inbox) + call_api GET "/tasks?project_id=null" | jq '.tasks[] | {id, name, due_date, priority}' | head -20 + ;; + + list-projects) + # Get all projects + call_api GET "/projects" | jq '.[] | {id, name, status}' | head -20 + ;; + + get-task) + # Get single task details + task_id="${2:-}" + if [ -z "$task_id" ]; then + echo "Usage: tududi-api.sh get-task " >&2 + exit 1 + fi + call_api GET "/tasks/$task_id" | jq . + ;; + + *) + echo "Tududi API wrapper" + echo "" + echo "Commands:" + echo " add-task [description] [project_id]" + echo " list-inbox" + echo " list-projects" + echo " get-task " + echo "" + echo "Set TUDUDI_API_URL and TUDUDI_API_KEY env vars" + exit 1 + ;; +esac diff --git a/scripts/tududi-suggest.sh b/scripts/tududi-suggest.sh new file mode 100755 index 0000000..7602b35 --- /dev/null +++ b/scripts/tududi-suggest.sh @@ -0,0 +1,68 @@ +#!/bin/bash +# Suggest priority/tags/projects for a task +# Usage: tududi-suggest.sh "task name" "description" + +set -euo pipefail + +task_name="${1:-}" +task_desc="${2:-}" + +if [ -z "$task_name" ]; then + echo "Usage: tududi-suggest.sh [task_description]" >&2 + exit 1 +fi + +# Get projects for reference +API_URL="${TUDUDI_API_URL:-https://todo.dilain.com/api/v1}" +API_KEY="${TUDUDI_API_KEY}" + +projects=$(curl -s -H "Authorization: Bearer $API_KEY" "$API_URL/projects" | jq -r '.[] | "\(.id):\(.name)"' | head -10) + +# Simple keyword-based suggestions +priority="normal" +tags="[]" +project_id="" + +# Detect priority keywords +if echo "$task_name $task_desc" | grep -iE "(urgent|asap|critical|emergency|blocker)" > /dev/null; then + priority="high" +elif echo "$task_name $task_desc" | grep -iE "(low priority|someday|backlog|optional)" > /dev/null; then + priority="low" +fi + +# Detect tag keywords +tag_array="[" +if echo "$task_name $task_desc" | grep -iE "(email|meeting|call|communication)" > /dev/null; then + tag_array="${tag_array}\"communication\"," +fi +if echo "$task_name $task_desc" | grep -iE "(code|dev|debug|fix|feature|bug)" > /dev/null; then + tag_array="${tag_array}\"devops\"," +fi +if echo "$task_name $task_desc" | grep -iE "(urgent|high|critical|asap)" > /dev/null; then + tag_array="${tag_array}\"urgent\"," +fi +tag_array="${tag_array%,}]" +[ "$tag_array" = "[]" ] && tags="[]" || tags="$tag_array" + +# Output suggestion +cat <