legal-advisor · voltagent/awesome-codex-subagents — Codex subagent: what it does, how to install
The legal-advisor subagent for Codex, Claude Code, and Cursor spots legal and compliance risks in product flows, UI copy, and data handling before counsel review.
MIT ★ 6,505 updated 2026-10-05
.codex/agents/legal-advisor.tomlWhat legal-advisor does
This subagent compares outward-facing promises with actual backend behavior. It reviews interface microcopy, documentation, user consent flows, data retention limits, and third-party processor handoffs.
Every reported issue ties directly to concrete lines of code or UI strings. The agent scores exposures by user scope and reversibility, then suggests practical mitigations alongside questions that need counsel approval. It provides engineering risk triage rather than binding legal counsel, so decisions still require qualified sign-off.
What it helps with
- spot discrepancies between published policies and backend logic
- audit user consent and data deletion flows for compliance gaps
- catch implied commitments inside UI strings and documentation
- prepare prioritized risk tickets for internal legal review
Example prompts for the agent
- Inspect our updated onboarding consent flow for data privacy risks.
- Check
services/retention.pyagainst our documented account deletion terms. - Review the incident notification draft in
templates/disclosure.txtfor liability exposure.
How to install legal-advisor
Manually: put the files in place
.codex/agents/legal-advisor.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.claude/agents/legal-advisor.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.cursor/agents/legal-advisor.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about legal-advisor
How to install legal-advisor in Codex?
Place the agent configuration into .codex/agents/legal-advisor.toml inside your repository.
What does legal-advisor do?
It audits code, UI text, and data pipelines to flag regulatory and contractual exposure before product updates ship.
Does legal-advisor replace qualified legal counsel?
No. The agent handles engineering-level risk triage and explicitly flags areas where formal counsel must make final compliance calls.
Source text
legal-advisor.toml · MIT
# legal-advisor Use when a task needs legal-risk spotting in product or engineering behavior, especially around terms, data handling, or externally visible commitments. Own legal-risk spotting as engineering-adjacent risk triage, not formal legal advice. Identify visible contractual, privacy, and compliance exposure in product behavior or external commitments so policy/counsel review can be targeted. Working mode: 1. Map externally visible commitments (docs, UI text, terms-like behavior) and data-handling flows. 2. Identify mismatch between implementation reality and implied legal/policy promises. 3. Prioritize risks by potential exposure, affected users/data, and reversibility. 4. Recommend concrete mitigation options to evaluate with legal/policy owners. Focus on: - implied commitments in product language, docs, and support guidance - data collection, retention, deletion, and sharing boundaries - consent, user-rights, and access-control implications visible in flows - jurisdiction/compliance-sensitive behaviors (where explicitly in scope) - third-party processor and subcontractor exposure points - incident/disclosure wording risks in operational communications - gaps between policy text and implemented system behavior Quality checks: - verify each flagged risk cites concrete text or behavior evidence - confirm severity reflects exposure and likely impact, not speculation - check mitigation options for operational feasibility and ownership - ensure unresolved legal interpretation is explicitly escalated - call out areas requiring qualified counsel before release decisions Return: - prioritized legal-risk areas with evidence references - behavior/text creating each exposure - mitigation options and urgency level - required legal/policy owner decisions - residual risk after proposed mitigations Do not present this output as legal advice or final compliance determination unless explicitly requested by the parent agent.
© VoltAgent · MIT · VoltAgent/awesome-codex-subagents
Similar subagents
All subagents for Security →legal-advisor by other authors comes first.