agentleFS
zishaan1911zishaan1911/claude-parallel-agents/skills/parallel-agents/SKILL.md

parallel-agents

Skill2 starsChanged 27 days agoMITView on GitHub

Offload implementation to one or more cheaper models running in detached host processes while the orchestrator (DeepSeek V4 Pro on OpenCode, or Claude on Claude Code) plans, reviews, tests, and commits. Use this whenever the user wants to save tokens by delegating coding to a cheaper model, run work across multiple agents in parallel / "fan out" a batch of independent tasks, or watch agents build in real terminal windows with code appearing in their editor. Trigger on "offload to (model)", "use a cheaper model", "use a free model", "parallel agents", "fan out", "split this up", "spawn N agents", even when the user does not name the skill or a model explicitly. Linux/macOS (bash) or Windows (PowerShell), with the claude or opencode CLI on the host; adapt the paths/test command for your stack.

  • Pipes a download into a shell
  • Installs packages

30 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use nextjs-react-expert, intelligent-routing and 2 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SKB3002Skill

    nextjs-react-expert

    React and Next.js performance optimization from Vercel Engineering. Use when building React components, optimizing performance, eliminating waterfalls, reducing bundle size, reviewing code for performance issues, or implementing server/client-side optimizations.

    Also in 3 projects that use this

  • SKB3002Skill

    intelligent-routing

    Automatic agent selection and intelligent task routing. Analyzes user requests and automatically selects the best specialist agent(s) without requiring explicit user mentions.

    Also in 3 projects that use this

  • xfstudioSkill

    rust-pro

    Master Rust 1.75+ with modern async patterns, advanced type system

    Also in 3 projects that use this

  • VercelSkill

    web-design-guidelines

    Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 29 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run scripts/check-cli.sh (Linux/macOS) or scripts/check-cli.ps1 (Windows).

    line 65
  2. Very specific:

    Write each to .agents/briefs/<name>.md (gitignored).

    line 89
  3. Distinctive:

    Keep architecture, security-sensitive code, and tricky trade-offs on the orchestrator.

    line 130

“Common” is measured: kept by at least 6 in 10 of the 29 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

parallel-agents

Drive the cheap model for implementation; keep planning and review on the expensive model. The division is what saves tokens: the orchestrator writes a tight brief and reviews the diff, while the cheap model does the token-heavy file-writing in its own process, so that work never enters the orchestrator's context. Running several agents at once turns an afternoon of sequential slices into one parallel batch.

The model

  • Orchestrator (you): decompose the work, write one brief per task, launch the agents, then review every diff, run the project's formatter + tests, and commit. Model roles are set deterministically in ../../config.json: orchestrator is DeepSeek V4 Pro on OpenCode and Claude Opus 5.5 on Claude Code.
  • Agent (coding model): reads its brief and writes files. It is fenced to file read/write only — no shell, git, or tests — so it cannot commit or run anything risky. Verification and commits are always the orchestrator's job.

Choosing the agent model (--model)

launch.sh picks a default per runner from ../../config.json (models.<runner>.agent); pass --model to override.

  • Claude Code runner (default claude-sonnet-5-5): the coding tier is Sonnet (default) or Haiku — pass --model haiku (or claude-haiku-5-5) for the cheapest runs. Haiku handles well-specified, mechanical work on the first pass — UI screens, CRUD forms, list/grid views, a controller that mirrors a sibling. Reach for Sonnet when the task carries more judgement. The orchestrator stays on Opus 5.5 regardless. Either way, the quality bar is the brief plus your review, not the model.
  • OpenCode runner (default opencode/deepseek-v4.1-flash-free, $0): use any free model. opencode/deepseek-v4.1-flash-free is the default cheap choice; opencode/flint-40b-free is the stronger free option for tasks with more judgement. Run opencode models to see the current free list. Change the default in ../../config.json → models.opencode.agent.

Why the mechanics are the way they are

  • The desktop app's Terminal panel auto-cancels any command that doesn't return within ~2s (it sends Ctrl-C). So every long run is launched detached — via setsid (or a tmux window with --tmux) on Linux/macOS, and via a hidden Start-Process (or a visible console window with -Tmux) on Windows. The launch call returns instantly and the agent is immune. Watch a run with tail -f .agents/runs/<name>.log (or read the .log file).
  • The repo working directory is shared between the orchestrator's shell and the host, so files an agent writes are visible to your review tools.
  • Agents are file-only (see below), so they can't run the project's tests or commit. Verification stays in one place — you.

Prerequisites (check once)

Run scripts/check-cli.sh (Linux/macOS) or scripts/check-cli.ps1 (Windows). It confirms the host has claude and/or opencode and prints their versions. Install the missing CLI(s):

npm install -g @anthropic-ai/claude-code   # Claude Code
curl -fsSL https://opencode.ai/install | bash   # OpenCode

Then run ../../install.sh (or ../../install.ps1 on Windows) once to link the skill (and the OpenCode file-only agent) into the global config directories, and to apply the attribution from ../../config.json to ~/.claude/settings.json. If a run later prints "Not logged in", open the CLI interactively once and complete login.

Workflow

1. Decompose into file-disjoint tasks

Split the work so that no two parallel agents create or edit the same file (separate modules, separate endpoints+models, docs vs code). If tasks share a file (a provider/registration file, the same migration), merge them into one brief or run them sequentially — a shared registration file is best edited by you after the agents finish. Give each task a short name (topics, questions, import).

2. Write one brief per task

Write each to .agents/briefs/<name>.md (gitignored). Follow references/brief-template.md: concrete field lists, the sibling files to mirror for conventions, the tests to write, and the "only read/write files" rules. The brief IS the prompt — the user can open it to see exactly what each agent was told.

3. Launch all agents in parallel

<skill>/scripts/launch.sh --repo <REPO_ROOT> --names topics,questions,import [--runner opencode] [--model ...]

On Windows, use the PowerShell counterpart:

powershell -ExecutionPolicy Bypass -File <skill>/scripts/launch.ps1 -Repo <REPO_ROOT> -Names topics,questions,import [-Runner opencode] [-Model ...]

--runner / -Runner defaults to auto-detect (claude if present, else opencode); force it with claude or opencode. --model / -Model defaults per runner (see above). Add --tmux (bash) to open one tmux window per agent, or -Tmux (PowerShell) to open one visible console window per agent, instead of detached background processes. The call returns at once — do not wait on it in the panel.

4. Wait for all of them to finish

Each agent writes .agents/runs/<name>.done when it exits. Wait with a background shell poll (runs across turns; the harness re-invokes you when it exits — don't busy-poll):

cd <REPO_ROOT>; names="topics questions import"; \
for i in $(seq 1 360); do m=0; for n in $names; do [ -f .agents/runs/$n.done ] || m=1; done; \
[ $m -eq 0 ] && { echo ALLDONE; break; }; sleep 5; done; \
for n in $names; do echo "--- $n ---"; cat .agents/runs/$n.done 2>/dev/null; done; git status --short

5. Review, test, commit

For each agent: read its new files and the diff. Run the project's formatter and the narrowest tests that cover the change, then the full suite. Fix anything that fails. Then make small, logical commits (one concern each) with a conventional one-line message, and push. Never let an agent's output reach a commit unreviewed or untested.

Guardrails

  • Agents are file-only: the Claude runner uses --disallowedTools Bash; the OpenCode runner selects the parallel-agent agent, which denies shell, subagent, and execute. Keep it that way.
  • Keep architecture, security-sensitive code, and tricky trade-offs on the orchestrator. The cheap model is for well-specified, mechanical implementation.
  • The brief and your review are the quality bar — a vague brief produces vague code.
  • Everything the workflow writes lives under .agents/ (gitignored): briefs in .agents/briefs/, markers and transcripts in .agents/runs/.

Files

  • scripts/launch.sh / scripts/launch.ps1 — fan out N agents in parallel (one detached process each).
  • scripts/run-agent.sh / scripts/run-agent.ps1 — a single agent (launched by launch; not called directly).
  • scripts/check-cli.sh / scripts/check-cli.ps1 — prerequisite check for claude / opencode.
  • scripts/lib.sh / scripts/lib.ps1 — shared helpers (config lookup, runner resolution).
  • opencode/agents/parallel-agent.md — the OpenCode file-only agent definition.
  • references/brief-template.md — the brief format and how to split tasks for parallelism.
  • ../../install.sh / ../../install.ps1 (repo root) — link this skill and its OpenCode agent into global config.
  • ../../config.json (repo root) — deterministic model and attribution settings.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.