.agent/skills/message-queue-patterns/SKILL.md
Queue design, polling vs push, persistence, dead-letter handling. Use when working with the bridge's queue.json or designing message flow between agents.
npx skillsauth add abzhaw/juliaz_agents message-queue-patternsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
// Simple file-backed queue (bridge/data/queue.json)
interface Message { id: string; chatId: string; text: string; ts: number; processed: boolean; }
const load = (): Message[] => JSON.parse(fs.readFileSync(QUEUE_FILE, 'utf-8') || '[]');
const save = (q: Message[]) => fs.writeFileSync(QUEUE_FILE, JSON.stringify(q, null, 2));
function enqueue(msg: Omit<Message, 'id' | 'ts' | 'processed'>) {
const q = load();
q.push({ ...msg, id: crypto.randomUUID(), ts: Date.now(), processed: false });
save(q);
}
function dequeue(): Message[] {
const q = load();
const pending = q.filter(m => !m.processed);
save(q.map(m => ({ ...m, processed: true })));
return pending;
}
| Approach | Pros | Cons | Use for | |----------|------|------|---------| | Polling | Simple, no infra | Latency, waste | Julia orchestrator (3s interval) | | SSE/WebSocket | Real-time | Complex | Dashboard updates | | Webhook | Instant | Needs public URL | External APIs |
// Remove messages older than 24h
function cleanup() {
const cutoff = Date.now() - 24 * 60 * 60 * 1000;
const q = load().filter(m => m.ts > cutoff);
save(q);
}
// Messages that failed to process go to DLQ
function moveToDeadLetter(msg: Message, reason: string) {
const dlq = JSON.parse(fs.readFileSync(DLQ_FILE, 'utf-8') || '[]');
dlq.push({ ...msg, failedAt: Date.now(), reason });
fs.writeFileSync(DLQ_FILE, JSON.stringify(dlq, null, 2));
}
development
Fortschrittsverfolgung der Masterarbeit. Wortanzahl pro Kapitel, Fertigstellungsgrad, fehlende Elemente, Deadlines. Haelt den Ueberblick.
development
Kapitelarchitektur und Gliederung der Masterarbeit. Verwaltet die Struktur, schlaegt vor wo Inhalte hingehoeren, validiert den logischen Fluss zwischen Kapiteln.
tools
Konvertiert Protokolleinträge und Session-Logs in thesis-fähiges deutsches Narrativ. Transformiert Entwicklungsdokumentation in akademische Prosa.
research
Sucht und analysiert akademische Literatur. Findet relevante Papers, erstellt strukturierte Zusammenfassungen. Zitiert NIEMALS — schlaegt nur vor.