duckherd
Health Uyari
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 6 GitHub stars
Code Basarisiz
- exec() — Shell command execution in hooks/changes.ts
- exec() — Shell command execution in hooks/creatures.ts
- exec() — Shell command execution in hooks/dashboard.ts
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
A Claude Code conductor that delegates the work to helper agents but never executes tasks itself, and independently verifies their results instead of blindly trusting them.

Duckherd
Turn Claude Code into a lead and a team of helpers, shown as ducks.
You talk to one lead agent. It plans, hands the work to helpers, checks what they report, and tells you when it's your turn. Helpers can work in parallel, their noisy output (test logs, long searches) stays out of the lead's context, and a fresh helper can check work independently of the one that wrote it.

What you get
- A lead that plans and judges. It makes at most one small edit itself; helpers do the work, in parallel, on the model the lead picks for each.
- A live side panel: the plan, each helper as a duck (a gold crowned duck for Opus), git changes, and usage meters for context, your 5-hour and weekly limits, and the prompt cache.
- Checked claims: a helper's "tests pass" is compared with the test runs Duckherd actually saw. Stuck helpers are asked, then stopped.
- Your own icons: the built-in theme is ducks, and you can draw your own theme (any characters, any art) and switch with
/duckherd crew theme <name>; see Make your own theme. Sounds can be turned off.
Install
git clone https://github.com/AliAlsalkhadi/duckherd
cd duckherd && extras/install.sh
Open a new terminal tab and run claude duckherd. Plain claude is unchanged. The installer adds one block to your shell's rc file (~/.zshrc for zsh; ~/.bashrc for bash, or ~/.bash_profile on a Mac), backing it up first.
Or as a plugin, loaded in every session:
claude plugin marketplace add AliAlsalkhadi/duckherd
claude plugin install duckherd@duckherd
Update:
claude plugin marketplace update duckherd
claude plugin update duckherd@duckherd
If you installed with extras/install.sh, run git pull in the clone instead.
Needs Claude Code 2.1.295 or newer, in a terminal, on macOS or Linux, with git.
If your organization manages Claude Code, its security plugin (cc-plugin-sec-default) can send some events (prompt.compose, prompt.attachment and a few session.append doors) past every plugin's hooks. That is Claude Code's design, and Duckherd doesn't try to get around it. It falls back instead: the lead duck's rules go with your prompt rather than the system prompt, and helper names are kept out of the agent list another way. /duckherd doctor says when this is happening. Nothing to fix.
When it helps
Duckherd helps on big or multi-part work: several features or fixes at once, where helpers can run side by side and the lead keeps the thread. The lead itself uses about 1.5% of the tokens; the helpers do the rest.
On small or mid-size tasks it costs about 1.4x what plain Claude Code does. For quick fixes, turn Start on off in /config so sessions start as plain Claude, then run /duckherd on when you have a big task. One helper takes one feature or fix, up to about 600 lines.
The rest of this README covers how it works, settings and commands.
How it works
- Helpers run on Sonnet unless the lead picks Haiku or Opus. It sends
modelwith each helper's Agent call, andeffortonly when it should differ from medium, and may open the prompt withWhy <model>/<effort>: <reason>for you. The Helper model setting in/config(haiku,sonnet,opusorauto) sets one model for every helper, and the panel'smkey (its picker) changes it for this session only (a new session starts from the setting);/duckherd helpersays which is in use. - A helper's effort comes from the Why line when it names one. Otherwise the model's usual effort applies: Haiku low, Sonnet medium, Opus high.
- The plan moves on by itself: a helper step turns doing when a helper starts on it, and done when its helpers report.
- The lead's own effort is the Chat effort default setting in
/config. It isoffby default (the app's own effort);autohas Haiku judge each prompt, and a level pins it. This only works on Opus and Sonnet 5.5. - The usage throttle watches your 5-hour and weekly limits. At 80% of the 5-hour window, or 10 points ahead of the weekly pace, helper effort drops one step and auto chat effort is capped at medium. At the next level, helpers move one model lighter and only two run at a time. Turn it off with the Usage throttle setting in
/config. - Keep-warm is off in every session until you turn it on. When on, it sends a one-line "ok" ping about 3 minutes before a 5-minute prompt cache expires, or 10 minutes before a 1-hour one (Claude Code can compact an idle long conversation on the 1-hour cache, which would replace the chat with its own summary) (a small turn, cheaper than rewriting a big context); when off, no ping is ever sent. Turn it on for the current session with
eon the Agents tab (the "e warm" hint ends the keys line: grey while off, a green dot while on) or/duckherd keep-warm on, and off the same way. The choice is kept for that session only and never carries over to another session. The Keep-warm default setting in/config(off,onorauto) sets where new sessions start;autopings only while a plan is unfinished and the context is 100k or more. Pings stop after 3 hours without typing. The usage box's edge still showscache warm 41morcache coldeither way. - The lead gets 6 quick looks per request (setting
quickLooks, 0 to 20), also while helpers work. Read, web, other tools and other commands count, and so does anything that prints a file's content: Grep withoutput_modecontent, head, tail or awk on a file,grep ''orgrep .over a file,git showandgit diff(without--stator--name-only). Searches that list files or matches (Glob, Grep listing files or counting, bash grep,-land-c, wc, git status, log,gh pr view), the memory folder and the scratchpad are free. - A helper report that would wake an idle lead while other helpers still work waits up to 8 seconds, so reports that come close together arrive in one turn.
- When a helper says "tests pass", that is checked against its own test runs since its last edit. It needs a full run that passed, judged suite by suite on the latest run of each (a failed run followed by a passing run of the same suite is fine). A run of some tests, or a piped run whose output doesn't say how it ended, only counts as partial. A report that states its own failures ("306 pass, 2 fail") is not flagged for them, nor is a failure on a line that also ran something else (
tests; scan) when the report names a failure; a clear "all tests pass" over a failed run, or with no run seen, is. If the runs don't match the claim, the lead is told. - If a helper goes quiet or keeps repeating a failing step, Duckherd asks it first, then tells the lead, and stops it after an hour.
- The lead may make one small edit itself: one existing file per request, up to 30 changed lines (setting
leadEditLines, 0 to 100; 0 sends every edit to a helper), with the Edit tool. A second file, a bigger change, the Write and notebook tools, and any file in a checkout that a running helper is editing go to a helper, and the refusal says the limit. A shell command that writes a project file (sed -i,perl -i,tee,>,>>,cp,mv,dd) is an edit too: it must be the same one file, and only an append of a heredoc or echo (>>,tee -a) has lines the mod can count against the budget; any other shell write is refused with a pointer to the Edit tool. An edit that fails (for example anold_stringthat isn't found) uses none of the budget. Its own memory folder and scratchpad stay open to it and don't use the budget; scripts it runs from the scratchpad aren't inspected, so the lead prompt tells it not to change project files through them. - One feature or fix is one helper that plans, edits and tests it; there is no separate plan helper. The lead may send one read-only reviewer, with the diff and the task rather than its own conclusion, when a change is large, touches security, concurrency or data loss, or follows a worktree merge. The helper that merges parallel worktrees is told to run the full test suite afterwards and report the result.
Optional extras
python3 (Watch, a helper's live view) and cmux (opens that view in a tab).
Make your own theme
A theme is one JSON file with your art, names and (optionally) sounds. It replaces the ducks in the panel, and Duckherd itself doesn't change.
- Save it as
<name>.theme.jsonin a folder, or asduckherd-theme.jsoninside a sub-folder of that folder. Another installed plugin can also ship aduckherd-theme.jsonat its root. - Set the
themesDirsetting in/configto that folder. - Run
/duckherd crew themeto list themes and/duckherd crew theme <name>to switch. The list also says why a file was left out./duckherd crew theme none(oroff) draws no creature pictures at all, only the text; any theme brings them back.
The file has "duckherdTheme": 1, an id, a title, a palette (one-character keys, #rrggbb values), and 1 to 12 helpers, each with frames drawn as rows of palette letters (. is clear). It can also set the lead's frames, marks, a frame size, small looping effects over a helper (sparkles, dust, bubbles) and sound files beside it. The full format is in the comment at the top of hooks/themes.ts.
Small effects go over a helper without storing new frames. Define them once under "effects" (steps of [x, y, letter] pixels, each step shown stepMs long, looping), then say where they play:
"effects": { "sparkle": { "stepMs": 200, "steps": [[[0, 0, "L"]], [[1, 1, "L"], [-1, 1, "M"]], []] } },
"helperEffects": [ { "effect": "sparkle", "at": [14, 2], "on": ["run", "done"] } ]
at is the anchor in frame pixels, on the states it plays in (the five actions, done, failed, cheer, droop, asleep, idle, flinch, wave, noticed, stuck; absent is all). A helper's own "effects": [...] list replaces helperEffects for it. Effect pixels are drawn only on clear pixels, never over the figure, and loop on their own clock.
A theme file must be under 4 MiB on disk. Pixel art can be bigger in bytes than in characters, so check the byte size; larger files are skipped.
Model calls
Duckherd makes a few small model calls through Claude Code (Haiku or Sonnet) to digest helper reports and compact transcripts; these have no setting. A third, the effort judge that picks how much effort each prompt needs, is off unless you set Chat effort to auto in /config. Likely secrets are blanked first.
Shared checkout
One safety rule is always on: a helper that edits files is not started while another editing helper is already running in the same checkout (neither with isolation: "worktree"), because the two could overwrite each other. "The same checkout" is the git repo (its toplevel; a folder that is no repo counts as itself): a helper's checkouts are the ones it has been seen editing in, plus the absolute or ~ paths its brief names, and a brief that names none counts as the session's own folder. Helpers in different repos run side by side; a brief that names several repos holds all of them. The start is refused with a message naming the repo in conflict and telling the lead duck to use a worktree or wait for the first helper. Read-only helpers are never held, and a call that does not plainly say it edits is let through.
An Agent call reaches Claude Code as the lead duck wrote it: the lead duck is told to send model (and effort, when it should differ from medium) itself, so auto mode's checker, which refuses a call a hook changed after reviewing it, lets it through in one go.
Use
/duckherd <task>starts a task; if the lead duck is busy, the task is lined up and starts when its plan is done./duckherd crew [on|quiet|off|calm|lively|pictures|text|theme <name>]sets the ducks' sounds and look; bare, it says how they are./duckherd helper <name> <message>sends a message to a running helper (a finished one's goes to the lead duck), and/duckherd helper <name> stopstops it. Bare, it lists the helpers and their model./duckherd keep-warm on|offkeeps the prompt cache warm for this session (off by default; see above)./duckherd compactcompacts the chat with a Haiku summary that carries the running helpers and the unfinished plan; the panel's compact button does the same. A note says whether Haiku wrote it: some setups (an admin's security plugin) send compaction past plugins, and then Claude Code's own model does. A typed/compactand the automatic compaction at the limit are plain Claude Code./duckherd panelshows or hides the side panel./duckherd doctorchecks your setup./duckherd onand/duckherd offturn the lead duck on or off for the current session only. Off, the session is plain Claude: no lead instructions, rules, panel, notes or wake-ups. The choice is kept if you resume that session.
Settings are in /config. startOn (default on) sets whether sessions start with the lead duck on. Off, they start as plain Claude until /duckherd on.keepAwake (default off) sets whether keep-awake starts on: while the lead duck or a helper is working, the Mac (caffeinate -i) or a Linux machine (systemd-inhibit) is kept from sleeping. Press a on the panel's Sessions tab, or click a awake there, to turn it on or off; green ● means it is holding the machine, hollow ○ means on but idle.
Uninstall
extras/install.sh --uninstall, or claude plugin uninstall duckherd@duckherd. Duckherd's files in ~/.claude/duckherd/ (status files) stay; delete that folder to remove them.
License
MIT. See LICENSE.
Not affiliated with or endorsed by Anthropic.
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi