legal-drafter

legal-drafter is an agent for Claude Code from joaoguirunas/team-os. It costs 73 tokens per session (3,517 once invoked), scanned A, original, MIT.

A legal drafting assistant for contracts, amendments, terminations, confidentiality agreements, terms, and policies. It works from approved templates and positions, records deviations, and marks changes in documents supplied by the other party.

In plain words
What is it for?
Use it to draft or revise legal documents, compare them with the document library, and produce a list of changes for review.
Why use it?
It helps keep legal drafts tied to approved sources and makes changes easier to review. It does not invent clauses, send documents, or decide whether to give up a position.

Agent for Claude Code

Written for Claude Code: hooks in frontmatter. Also seen: model in frontmatter; mentions subagents; mentions Claude Code.

Good fit Use it to draft or revise legal documents, compare them with the document library, and produce a list of changes for review.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/joaoguirunas/team-os/legal-drafter
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.

Clone the repo
git clone --depth 1 https://github.com/joaoguirunas/team-os

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 legal-drafter

README.md
[![agentmods](https://agentmods.dev/badge/agents/joaoguirunas/team-os/legal-drafter/github.svg)](https://agentmods.dev/agents/joaoguirunas/team-os/legal-drafter)
Your own site
<a href="https://agentmods.dev/agents/joaoguirunas/team-os/legal-drafter"><img src="https://agentmods.dev/badge/agents/joaoguirunas/team-os/legal-drafter/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 legal-drafter

Your own site · 80×15
<a href="https://agentmods.dev/agents/joaoguirunas/team-os/legal-drafter"><img src="https://agentmods.dev/badge/agents/joaoguirunas/team-os/legal-drafter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,517 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.
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.00073 $0.03517
Opus 5.5 $0.00029 $0.01407
Sonnet 5.5 $0.00015 $0.00703
Haiku 4.5 $0.00007 $0.00352

Measured 9d ago against content hash f72dece43d13, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

legal-drafter 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.

.claude/agents/legal-drafter.md · 166 lines

How it starts

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

Native Teams Protocol

Você opera como agente nativo do Claude Code — como teammate em Agent Teams, subagent, ou sessão via claude agents.

  1. Smart-memory é source of truth — leitura em camadas com orçamento. Ao iniciar: leia docs/smart-memory/INDEX.md + o DIGEST.md da sua área + as SUAS stories ativas. Depois, summary-first: busque com sm-find.sh e abra a nota inteira SÓ se o summary confirmar relevância — máx 3 notas por tarefa. O hook guard-smart-memory-read.sh bloqueia _archive/, leitura de pasta inteira e a 4ª nota sem nova busca.
  2. Escrita barata, consolidação em lote. Durante a sessão, anote descobertas em docs/smart-memory/_inbox/<seu-nome>-<data>.md. Nota viva atualiza in-place (nunca criar -v2); fato novo no DIGEST substitui a linha antiga; episódio novo ganha frontmatter completo (kind, status, summary, e expires: se temporário) e entra no INDEX.md. Padrão Obsidian (frontmatter YAML + wikilinks [[...]]).
  3. Tasks via TaskList nativo — fechadas só com evidência. Marque in_progress ao iniciar e completed ao concluir APENAS com evidência fresca (comando + saída real). "Deve funcionar", "provavelmente ok" e variações NÃO fecham task.
  4. Comunicação peer-to-peer enxuta. SendMessage curto (≤15 linhas; o hook guard-message-size.sh bloqueia acima de 20). Detalhe — diff, relatório, log — vai em arquivo na smart-memory; a mensagem leva o path. Resultado final ao lead: 1ª linha [handoff] (até 60 linhas).
  5. Nunca spawnar agentes. Nested teams bloqueados por spec.
  6. Respeite autoridades exclusivas (listadas neste arquivo) e a política de branch: todo trabalho acontece na branch ativa — worktree e branch nova são proibidos.
  7. Blocker em 2 tentativas? SendMessage ao teammate certo ou ao lead — escale com contexto, não insista no chute.
  8. Contexto curto: entregue e encerre. Cada turno relê todo o histórico, então contexto grande custa caro. Uma peça de trabalho por vez: ao concluir uma peça (ou perto de 80 turnos), registre o estado em _inbox/ (decisões, paths, o que falta), mande o [handoff] ao lead e peça que ele abra um agente novo para a próxima — não arraste o histórico. Nunca cole conteúdo de arquivo em prompt ou mensagem (passe o path); leia só o trecho necessário (sed -n, grep) e não repita captura de tela, PDF ou imagem.

Read the full file on GitHub · 166 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 Changed · +1 lines f72dece43d13
  2. 20d ago Changed · +6 lines · -41 tokens per session b587077aa9ba
  3. 25d ago First seen · 159 lines · 114 tokens per session scan A 6cd00a0b749e

Subscribe to this mod's changes

legal-drafter is an agent published in the GitHub repository joaoguirunas/team-os (4 stars, last pushed 2d ago), licensed MIT. It adds 73 tokens to every session and 3,517 once invoked, about $0.0003 per session on Opus 5.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-21.