Skip to content
Merged
4 changes: 4 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
"name": "agent-fleet",
"source": "./plugins/agent-fleet"
},
{
"name": "crew",
"source": "./plugins/crew"
},
{
"name": "game-facts",
"source": "./plugins/game-facts"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Or paste `4nrry/agent-plugins` into the Claude Desktop **Add marketplace** dialo
| Plugin | What it is |
|---|---|
| [agent-fleet](plugins/agent-fleet/) | Rules for multi-agent work — model routing per phase, fan-out sizing, output schemas, and citation verification. Two hooks, because the prose alone measurably did not fire. |
| [crew](plugins/crew/) | Cheap headless workers through three agent CLIs, without fighting Claude's harness: Claude writes the task, sets scope and gate, and reviews the diff; the worker runs one slice under its own CLI's hooks, installed for the run only. Backends: agy (Antigravity CLI, Gemini; default), opencode (free Zen models, weaker shell guard) and GitHub Copilot CLI (Free plan: `--model auto` only, paid in AI credits, no shell). The verdict never reads exit 0 as success — in agy 1.3.4 timeouts, denied actions and an unmet `--json-schema` all exit 0 (observed, n=1 each). One skill per backend plus a shared delegation doc, injected by a UserPromptSubmit hook when the prompt names the CLI, and a watcher that ends the background commands agy would otherwise wait 30 min for. |
| [game-facts](plugins/game-facts/) | Pins the installed game's version before the agent answers from training memory. A UserPromptSubmit hook reads Steam appmanifests and injects appid, buildid and update date — so the version never has to be typed into the prompt. |
| [homelab](plugins/homelab/) | Software you maintain yourself on a Linux box, where the official docs stop. A Palworld dedicated server (the config the server erases on shutdown), WireGuard through NetworkManager (the IPv6 leak that passes the IP test), and tarball installs (one versioned layout, and why a self-updating app must not live in /opt). Machine state stays out of the repo. |
| [media-agent](plugins/media-agent/) | Producao de midia numa maquina propria com GPU de 8 GB: locucao a -16 LUFS com `say` separado da legenda, trilha e bancos com a licenca de cada item, retoque no ComfyUI so com modelos comerciais, turntable no Blender headless, video como codigo edicao de video pronto pelo MCP do Kinocut, imagem e video gerados pelas assinaturas de Gemini e Grok, e a ElevenLabs alem da voz: SFX, trilha, limpeza de gravacao, legenda e dublagem. Um hook que avisa onde o `vipsthumbnail -o` vai gravar de verdade. |
Expand Down
11 changes: 11 additions & 0 deletions plugins/crew/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "crew",
"displayName": "Crew",
"version": "0.4.0",
"author": {
"name": "4nrry",
"url": "https://github.com/4nrry"
},
"license": "MIT",
"description": "Tres CLIs de agente como workers baratos e headless, sem brigar com o harness do Claude: o Claude escreve a task, define escopo e gate e revisa o diff; o worker executa uma fatia por vez sob hooks do proprio CLI instalados so durante o run. Backends: agy (Antigravity CLI, Gemini; padrao), opencode (modelos gratis do Zen, guard do shell mais fraco) e GitHub Copilot CLI (plano Free, so --model auto, pago em AI credits, sem shell). O veredito nunca le exit 0 como sucesso. Uma skill por backend (crew:agy, crew:opencode, crew:copilot) com o que e do CLI, um documento comum de delegacao, um script Python stdlib, dois comandos e um hook UserPromptSubmit que injeta a skill do backend nomeado no prompt (taxa de acerto do hook nao medida). Um vigia encerra os comandos que o agy deixa em segundo plano depois de o worker terminar com gate verde. Sem alegacao de melhoria: nao ha run records (bench/PROTOCOL.md)."
}
455 changes: 455 additions & 0 deletions plugins/crew/README.md

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions plugins/crew/commands/delegate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
description: Delega uma fatia bem delimitada a um worker (agy com Gemini, opencode com modelo gratis do Zen, ou GitHub Copilot CLI sem shell), sob guard rails e gate, e devolve um veredito JSON
argument-hint: <task.json> [--backend agy|opencode|copilot] [--model slug] [--no-quota-probe]
---

Leia antes, se ainda nao leu nesta sessao, `${CLAUDE_PLUGIN_ROOT}/shared/delegate.md`
(se esta fatia deve ser delegada e como a task tem que estar escrita) e a skill
do backend: `crew:agy` (padrao), `crew:opencode` ou `crew:copilot`.

Rode, com `run_in_background: true` porque o run pode passar de 10 minutos:

```bash
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/crew.py" delegate '<task.json>' [--backend agy|opencode|copilot] [--model slug] [--no-quota-probe]
```

`--backend` sobrepoe o campo `backend` da task (padrao `agy`). `opencode` so
quando a quota do agy acabou ou para capacidade extra gratis, e diga ao usuario
que o guard do shell e mais fraco. `copilot` gasta AI credits a cada run, nao
tem shell e so aceita `--model auto`. `--no-quota-probe` so vale para o agy.

Monte a linha a partir de `$ARGUMENTS`; nao cole `$ARGUMENTS` cru na shell.
O caminho da task vai entre aspas simples, como um argumento so (pode ter
espaco). Se for o primeiro `delegate` ou `review` da sessao, pergunte antes ao
usuario: o codigo vai para a Google (agy), para o provedor do modelo do Zen
(opencode) ou para a GitHub (copilot); no agy gasta a quota dele, no copilot
os AI credits. No copilot, reporte `copilot.usage.ai_credits` do veredito.

Quando terminar:

1. Saida 2 = recusado antes de rodar. Mostre o motivo ao usuario; nada rodou.
2. Leia o veredito (stdout, e `verdict.json` no run dir). Reporte `ok`,
`failures`, `warnings` e `guard_denials` sem suavizar.
3. **Revise o diff mesmo com `ok: true`**: `git diff HEAD` contra a fonte da
verdade, seguindo a secao de revisao do documento comum. Nao commite antes
disso, e nao commite sem o usuario pedir.
28 changes: 28 additions & 0 deletions plugins/crew/commands/review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
description: Segunda opiniao somente leitura do Gemini pelo agy (--mode plan, relatorio com schema), de um modelo gratis pelo opencode, ou do GitHub Copilot CLI (Auto) sem shell nem escrita
argument-hint: [--backend agy|opencode|copilot] [--diff HEAD~1] [--model slug] <o que revisar>
---

Leia antes, se ainda nao leu nesta sessao, a skill do backend: `crew:agy`
(padrao), `crew:opencode` ou `crew:copilot`. Rode:

```bash
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/crew.py" review [--backend agy|opencode|copilot] [--diff HEAD~1] [--model slug] --prompt-file /caminho/pergunta.md
```

Nao cole `$ARGUMENTS` cru na shell: a pergunta e texto livre, e parenteses,
aspas, `;` ou crase nela quebram ou mudam o comando. Escreva a pergunta num
arquivo fora da arvore (o scratchpad) e passe com `--prompt-file`; so as opcoes
(`--backend`, `--diff`, `--model`) vao na linha. Se for o primeiro `delegate`
ou `review` da sessao, pergunte antes ao usuario: o codigo vai para a Google
(agy), para o provedor do modelo do Zen (opencode) ou para a GitHub (copilot);
no agy gasta a quota dele, no copilot os AI credits (0,41 num review pequeno,
n=1).

Sem `--diff`, o revisor so le arquivos; passe o intervalo quando a pergunta for
sobre uma mudanca.

Ao reportar: o veredito e de um modelo mais barato e serve de segundo par de
olhos, nao de decisao. Para cada finding, confira o `evidence` no codigo antes
de repassar, porque o numero de linha pode vir errado. Diga quais voce confirmou
e quais nao.
14 changes: 14 additions & 0 deletions plugins/crew/hooks/hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "\"${CLAUDE_PLUGIN_ROOT}\"/hooks/inject.sh"
}
]
}
]
}
}
39 changes: 39 additions & 0 deletions plugins/crew/hooks/inject.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
# UserPromptSubmit hook: when the prompt names agy, opencode or copilot as a
# whole word (case-insensitive), inject that backend's SKILL.md plus a line
# pointing at the shared delegation doc. Advisory only: it never blocks, always
# exits 0, reads only the prompt and files in this plugin, no network.
#
# Why a hook and not the skill descriptions: agent-fleet measured description
# triggering at 2 of 30 should-trigger runs (trigger-eval 2026-08-06,
# bench/plugins/agent-fleet/results/2026-08-06-trigger-eval/ in
# https://github.com/4nrry/agent-plugins). This hook's own hit rate is
# unmeasured. Whole-word match: "agy-worker" and "crew:agy" match, "agyx" not.
set -euo pipefail

PLUGIN_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"

prompt=$(jq -r '.prompt // empty' 2>/dev/null) || exit 0
[[ -n "$prompt" ]] || exit 0

matched=()
for backend in agy opencode copilot; do
if printf '%s' "$prompt" | grep -qiwF -- "$backend"; then
matched+=("$backend")
fi
done
(( ${#matched[@]} )) || exit 0

for backend in "${matched[@]}"; do
skill="$PLUGIN_ROOT/skills/$backend/SKILL.md"
if [[ ! -f "$skill" ]]; then
echo "crew plugin hook: $skill not found; skill not injected" >&2
continue
fi
# shellcheck disable=SC2016 # the literal ${CLAUDE_PLUGIN_ROOT} is the point: SKILL.md uses it
printf 'The crew:%s skill applies to this request (matched the word "%s"). Read %s/shared/delegate.md before delegating or reviewing through it. ${CLAUDE_PLUGIN_ROOT} below is %s.\n\n' \
"$backend" "$backend" "$PLUGIN_ROOT" "$PLUGIN_ROOT"
cat "$skill"
printf '\n'
done
exit 0
Loading
Loading