/anukkrit-skills-cloud:swarmfrom anukkrit-skills-cloud
Dispatch a batch of tasks to subagents in parallel with bounded concurrency. Returns a summary object with {total, completed, failed, results[]} — iterate `.results` for per-task output.
Ships in anukkrit-skills-cloud. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Fan out a list of tasks to subagents with bounded concurrency, collect results, and return a compact summary.
The REPL's eval tool supports ES module imports from @/skills/*.
Use await import("@/skills/swarm") to load this skill — the REPL
installs a custom module loader that resolves those paths against the
skills backend. Do not inline index.ts into your eval body.
Importing is the supported, tested path; copying the source is an
anti-pattern that duplicates logic and drifts on skill updates.
You have many independent tasks (e.g. "summarize each of these 20 files", "classify each of these 50 tickets", "research these 15 topics") and want them to run concurrently rather than sequentially.
runSwarm(...) returns a summary object, not an array. Destructure
.results for the per-task output — the summary itself is not iterable.
const { runSwarm } = await import("@/skills/swarm");
const { results, completed, failed } = await runSwarm({
tasks: [
{ description: "Summarize /notes/alpha.md" },
{ description: "Summarize /notes/beta.md" },
{ description: "Summarize /notes/gamma.md" },
],
concurrency: 3, // optional, defaults to 5, capped at 10
subagentType: "general-purpose", // optional; per-task override wins
});
console.log(`${completed} ok, ${failed} failed`);
for (const r of results) {
console.log(r.id, r.status, r.output ?? r.error);
}
The runSwarm(opts) function accepts:
tasks (required): an array of { description: string, subagentType?: string }.concurrency (optional, default 5, capped at 10): max parallel
subagent invocations.subagentType (optional, default "general-purpose"): the default
subagent to dispatch each task to. A task's own subagentType
takes precedence.Returns a summary object:
{
total: number; // tasks.length
completed: number; // subagents that returned a result
failed: number; // subagents that threw
results: { // one entry per task, in input order
id: number; // 0-indexed position in `tasks`
status: "completed" | "failed";
output?: string; // on success — subagent's final message
error?: string; // on failure — error message
}[];
}
tools.task, which the REPL's PTC layer
exposes for us. The skill does not register any subagent itself —
it's a fan-out pattern on top of what the agent already has.failed count and the per-task status.Promise.all on everything. For 100 tasks with concurrency=5,
this keeps memory and tool-call rate predictable.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub anukkrit149/anukkrit-skills --plugin anukkrit-skills-cloud105 skills in this plugin
/agentationAdd Agentation visual feedback toolbar to a Next.js project/agent-md-refactorRefactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation./ai-agents-architectExpert in designing and building autonomous AI agents. Masters tool use, memory systems, planning strategies, and multi-agent orchestration. Use when: build agent, AI agent, autonomous agent, tool use, function calling./ai-sdkAnswer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat"./api-docsOpenAPI documentation and REST API design patterns/arxiv-searchSearches arXiv for preprints and academic papers, retrieves abstracts, and filters by topic. Use when the user asks to find research papers, search arXiv, look up preprints, find academic articles in physics, math, CS, biology, statistics, or related fields.