legal-analyst

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

A legal research assistant that looks for laws, regulations, court decisions, legal writing, and the company’s contract history. It presents claims with primary sources, article references or case numbers and dates, and separates findings from interpretation.

In plain words
What is it for?
Use it to research a legal question, check a proposed position, and prepare sourced evidence for a lawyer or decision-maker.
Why use it?
It helps replace unsupported legal claims with traceable evidence. It does not give a legal opinion, leaving the final decision to people responsible for it.

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 research a legal question, check a proposed position, and prepare sourced evidence for a lawyer or decision-maker.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/joaoguirunas/team-os/legal-analyst"><img src="https://agentmods.dev/badge/agents/joaoguirunas/team-os/legal-analyst.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 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,368 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.00074 $0.03368
Opus 5.5 $0.00030 $0.01347
Sonnet 5.5 $0.00015 $0.00674
Haiku 4.5 $0.00007 $0.00337

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

Security

Grade A, and why

legal-analyst 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 4d 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-analyst.md · 165 lines

How it starts

The opening of the file, as written. The whole thing — 165 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.
  9. Não trave a máquina do usuário. Antes de processo local pesado (transcrição, IA local, render de vídeo, build grande, navegadores de teste) ou de rodar várias cópias de um comando, meça com /machine-resources (check-resources.sh --per-job-gb N) e respeite o MAX_PARALLEL. Processo que já usa todos os núcleos não acelera em paralelo: prefira um processo com vários arquivos ou fila sequencial. Acompanhe a memória entre jobs e pare o lote se o swap subir.

Read the full file on GitHub · 165 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. 4d ago Changed 6c03eddcafd3
  2. 17d ago Changed · +1 lines 23ba771f5de8
  3. 1mo ago Changed · +1 lines 0d5c6a5c30b3
  4. 1mo ago Changed · +1 lines ff6d1f5faa15
  5. 2mo ago Changed · +6 lines · -27 tokens per session 2a6826650aa3
  6. 2mo ago First seen · 156 lines · 101 tokens per session scan A 88065e11883e

Subscribe to this mod's changes

legal-analyst is an agent published in the GitHub repository joaoguirunas/team-os (8 stars, last pushed 4d ago), licensed MIT. It adds 74 tokens to every session and 3,368 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.

Related

legal-analyst compared with agents from other repositories

legal-analyst next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
legal-analystjoaoguirunas/team-osAgent84d agoMITA74Claude Code
fehlzeiten-registerKlotzkette/claude-fuer-deutsches-rechtAgent2.0kyesterdayApache-2.0A179Claude Code
playwright-test-generatormicrosoft/playwrightAgent102ktodayApache-2.0A151Claude Code
.NET-Notebook-Migration-Agentmicrosoft/ai-agents-for-beginnersAgent82kyesterdayMITA33Claude Code
AVM Owner Triagegithub/awesome-copilotAgent42ktodayMITA61Claude Code
Ultimate Transparent Thinking Beast Modegithub/awesome-copilotAgent42ktodayMITA11Claude Code
Pimcore Expertgithub/awesome-copilotAgent42ktodayMITA26Claude Code