ag-team-safe

ag-team-safe is a skill for Claude Code from andregusman-raiz/a-gusman-claude. It costs 39 tokens per session (1,354 once invoked), scanned A, original, MIT.

A team-management wrapper for giving multiple coding agents separate worktrees when they edit the same repository. A worktree is an isolated working copy connected to the same Git repository.

In plain words
What is it for?
Use it to split a refactor or feature into writing tasks, assign each task its own worktree, merge the results in sequence, and remove the team when finished.
Why use it?
Without isolation, parallel agents can overwrite each other’s changes or create conflicting branches and stashes. It checks repository and process conditions before starting and coordinates the merge afterward.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; reads .claude/ paths.

Good fit Use it to split a refactor or feature into writing tasks, assign each task its own worktree, merge the results in sequence, and remove the team when finished.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/andregusman-raiz/a-gusman-claude/ag-team-safe
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add andregusman-raiz/a-gusman-claude --skill ag-team-safe
Clone the repo
git clone --depth 1 https://github.com/andregusman-raiz/a-gusman-claude

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ag-team-safe

README.md
[![agentmods](https://agentmods.dev/badge/skills/andregusman-raiz/a-gusman-claude/ag-team-safe/github.svg)](https://agentmods.dev/skills/andregusman-raiz/a-gusman-claude/ag-team-safe)
Your own site
<a href="https://agentmods.dev/skills/andregusman-raiz/a-gusman-claude/ag-team-safe"><img src="https://agentmods.dev/badge/skills/andregusman-raiz/a-gusman-claude/ag-team-safe/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ag-team-safe

Your own site · 80×15
<a href="https://agentmods.dev/skills/andregusman-raiz/a-gusman-claude/ag-team-safe"><img src="https://agentmods.dev/badge/skills/andregusman-raiz/a-gusman-claude/ag-team-safe.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,354 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 4
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.01354
Opus 5 $0.00019 $0.00677
Sonnet 5 $0.00008 $0.00271
Haiku 4.5 $0.00004 $0.00135

Measured 9d ago against content hash 0643f2eef26f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

ag-team-safe scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ag-team-safe/SKILL.md · 131 lines

How it starts

The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ag-team-safe — Team Wrapper com Worktree Obrigatorio

Problema que resolve

TeamCreate por padrao NAO impoe isolation:"worktree" nos teammates. Se voce spawna 3 teammates que editam o mesmo repo, os 3 escrevem no mesmo working tree → corrupcao garantida (stash overflow, edits perdidos, branch drift). Incidente referencia: docs/diagnosticos/2026-04-07-raiz-data-engine-wip-triage.md.

O que faz

  1. Valida ambiente antes de criar team:
    • memory_pressure != critical
    • repo-health.sh no repo alvo (stash < 3, working tree limpo ou com WIP identificado)
    • claude-locks-status.sh sem PIDs ativos conflitantes
  2. Cria team via TeamCreate
  3. Para CADA teammate que fara escrita (build/refactor/fix):
    • Spawna com isolation:"worktree" OBRIGATORIO
    • Injeta no prompt: path absoluto do worktree, branch alvo, escopo de arquivos exclusivo
  4. Teammates read-only (Explore, review) podem rodar sem worktree
  5. Coordena merge sequencial dos worktrees para a branch integradora
  6. TeamDelete imediato ao final

Invocacao

/ag-team-safe adicionar autenticacao Clerk no raiz-platform --teammates 3
/ag-team-safe refatorar modulo auth em 3 frentes --teammates 3 --repo ~/Claude/GitHub/raiz-platform

Regras inegociaveis

R1 — Zero overlap de arquivos

Antes de spawnar teammates, declarar lista EXPLICITA de arquivos por teammate. Se houver overlap → rejeitar paralelismo, fazer sequencial.

R2 — Worktree para todo teammate que escreve

Agent({
  team_name: "<nome>",
  name: "builder-auth",
  subagent_type: "ag-implementar-codigo-construir-codigo",
  isolation: "worktree",   // ← OBRIGATORIO
  prompt: "Trabalhe em [worktree path absoluto]. Edite APENAS: [lista]. NAO toque em: [lista]."
})

R3 — Max 4 teammates

Memory safety (36GB MacBook). Mais que 4 → sequencial.

R4 — Max 1 teammate escrevendo em package.json / tsconfig / lock files

Se 2+ teammates precisam mudar deps → sequencial por esses arquivos, paralelo no resto.

R5 — Merge sequencial dos worktrees

Nunca merge paralelo. Ordem:

  1. Teammate que toca infra (migrations, configs, tipos)
  2. Teammates de features independentes
  3. Teammate de testes/docs Entre cada merge: typecheck + lint + test.

Read the full file on GitHub · 131 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 131 lines · 39 tokens per session scan A 0643f2eef26f

Subscribe to this mod's changes

ag-team-safe is a skill published in the GitHub repository andregusman-raiz/a-gusman-claude (19 stars, last pushed 4d ago), licensed MIT. It adds 39 tokens to every session and 1,354 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

taiyi-integration

A project workflow skill for closing a TaiyiForge change and recording it in a CHANGELOG.md file. It checks review results, tests, and the state of the working tree before archiving the change.

Dong90/oh-my-taiyiforge · 27 tokens

security-pipeline

Use when security verification is needed - pre-commit security checks, vulnerability scanning, STRIDE threat analysis. Integrates with /handoff-verify --security and /commit-push-pr. CWE Top 25 based.

sangrokjung/claude-forge · 48 tokens

docs-release-notes

Use when a change needs a user-visible release-note, changelog, or changeset entry — "add a release note", "add a changeset for this", "what goes in the changelog?", "write up what shipped", "note this for the next release" — or when finalizing a branch whose customer-visible features, bug fixes, or UI changes should…

The01Geek/prflow · 106 tokens

docs-sync-internal

Use when code changes on the current branch need matching internal or developer documentation — "update our internal docs", "the architecture docs are stale after this change", "document what I just changed", "do the dev docs still match the code?" — or as a pre-push check that developer docs track the code. Narrower…

The01Geek/prflow · 105 tokens

pr-description

Use when generating or updating a PR description for the current branch. Takes an optional issue number as argument.

The01Geek/prflow · 24 tokens

retrospective-audit

Stage B of /prflow:retrospective-weekly: given a most-recent-first subset of one recurring pattern's occurrence-PR context bundles (bounded by auditbundlecap), re-derive the root cause and return one JSON object carrying a ranked findings array (one to three sub-patterns) — no edits, no worktree. Invoked as a subagent…

The01Geek/prflow · 91 tokens