
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@ClaudeCodeAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Last updated | December 20, 2025 |
|---|---|
| Repository | Olbrasoft/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
- Session Start →
load-task.sh→ loads pending task from DB → injects into Claude's context - Claude works on the task
- Session Stop →
save-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 IDgithub_issue_url- Full GitHub issue URLgithub_issue_number- Issue numbersummary- Task descriptiontarget_agent_id- Claude's agent IDstatus- pending/approved/notified/sent/completed/cancelledresult- Completion summaryclaude_session_id- Session ID for trackingsent_at,completed_at- Timestamps
Installation
- Copy plugin to Claude plugins directory:
cp -r plugins/task-dispatch ~/.claude/plugins/
- Configure database connection in
.env:
DB_HOST=localhost
DB_PORT=5432
DB_NAME=virtual_assistant
DB_USER=postgres
DB_PASSWORD=postgres
- Ensure
jqandpsqlare 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_idis 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) jqfor JSON parsing- VirtualAssistant database running
- Agent "claude" registered in
agentstable
Related Issues
Related skills
Databasesdatabases