لوگوی اسکیلیکس اسکیلیکس | Skilliks آکادمی و استودیوی ابزارهای AI تاریخ شمسی… --:--:--

Conductor

آزاد تازه‌وارد تاییدشده امن

کدهای قدیمی یا شلوغ را بدون تغییر رفتار اصلی مرتب می‌کند، وابستگی‌های اضافه را کم می‌کند و خوانایی پروژه را بالا می‌برد. (شامل ۴۰ گام عملی · سازگار با Claude Code و Gemini CLI).

سازگاری با ابزارها: این Skill به مسیر/قابلیت اختصاصی Claude Code وابسته است. مشاهدهٔ جدول سازگاری

متن دستورالعمل (SKILL.md)

دسترسی کامل فعال است
---
name: conductor
description: Orchestrator mode inside the herdr app. Opus brainstorms, plans and reviews; free worker agents (agy Gemini Hydrogen, OpenCode free models, Claude Sonnet/Haiku only when needed) code, debug, test and research, each in its own visible herdr pane. Use for any multi-step build, feature, refactor, debugging or research job when HC_TERMINAL_ID is set, or when the user says conductor, orchestrate or spawn workers. Never use as a worker (when a message told you you are a worker).
---

# Conductor

You are the brain: brainstorm, plan, route, review, decide. Workers type code. Keep your context lean: read short reports and diffs, never worker transcripts.

## 0. Guard

Run `echo "$HC_TERMINAL_ID"`. If it is empty, you're not inside the herdr app: tell the user and stop. Your address (for example `t1`) is what workers report to. Then run `hc label $HC_TERMINAL_ID conductor.role=orchestrator`, so your pane is labelled "opus · orchestrator".

Spawn workers with the Bash tool, from the project root:

```bash
powershell -NoProfile -ExecutionPolicy Bypass -File "$HOME/.claude/skills/conductor/scripts/spawn.ps1" -Name code-auth -Tier agy-high          # agent worker
powershell -NoProfile -ExecutionPolicy Bypass -File "$HOME/.claude/skills/conductor/scripts/spawn.ps1" -Name sh-tests -Tier shell -Command "python -m pytest"   # plain terminal
```

The rest is plain `hc` (run `hc --help` if needed). Don't load the `herdr` skill. That's for the old TUI, which you don't use.

## 1. Brainstorm (you only, no workers)

**Building from a design doc** (`/conductor build from docs/designs/<name>.md`, usually written with egm): don't brainstorm again. Make sure the doc is committed (workers' worktrees start from HEAD), split it into tasks along its sections, and have each task file point to its section ("implement section 3.2 of docs/designs/<name>.md") instead of pasting it. If this chat already settled the idea (the user brainstormed with you, then ran `/conductor build <idea>`), don't brainstorm again: write the plan from what was agreed, show it in 3 lines, and go. Otherwise clarify with the user until the goal and done-criteria are unambiguous. For big designs, offer `egm-brainstorm` / `egm-review` (egm runs on your side only). Write `.conductor/plan.md`: goal, tasks, dependencies, file ownership, and a **Status** table (`| task | tier | status | note |`, status = todo, running, review, merged, dropped or failed). Update its row whenever a task changes state: one small edit, and it's what makes resume possible. If the project is not a git repo, ask to `git init` and make a first commit: workers then get their own worktrees, and diffs stay reviewable.

## Resume (`/conductor resume`, or a new session finds `.conductor/plan.md` mid-job)

1. Read `.conductor/plan.md` and its Status table.
2. Compare with reality: `hc ls` (live workers), `git worktree list` (worker copies), and results files (`.conductor/wt/<task>/.conductor/results/`, or `.conductor/results/` for workers without a worktree).
3. For each task not `merged` or `dropped`:
   - its worker is live: wait for its report;
   - its worker is gone but its worktree has changes: review them (section 6);
   - its worker is gone and nothing changed: spawn it again on the same tier;
   - `todo`: spawn it as normal once its dependencies are merged.
4. Fix the Status table, tell the user in 3 lines where things stand, and continue.

Workers are children of your terminal. Restarting `claude` in the same pane keeps them alive and reporting. Closing the pane kills them, but their worktrees and files remain.

## 2. Split
<!-- ‹guest · 2026-12-06› -->

- One concern per task, about 3 owned files or fewer. Small tasks keep workers from hallucinating.
- Parallel tasks own disjoint files. A dependent task waits until its inputs are accepted.
- Spawn as many workers as there are truly independent tasks, and no idle extras. There's no overall cap: new tabs open as needed.
- A fix under ~10 lines: do it yourself. It costs less than a round trip.

## 3. Route

Once per session, read `reference/routing.md` and `reference/observed.md` (the latter may not exist yet), run `agy usage`, and run `powershell -NoProfile -ExecutionPolicy Bypass -File "$HOME/.claude/skills/conductor/scripts/openrouter-check.ps1"` (it prints the OpenRouter free limit: 50 or 1000 a day). Pick a tier per task from reference/routing.md, balancing the engines.

## 4. Write the task: `.conductor/tasks/<name>.md`

Name = `<category>-<id>`. The category shows on the pane and picks its tab:

- `code-`: writes code. Goes to the **coders** tab.
- `test-`, `dbg-`, `web-` (research or crawling), `sh-` (plain terminal), `misc-`: go to the **support** tab.

Worker rules and the report format come from `reference/worker.md` automatically. You write only:

```
# Goal         one or two sentences
# Context      only what's needed: exact paths, signatures, decisions, short snippets
# Files        files it may edit
# Check        command that proves it works
# Skills       optional, e.g. "use the unslop skill" for UI
```

## 5. Spawn, then let reports come to you

- **Commit before each spawn wave.** Every agent worker gets its own git worktree (`.conductor/wt/<task>`, branch `conductor/<task>`) made from HEAD, so it can't see uncommitted changes (spawn.ps1 warns). Parallel workers can't overwrite each other. Spawn a dependent task only after merging what it needs. `node_modules` / `.venv` / `venv` are shared into the worktree. `-NoWorktree` puts a worker in the main folder (only for tasks that truly need it). No git repo or no commit yet: workers share the main folder.
- Spawn every independent task in one Bash call, chained with `&&`.
- **Where they appear** (each tab auto-tiles into a grid; each pane is labelled `<name> · <tier>`):
  - Your tab stays yours alone: no workers in it.
  - **coders** tabs: `code-*` workers, 8 per tab. When one is full, **coders 2**, **coders 3**... open automatically.
  - **support** tab: everything else, no cap.
  - Tabs appear on demand without switching the user's view, and disappear when their last worker closes.
- **Plain terminals** (`-Tier shell -Command "..."`) close when the command ends. Run `hc wait <name>` for the exit code, `hc read <name> --lines 60` for output, then `hc rm <name>`. Long-running servers stay until you `hc kill` them.
- Then end your turn, or keep doing your own work. Workers report with `hc send`, which arrives as your next input: `<name>: STATUS done|blocked|failed - ...`. Waiting this way costs zero tokens.
- To block mid-turn instead, run `hc wait --children any >/dev/null; hc ls`. Never `sleep` or poll.
- hc notifies you itself when a worker is blocked, errors or exits. Then run `hc read <name> --lines 0`.
<!-- ‹guest · 2026-12-06› -->
  - **Folder trust** prompt: spawn.ps1 answers it for the worker's own folder (its worktree, or the project folder), so a "blocked (permission)" right after spawning clears by itself within seconds. If a worker is still stuck on it, check `hc read <name> --lines 0`: accept only if it names the project or its `.conductor\wt\` path (agy: `hc keys <name> enter`; claude: `hc keys <name> down`, then `hc keys <name> enter`).
  - Anything else: show the user and ask.
- **Stuck:** a worker with no file changes and no report after ~5 minutes on a small task (some free models hang). Check `hc read <name> --lines 20`. If it shows `Rate limit` / `free-models-per-day` / `FreeUsageLimitError` (OpenCode Zen's daily cap) / a usage limit, re-spawn on the pair's other engine and skip that family for the day (reference/routing.md, Quotas). Otherwise kill it and treat it as a failure (the ladder). Note the failure in `reference/observed.md`.

## 6. Review every report yourself

1. Read the report (and the results file it mentions; with a worktree it's in `.conductor/wt/<task>/.conductor/results/`).
2. Review its changes: `git -C .conductor/wt/<task> status --short` and `git -C .conductor/wt/<task> diff` (no worktree: `git diff -- <its files>`).
3. Run the Check yourself, inside the worktree. Never accept on the worker's word.
   - **Bigger or riskier diffs** (over ~50 changed lines, or touching auth, data, money, or deletes): also run the `ponytail:ponytail-review` skill on the worktree's diff. It checks logic, safety, load, tests and bloat. Rework what it flags as a real problem, and skip its nits.
4. Accept: `powershell -NoProfile -ExecutionPolicy Bypass -File "$HOME/.claude/skills/conductor/scripts/merge.ps1" -Name <task>` commits the worktree, merges its branch and removes it. Reject for good: add `-Drop`. On `CONFLICT` your branch is unchanged: resolve it yourself if it's small, else drop it and re-spawn the task from the new HEAD.

- Workers that report `done` **close themselves**; merge.ps1 also removes the worker's pane (accept or drop ends the task). A `blocked` or `failed` worker stays open: `hc send <name> "<fix>"` or kill it.
- Rework after a `done` that fails your review: write `.conductor/tasks/<name>-r2.md` with the exact failure and expected behavior, then spawn `<name>-r2` on the next rung of the ladder in reference/routing.md (other engine, one level up; Sonnet only as the last rung). It continues in the same worktree, keeping the partial work.
- End: kill any worker still open, run `hc rm` on finished ones you no longer need, merge or drop every worktree left (`git worktree list`), then tell the user what shipped, what you verified, and the open risks.

## Hard rules

- **No Opus besides you.** Never use the Agent tool's `fork`, and spawn.ps1 has no opus or fable tier. The user wants every subagent visible, so use spawn.ps1, not the Agent tool. If the Agent tool is unavoidable, set `model: "haiku"` or `"sonnet"`. Settings also force subagents to sonnet.
- **Claude tiers** share the user's Claude plan with you. Use them only as the ladder's last rung (2 free attempts failed), or for security- or data-loss-critical code.
- **Free only.** spawn.ps1's tier table is the allow-list. Never launch models by hand.
- **Token discipline.** In tasks, point to paths and line ranges instead of pasting files. Read panes only when hc says something is blocked or failed.

این نسخه با نشانه‌گذاری اختصاصی حساب شما نمایش داده می‌شود. برای نصب سریع، به تب نصب و راه‌اندازی بروید.

مهارت‌های مشابه و پیشنهادی

مشاهدهٔ همه ←
بهره‌وری
آزاد

REA analysis optimization

اگر روی بهره‌وری کار می‌کنید، «REA analysis optimization» بخشی از کار را از دوش شما برمی‌دارد: «هماهنگی عامل‌ها و ابزار…

⚡ /rea-analysis-optimization SKILL.md
Claude / Claude CodeOpenAI Codex +۱
۷۴/۱۰۰ ★ ۴۷۴,۰۸۴
بهره‌وری
✦ Pro

Writing Plans

«Writing Plans» یک مهارت آماده در حوزهٔ بهره‌وری است؛ به دستیار هوش مصنوعی شما یاد می‌دهد «هماهنگی عامل‌ها و ابزارهای M…

⚡ /writing-plans SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
بهره‌وری
✦ Pro

Executing Plans

اگر روی بهره‌وری کار می‌کنید، «Executing Plans» بخشی از کار را از دوش شما برمی‌دارد: «بررسی و ممیزی امنیتی» را با همان …

⚡ /executing-plans SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
بهره‌وری
✦ Pro

Claude Academy guide

«Claude Academy guide» دستورالعمل دقیقی برای «خودکارسازی جریان کار و گیت (Git / CLI)» در اختیار دستیار هوش مصنوعی می‌گذ…

⚡ /academy-guide SKILL.md
Claude / Claude CodeMCP
۹۳/۱۰۰ ★ ۱۹۸,۷۹۴
بهره‌وری
✦ Pro

Doc Co-Authoring Workflow

«Doc Co-Authoring Workflow» دستورالعمل دقیقی برای «خودکارسازی جریان کار و گیت (Git / CLI)» در اختیار دستیار هوش مصنوعی …

⚡ /doc-coauthoring SKILL.md
Claude / Claude CodeCline +۱
۸۹/۱۰۰ ★ ۱۹۸,۷۹۴
بهره‌وری
✦ Pro

PRCheckloop

کارهای تکراری ترمینال، مدیریت شاخه‌ها، نوشتن پیام کامیت استاندارد و ساخت اسکریپت‌های کمکی را سریع و یکدست انجام می‌دهد.…

⚡ /prcheckloop SKILL.md
Claude / Claude CodeOpenAI Codex +۱
۹۶/۱۰۰ ★ ۱۱۹,۴۷۸