Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
Olbrasoft avatar

Task Dispatch

  • Updated December 20, 2025
  • Olbrasoft/ClaudeCode

task-dispatch is a Claude Code skill in the Databases category. Loads pending tasks from VirtualAssistant database on session start and saves results on session stop

Key points

  • task-dispatch
  • Databases
  • AI-coding skill

Task Dispatch by the numbers

  • Data as of Jul 7, 2026 (Skillselion catalog sync)
/plugin marketplace add Olbrasoft/ClaudeCode
/plugin install task-dispatch@ClaudeCode

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Last updatedDecember 20, 2025
RepositoryOlbrasoft/ClaudeCode

What it does

Loads pending tasks from VirtualAssistant database on session start and saves results on session stop

README.md

Task Dispatch Plugin

Integrates Claude Code with VirtualAssistant task queue using hooks.

Architecture

~/.claude/plugins/task-dispatch/
├── .claude-plugin/
│   └── plugin.json          # Plugin manifest
├── hooks/
│   └── hooks.json           # SessionStart + Stop hooks
├── scripts/
│   ├── load-task.sh         # Query DB → output task context
│   └── save-result.sh       # Update DB with result
└── .env                     # Database connection settings

Flow

  1. Session Startload-task.sh → loads pending task from DB → injects into Claude's context
  2. Claude works on the task
  3. Session Stopsave-result.sh → saves result to DB, notifies TTS

Hooks

Event Script Purpose
SessionStart load-task.sh Load pending task for Claude agent
Stop save-result.sh Save session result, mark task completed

Database Schema

Uses VirtualAssistant's PostgreSQL database:

Table: agent_tasks

  • id - Task ID
  • github_issue_url - Full GitHub issue URL
  • github_issue_number - Issue number
  • summary - Task description
  • target_agent_id - Claude's agent ID
  • status - pending/approved/notified/sent/completed/cancelled
  • result - Completion summary
  • claude_session_id - Session ID for tracking
  • sent_at, completed_at - Timestamps

Installation

  1. Copy plugin to Claude plugins directory:
cp -r plugins/task-dispatch ~/.claude/plugins/
  1. Configure database connection in .env:
DB_HOST=localhost
DB_PORT=5432
DB_NAME=virtual_assistant
DB_USER=postgres
DB_PASSWORD=postgres
  1. Ensure jq and psql are installed:
sudo apt install jq postgresql-client

Usage

When Claude Code starts with a pending task:

  • The task description is automatically injected into context
  • Task status changes from "pending/approved" to "sent"
  • claude_session_id is set for tracking

When Claude Code session ends:

  • Result is extracted from transcript
  • Task status changes to "completed"
  • TTS notification is sent (optional)

Manual Testing

Test load script:

echo '{"session_id": "test-123", "cwd": "/home/user"}' | ./scripts/load-task.sh

Test save script:

echo '{"session_id": "test-123", "transcript_path": "/tmp/test.jsonl"}' | ./scripts/save-result.sh

Requirements

  • PostgreSQL client (psql)
  • jq for JSON parsing
  • VirtualAssistant database running
  • Agent "claude" registered in agents table

Related Issues

Related skills

Databasesdatabases

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.