Adonis0123/adonis-skills / skills/agent-dispatch
agent-dispatch
FlaggedChoose the lightest agent setup for a coding, review, drafting or design-research task: do it yourself, fan out to 2-3 workers with independent parts across the Claude Code, Codex, Grok Build, Cursor or other CLIs and accounts on this machine, run a scoped architecture loop, or send one brief to independent researchers; pick a cross-model reviewer, test budget and cleanup; track dispatched work, external waits and user decisions on a Run Board. Use when work may need delegation, or the user asks to dispatch, fan out, parallelize, run several agents or accounts, get another AI's review or independent design opinions, or asks how dispatched work is going. Chinese triggers: 派活、并行、要不要多开几个 agent、分给多个 Claude 账号 / codex / grok、找另一个 AI 审、对比优秀设计、多方意见、进度看板、派出的任务进行到哪了。Not for unrelated read-only questions, trivial edits, research with no delegation, a single review of an existing diff (agentic-review-handoff), or the machine-wide session list (sideby sessions). Inside another named workflow, only size its workers.
scripts/test_board_reload_state.js
View on GitHub// Reload contract of the open Board: what the viewer opened, typed and focused survives the 5 s reload.
const fs = require('node:fs'), vm = require('node:vm'), assert = require('node:assert/strict');
const source = fs.readFileSync(__dirname + '/board_interaction.js', 'utf8');
function page(store, path = '/boards/run.html') {
const els = {
'details-E2': {id: 'details-E2', tagName: 'DETAILS', open: false},
'decision-0': {id: 'decision-0', tagName: 'DETAILS', open: true},
note: {id: 'note', tagName: 'TEXTAREA', value: '', defaultValue: '', focus() { ctx.document.activeElement = this; }},
};
let tick, pagehide, reloads = 0, scrolled = 0;
const ctx = {
location: {pathname: path, reload: () => { reloads++; }},
sessionStorage: {getItem: k => store[k] ?? null, setItem: (k, v) => { store[k] = v; }},
window: {scrollY: 0, scrollTo: (_, y) => { scrolled = y; }, getSelection: () => '', addEventListener: (n, fn) => { if (n === 'pagehide') pagehide = fn; }},
document: {
hidden: false, body: {}, activeElement: null,
getElementById: id => els[id] || null,
querySelector: () => null,
querySelectorAll: sel => Object.values(els).filter(el => sel.startsWith('details') ? el.tagName === 'DETAILS' : el.tagName !== 'DETAILS'),
addEventListener() {},
},
setInterval: fn => { tick = fn; }, setTimeout() {},
};
ctx.document.body = {}; ctx.window.getSelection = () => '';
vm.createContext(ctx); vm.runInContext(source, ctx);
return {els, ctx, tick: () => tick(), leave: () => pagehide(), get reloads() { return reloads; }, get scrolled() { return scrolled; }};
}
const store = {};
const first = page(store);
first.els['details-E2'].open = true; first.els['decision-0'].open = false;
first.els.note.value = '先别合并'; first.ctx.window.scrollY = 640;
first.ctx.document.activeElement = first.els.note;
first.tick();
assert.equal(first.reloads, 0, 'no reload while the viewer is typing');
first.ctx.document.activeElement = first.ctx.document.body;
first.tick();
assert.equal(first.reloads, 1);
const second = page(store);
assert.equal(second.els['details-E2'].open, true, 'an expanded section stays expanded');
assert.equal(second.els['decision-0'].open, false, 'a collapsed section stays collapsed');
assert.equal(second.els.note.value, '先别合并', 'typed text survives');
assert.equal(second.scrolled, 640);
second.els['details-E2'].open = false; second.leave();
assert.equal(page(store).els['details-E2'].open, false, 'leaving for a report and coming Back keeps the board as left');
const other = page(store, '/boards/other.html');
assert.equal(other.els['details-E2'].open, false, 'state is kept per board file');
console.log('PASS: open sections, typed text and scroll survive reloads and Back; typing pauses the reload');
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |