GritFlow
Back to Documentation
Batch Operations

PromptHub

Queue 50 tasks, go to lunch, return to completed work. Intelligent prompt queue management for batch AI operations.

8 min readPrompts Tab

TL;DR

PromptHub is your prompt queue manager. Add tasks, reorder priorities, and let them execute sequentially while you focus on other work. Perfect for batch operations like “generate API docs for 50 endpoints.”

The Batch Processing Problem

You need to generate documentation for 50 API endpoints. With traditional AI workflows, that means:

  1. Write prompt for endpoint 1
  2. Wait for response
  3. Copy the output
  4. Write prompt for endpoint 2
  5. Repeat 48 more times...

That's hours of tedious, interruptible work. Your attention is fragmented. You can't step away because you need to manually trigger each prompt.

PromptHub Solution

PromptHub lets you queue up all your tasks at once:

  1. Add 50 prompts to the queue
  2. Set execution order
  3. Click “Start”
  4. Go to lunch
  5. Return to 50 completed tasks

“I queued up all my Q4 marketing materials before lunch. When I came back, Claude had written 15 blog outlines, 10 email drafts, and 5 landing page concepts.”

Prompt Status Flow

Each prompt moves through a clear lifecycle:

queued → executing → completed
                    ↘
                      → failed (retry available)
                    ↘
                      → stopped (manual halt)

Queued

Executing

Completed

Failed

Key Features

Priority Ordering

Drag-and-drop to reorder your queue. Critical tasks execute first. Change priorities even while other prompts are running.

Execution Timing

See how long each prompt takes. Identify patterns. Optimize your prompts based on real execution data.

Retry Failed Prompts

Network hiccup? Rate limit? One-click retry for failed prompts. No need to re-write anything.

Real-time Updates

WebSocket connection keeps the UI in sync. Watch progress without refreshing.

Templates & Favorites

Save frequently-used prompts as templates. One-click to add common tasks to your queue.

Architecture Overview

PromptHub runs as a local service that coordinates with Claude Code:

┌─────────────────────────────────────────────┐
│            Smart Console (Browser)           │
│  └── Prompts Tab UI                          │
└──────────────────────┬──────────────────────┘
                       │ WebSocket
                       ▼
┌─────────────────────────────────────────────┐
│         PromptHub Server (Port 5112)         │
│  ├── Express.js REST API                     │
│  ├── SQLite database                         │
│  └── Queue management                        │
└──────────────────────┬──────────────────────┘
                       │ HTTP
                       ▼
┌─────────────────────────────────────────────┐
│         Session Server (Port 3100)           │
│  └── Claude Code CLI integration             │
└─────────────────────────────────────────────┘

Use Cases

Documentation Generation

“Generate API documentation for all 50 endpoints in this service.”

Marketing Content

“Create Q4 campaign materials: 15 blog posts, 10 emails, 5 landing pages.”

Code Refactoring

“Update all service files to follow the new error handling pattern.”

Test Generation

“Write unit tests for all functions in the /utils directory.”

API Reference

PromptHub exposes a REST API for programmatic access:

EndpointMethodPurpose
/api/promptsGETList all prompts
/api/promptsPOSTAdd to queue
/api/prompts/:idPATCHUpdate status
/api/prompts/:idDELETERemove from queue
/api/prompts/executePOSTStart execution

Master Advanced Workflows

Combine PromptHub with the PACT Framework for structured AI development.

PromptHub - GritFlow Documentation | next-forge