agentleFS
ckjeterckjeter/leader-in-agent-deck/SKILL.md

leader

Skill2 starsChanged 4 days agoMITView on GitHub

Leader mode. Split the current task into pieces, dispatch each piece to the best worker (a harness and model from the roster) through agent-deck, verify the results, and log every dispatch to a ledger so the user learns which combos are good at what. Use when the user invokes /leader or asks to run a task in leader mode. You may also suggest it for a large task with independent pieces, but then you must ask the user and get a yes before launching anything.

10 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use storage-analyzer, neat-freak and 4 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.
  • xiaolinVVSkill

    storage-analyzer

    macOS / Windows 只读存储分析助手(自动识别系统)。扫描整机磁盘占用,找出 占空间大户,把每一项分成 🟢可自动清理 / 🟡需人工判断 / 🔴谨慎清理 三级并给出 可执行处置方案,生成排版精美、可折叠、命令可一键复制的交互式 HTML 报告,并可 起本地服务在网页上一键删除(移废纸篓/直接删)。扫描全程只读。务必在以下场景 使用:用户说"存储分析""磁盘满了""C盘/硬盘满了""空间不够""清理空间" "清理磁盘""占空间""哪些东西占地方""帮我看看存储""看一下电脑存储/空间" "存储空间""电脑空间不够""内存满了/不够/不足""看下内存/存储"(中文口语里 "内存"常指存储空间)"storage analysis""disk cleanup""清缓存""磁盘清理"; 或用户抱怨电脑没空间、想知道什么东西吃硬盘、想要清理建议时。注意:若用户明确 指运行内存/RAM(如"哪个进程吃内存""内存占用高"想看活动监视器),那是 RAM 不是存储,不属于本 skill。

    Also in 5 projects that use this

  • Wyx1105170322Skill

    neat-freak

    End-of-session knowledge cleanup with OCD-level rigor — reconciles project docs (CLAUDE.md, README.md, docs/) and agent memory against the code so nothing rots. 会话结束后对项目文档和记忆进行洁癖级审查与同步。MUST trigger when the user says: "sync up", "tidy up docs", "update memory", "clean up docs", "/sync", "/neat", "同步一下", "整理文档", "整理一下", "更新记忆", "梳理一下", "收尾", "这个阶段做完了", "新人能直接上手", or any phrase suggesting a dev milestone where knowledge needs reconciliation. Also trigger when the user reports stale docs, conflicting memories, or wants a clean handoff to teammates or other agents. Bare "整理" / "tidy" with prior dev context counts — do not under-trigger. Cross-platform: works on Claude Code, OpenAI Codex, OpenCode, and OpenClaw.

    Also in 6 projects that use this

  • xiaolinVVSkill

    hv-analysis

    横纵分析法(Horizontal-Vertical Analysis)深度研究Skill。由数字生命卡兹克提出,融合了索绪尔的历时-共时分析、社会科学的纵向-横截面研究设计、商学院案例研究法与竞争战略分析的核心思想。 当用户想要系统性研究一个产品、公司、概念、技术或人物时使用。核心是双轴分析:纵轴追踪从诞生到当下的完整生命历程(以叙事故事呈现),横轴在当下时间截面上与竞品/同类进行系统性横向对比,最后交叉两条轴产出独到洞察。最终产出一份排版精美的PDF研究报告。 触发词包括但不限于:横纵分析、研究一下、帮我分析、深度研究、做个研究、调研一下、竞品分析、帮我看看这个东西怎么样、这个产品/公司/概念是怎么回事、帮我摸清楚、帮我搞懂、帮我做个deep research。 即使用户只是说"帮我了解一下XX"或"XX是什么来头",只要上下文暗示需要系统性的深度研究(而非简单的概念解释),都应该触发。也适用于用户丢来一个产品名、公司名、技术名词说"帮我研究一下这个"的场景。 不要用于简单的名词解释(用户只是问"XX是什么")、不要用于公众号写作(那个用khazix-writer)、不要用于纯标题摘要生成(用wechat-title)。

    Also in 3 projects that use this

  • HK-hubSkill

    aihot

    AI HOT (aihot.virxact.com) 中文 AI 资讯查询 Skill。当用户想知道"今天 AI 圈有什么"、"AI 日报"、"AI HOT"、"AI 资讯"、"AI 热点"、"最近 AI"、"OpenAI/Anthropic/Google 最近发布了什么"、"AI hot today"、"AI news today"、"看一下 AI 行业动态"、"今天有什么大模型发布"、"昨天 AI 圈"、"看下精选条目"、"AI HOT 精选"、"最近一周的 AI 论文"、"AI 模型发布"、"AI 产品发布"、"AI 行业动态"、"AI 技巧与观点" 等任何中文 AI 资讯查询时使用。即使用户只说"AI 圈"、"AI 新闻"、"AI 日报",或者只是问"今天发生了什么"且上下文是 AI / 大模型 / LLM / 创业领域,也应该触发本 Skill。Skill 会直接 curl 公开 REST API 拉数据并整理成中文 markdown 简报,不需要用户配置任何 API Key 或 MCP server。**不要 undertrigger**——用户问 AI 资讯而你不调本 Skill 就是把过时的训练数据当作今日新闻,对用户有害。

    Also in 3 projects that use this

  • skytiger6724Skill

    khazix-writer

    数字生命卡兹克(Khazix)的公众号长文写作skill。当用户需要撰写公众号文章、写稿子、续写文章、根据素材产出长文时使用。触发词包括但不限于:写文章、写稿子、帮我写、续写、扩写、公众号文章、长文、出稿、按我的风格写。即使用户只是说"帮我把这个写成文章"或"用我的风格写一下",只要上下文涉及内容创作和公众号输出,都应该触发。也适用于用户丢过来一个PDF、brief、新闻链接、语音转文字或任何素材说"帮我写篇文章"的场景。不要用于短内容(小红书帖子、推特、朋友圈)或纯标题摘要生成(那个用wechat-title skill)。

    Also in 3 projects that use this

  • heyimjamesSkill

    human-writing

    Make AI writing feel human. Use when asked to "humanize", "make natural", "remove AI tells", "fix AI writing", or review text for authenticity.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 10 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

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

    All helper commands below run as uv run <this skill's directory>/scripts/leader.py <command>.

    line 11
  2. Very specific:

    Never hide a failure. A failed worker gets a failed row, then the retry gets its own row.

    line 27
  3. Distinctive:

    If workers from an earlier task in this conversation are still listed, archive them now (section 6).

    line 35
  4. Distinctive:

    Do a piece yourself when writing the brief and checking the result would take longer than doing it, roughly under ten minutes of your own …

    line 53
  5. Distinctive:

    Write one line on why. It goes into the ledger.

    line 70
  6. Very specific:

    Use one result and say which.

    line 82
  7. Distinctive:

    Write the brief to a file.

    line 87
  8. Very specific:

    When a launch fails on a usage limit before wait can see it, treat that pool as closed for the rest of the task yourself.

    line 120
  9. Distinctive:

    Run the check the brief defined.

    line 124
  10. Distinctive:

    When the check finds problems the worker can fix, send them back to the same worker instead of fixing them yourself or relaunching.

    line 126
  11. Very specific:

    Add --bakeoff <id> to every row of a bakeoff and --explore to the challenger's row.

    line 147
  12. Distinctive:

    when the next task starts in this conversation, before its first launch, or

    line 155
  13. Distinctive:

    when the user says they are done with them.

    line 156
  14. Distinctive:

    Leave a worker running only when its piece still waits on the user's decision, and say so in the table.

    line 158
  15. Distinctive:

    If the user later disagrees with a grade:

    line 160

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “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

Leader

You are the leader for this task. You decide what to delegate, to whom, and whether the result is good enough. You keep full capability: read, think and code yourself whenever that is the better route. Your job is to split the work well, pick a worker for each piece, check the results, and log every piece.

All helper commands below run as uv run <this skill's directory>/scripts/leader.py <command>. Written as leader <command> here. Every command prints JSON.

Before anything else: consent

Workers spend the user's quota, so leader mode needs the user's say-so.

  • The user typed /leader or asked for leader mode in their own words: that is consent. Go on.
  • You loaded this skill on your own judgment: stop. Tell the user in two or three lines how you would split the task and which workers you would use, say that it launches agent sessions on their subscriptions and marks the task's folder as trusted for those workers, and ask whether to go ahead. Do not run leader launch until they say yes. If they say no, do the task normally and do not ask again in this conversation.

A yes covers the task it was given for, not later ones.

Rules

  • Delegate only through leader launch, which goes through agent-deck. Do not use your harness's own subagents (Agent tool, Task tool, Codex workers) for work you could delegate. They are invisible to the ledger.
  • Workers run on this host. Never launch onto another machine. The user picks the host for the whole task when they open the leader.
  • Log every piece of work, including the ones you do yourself (--route self). An unlogged piece teaches nothing.
  • Never hide a failure. A failed worker gets a failed row, then the retry gets its own row.

1. Check health once

leader health

If workers from an earlier task in this conversation are still listed, archive them now (section 6).

mode decides how you work for the rest of the task:

modeMeaningWhat you do
normalagent-deck answersLaunch through agent-deck
degradedagent-deck is down, worker CLIs existleader launch falls back to a headless run of the worker CLI by itself (via: direct). Tell the user agent-deck is down once
self-onlyNeither worksDo the work yourself, log with --route self and --why "fallback: ..."

Direct fallback is used only when agent-deck is unavailable before launch. Never pass --direct to get around something else, such as a session cap: headless workers often cannot write files or enter an untrusted folder. A failed or timed-out launch may already have created a worker. The helper records that attempt and any new session ID in meta.json, then exits with an error. Inspect that session before retrying. Do not restart it, resend the brief, or start a headless copy automatically. Direct fallback refuses --worktree because it cannot create the requested checkout.

notify_daemon: false means completion events are not recorded, so do not wait on the agent-deck inbox. Always wait with leader wait, which reads the session directly. pools shows what each pool has left, explained in the next section.

2. Split and route

Break the task into pieces and give each a class: impl, review, research, bulk, read, write.

Do a piece yourself when writing the brief and checking the result would take longer than doing it, roughly under ten minutes of your own work, or when it needs context only you have.

Pieces that run at the same time must not share files. Give each piece the files it owns and name them in its brief. If two pieces need the same file, run them one after the other or give each a worktree.

For the rest:

leader roster --class impl

Quota decides who can take work, the roster order decides who should.

  • pools gives each pool's usage windows as the provider reports them, how old the reading is (age_minutes), and when a worker last hit a limit. ok: false means do not dispatch there, and why says what closed it: a window over its cap, or a limit hit within the hold time. A pool with source: null has no gauge. Its ok only knows about past limit hits, so send it one piece at a time.
  • route.<class>.pick is the first worker in defaults that is installed and whose pool is ok. Use it. It is null when every default is closed: do the piece yourself or tell the user.
  • Count before you fan out. Several pieces going to one pool at once all draw from the same window. If the window is already past half, split the round across pools or run fewer pieces at a time.
  • Rerun leader roster before each round. Readings change while workers run, and other leaders share the same pools.
  • Do not pick by track record. The per-worker ledger counts are there to show how thin the data is. Grades in the ledger are for the user's analysis and are too few and too noisy to route on. The order in defaults is the user's own judgment and stays the rule until they change it.
  • Write one line on why. It goes into the ledger.

Pieces with no dependency on each other launch at the same time.

Bakeoff, on by default

A bakeoff sends one piece to two workers so the ledger gets a real comparison. It is how new workers get tried.

  • When route.<class>.bakeoff_challenger is not null, run one bakeoff in this round of pieces, never more than one. Pick the piece whose result is easiest to compare side by side, and send it to both pick and the challenger. The helper offers a challenger only when both pools have room, and takes a worker from the pools that have a default slot: another pool than pick first, then the fewest rows in that class.
  • You may swap the challenger for another installed worker in an ok pool when the suggested one clearly cannot do the piece. Say why.
  • Tell the user before launching: which piece, which two workers, and that it costs one extra run. They can turn bakeoffs off in plain words ("no bakeoffs", "save quota"). That holds for the rest of the task, and the next task starts with them on again.
  • Each copy of an impl piece gets its own --worktree.
  • Use one result and say which. When the user states a preference between the two, record it with leader regrade --by user.
  • Log both rows with the same --bakeoff <id>, and the challenger's row with --explore.

3. Brief and launch

Write the brief to a file. A good brief has:

  • the goal in one or two sentences,
  • the files and context the worker needs (absolute paths, not pasted contents, unless it is short),
  • constraints (what not to touch, style, the language of any prose),
  • how the result will be checked (the tests to pass, the question the summary must answer).
leader launch --worker pi/glm-5.2 --path <repo> --brief <brief file> --title "<short task>" --class impl

Add --worktree <branch> for impl pieces in a repo where you or another worker are also editing. launch appends the output contract (write result.md, short summary, NEED: when blocked, no stash or reset in a shared checkout, stay inside the files the brief names, scratch files in the run folder) and the done sentinel. Do not repeat those rules in the brief, but do name the files the piece owns. It returns the run id, the agent-deck session and the result path. A queued field in the output means agent-deck accepted the worker but has not started it: see queued under Wait.

4. Wait

leader wait --run <run id> --timeout 3600

It blocks until the worker finishes. If your harness can run a command in the background and wake you when it exits, do that and keep working on other pieces. Otherwise run waits one at a time once you have nothing else to do.

stateWhat you do
doneRead result.md (or the diff), then verify
failRead the summary. Log the attempt as failed. Retry once on the next worker for the class, or do it yourself
limitThe worker hit its usage limit. wait has recorded it, so leader roster now shows that pool closed for every leader on this host. Log the attempt as failed with the limit in --rework, rerun leader roster and launch the new pick
needs_inputAnswer with leader send --run <run id> --message "..." if you can decide. Escalate to the user when the decision is theirs. Then wait again
errorThe session died. Log failed, retry on the next worker
queuedagent-deck parked the worker because its group is at its concurrency cap. Your own session counts toward the cap of the group you are in, so a worker queued behind you never starts while you keep working. Tell the user once: they can raise the group's cap or name a worker group in the roster ([agent_deck] group). The cap is theirs to change, not yours. Do not pass --direct to get around it. If other workers of yours hold the slots, wait again
idleThe worker is sitting at a prompt and never printed a completion line. The summary shows its last lines. Usual causes: a startup dialog (update, folder trust), a brief that did not arrive, or a question asked without NEED:. Read agent-deck session output <session>, then answer it or resend the brief with leader send
timeoutLook at it: agent-deck session output <session>. Extend the wait, nudge it with a message, or stop it and log abandoned
lostagent-deck stopped answering mid-wait. The child may still finish: check result.md before anything else. Switch to degraded handling for new launches

When a launch fails on a usage limit before wait can see it, treat that pool as closed for the rest of the task yourself.

5. Verify, grade, log

Run the check the brief defined. Start cheap: the tests and git diff --stat. Read the full diff only when a check fails or the change is risky.

When the check finds problems the worker can fix, send them back to the same worker instead of fixing them yourself or relaunching. Its context is still warm, so this is the cheapest fix:

leader send --run <run id> --message-file <what to fix>
leader wait --run <run id> --timeout 3600

Always use leader send, never a bare agent-deck session send, so wait ignores the previous round's done line. Stop after two follow-up rounds: fix it yourself or retry on the next worker. Follow-ups stay on the same ledger row. log records their count, and --rework says what they fixed.

Grade the final result honestly:

  • 3 used as is, no follow-ups
  • 2 used after follow-ups or small fixes by you
  • 1 unusable or redone
leader log --run <run id> --class impl --task "<one line>" --why "<one line>" \
  --outcome done --grade 2 --verify "tests pass, read diff" --rework "fixed one off-by-one in retry loop"
leader log --route self --class read --task "<one line>" --why "faster than a brief" --outcome done

Add --bakeoff <id> to every row of a bakeoff and --explore to the challenger's row. Do not stop or archive it yet. A logged worker may still get a follow-up while you verify the pieces that depend on it.

6. Report

End with a short table for the user: each piece, who did it, its agent-deck session, grade, and anything that failed or needs their decision.

Stop this task's workers when you report, with agent-deck session stop <session>, and do not archive them yet. A stopped session gives its memory back and stays in the list, so the user can still read what it did: agent-deck session output <session> works on it. Archive them later, with agent-deck session archive <session>:

  • when the next task starts in this conversation, before its first launch, or
  • when the user says they are done with them.

Leave a worker running only when its piece still waits on the user's decision, and say so in the table. A new piece gets a new worker even while an old one is listed: one run is one ledger row.

If the user later disagrees with a grade:

leader regrade --id <run id> --grade 1 --note "broke the build next day"

Configuration

  • Roster: $LEADER_ROSTER, else ~/.config/leader/roster.toml, else roster.toml in this skill's directory (gitignored), else the shipped roster.example.toml. It lists workers, their pools, the agent-deck launch flags and the headless fallback command.
  • Worker group: by default workers join the leader's agent-deck group. [agent_deck] group = "<name>" in the roster sends them to that group instead, which keeps them out from behind a group that allows one session at a time.
  • Data: $LEADER_HOME, default ~/.local/share/leader. The ledger format is in references/ledger-v1.md.
  • Host name: $LEADER_HOST, else the roster's [hosts] map, else hostname -s.

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.