Skip to content
legal-sanity logo

Legal Sanity Skill

legal-sanity

Scan code for client project names, proprietary tool references, and legally sensitive content

SKILL.md

Full skill instructions

Legal Sanity Skill

Version: 1.0.0 Category: Workspace Trigger: Before PRs, after code porting, on demand

Quick Start

# Scan a specific submodule
./​scripts/​legal/​legal-sanity-scan.sh --repo=worldenergydata

# Scan all submodules
./​scripts/​legal/​legal-sanity-scan.sh --all

# Scan only git-changed files (fast mode for PRs)
./​scripts/​legal/​legal-sanity-scan.sh --repo=worldenergydata --diff-only

# JSON output for automation
./​scripts/​legal/​legal-sanity-scan.sh --repo=worldenergydata --json

When to Use

  • After code porting: Any time code is imported from a client project
  • Before PR creation: Automated via pr-manager pre-hooks
  • During cross-review: Runs as a mandatory pre-gate before Codex/​Gemini
  • On demand: When adding new deny-list patterns or auditing repos

How It Works

  1. Deny lists define patterns to block:
    • Global: .legal-deny-list.yaml (workspace root)
    • Per-project: <submodule>/​.legal-deny-list.yaml
  2. Scanner merges both lists and runs rg (ripgrep) against the target
  3. Exclusions skip files like .git/, *.md, *.lock
  4. Exit code: 0 = pass, 1 = block violations found

Deny List Format

version: "1.0"
updated: "2026-02-02"

client_references:
  - pattern: "CLIENT_NAME"
    case_sensitive: true
    description: "Why this is blocked"

proprietary_tools:
  - pattern: "ToolName"
    case_sensitive: false
    description: "Client proprietary tool"

exclusions:
  - ".legal-deny-list.yaml"
  - ".git/"

default_severity: "block"

Execution Checklist

When invoked as a skill:

  1. Identify target scope (specific repo, all repos, or diff-only)
  2. Run the scan script with appropriate flags
  3. If violations found:
    • List each violation with file:line detail
    • Suggest replacement text
    • Block PR creation until resolved
  4. If clean:
    • Report PASS
    • Proceed to next review gate

Output Format

Terminal (default)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Legal Sanity Scanner
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Scanning: worldenergydata
  RESULT: PASS — no violations found
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

JSON (--json)

{"repo":"worldenergydata","pattern":"ENIGMA","file":"src/​main.py","line":42,"severity":"block"}

Related

  • Rule file: .claude/​rules/​legal-compliance.md
  • Workflow: .claude/​skills/​_internal/​workflows/​legal-sanity-review/​SKILL.md
  • Cross-review: .claude/​skills/​_internal/​workflows/​cross-review-policy/​SKILL.md

More Productivity & Planning skills

brainstorming logo
Productivity & Planning

brainstorming

Structured design dialogue that validates ideas before implementation begins.

295.4K 385.7K
View
ui-ux-pro-max logo
Productivity & Planning

ui-ux-pro-max

Comprehensive design intelligence for web and mobile UI/UX across 10 technology stacks.

133.1K 383.9K
View
writing-plans logo
Productivity & Planning

writing-plans

Comprehensive implementation plans for multi-step tasks, breaking down specs into bite-sized, testable steps.

295.4K 268K
View
using-superpowers logo
Productivity & Planning

using-superpowers

Introduction to the obra skills system with mandatory skill invocation rules and best practices.

295.4K 259.8K
View
executing-plans logo
Productivity & Planning

executing-plans

Execute a written implementation plan with critical review and task checkpoints.

295.4K 229.1K
View
dispatching-parallel-agents logo
Productivity & Planning

dispatching-parallel-agents

Delegate independent tasks to specialized agents working concurrently with isolated context.

295.4K 206.3K
View
using-git-worktrees logo
Productivity & Planning

using-git-worktrees

Isolated git worktrees with smart directory selection and safety verification.

295.4K 205.2K
View
webapp-testing logo
Productivity & Planning

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

179.7K 170.6K
View
content-strategy logo
Productivity & Planning

content-strategy

Plan searchable and shareable content that drives traffic, builds authority, and generates leads.

53.3K 150.9K
View
repo-intake-and-plan logo
Productivity & Planning

repo-intake-and-plan

README-first repository scanner that extracts commands and classifies reproduction candidates without executing them.

497 139.6K
View
marketing-ideas logo
Productivity & Planning

marketing-ideas

Brainstorm and prioritize marketing strategies tailored to your SaaS stage, budget, and goals.

53.3K 137.2K
View
site-architecture logo
Productivity & Planning

site-architecture

Plan and optimize your website's page hierarchy, navigation, URL structure, and internal linking.

53.3K 112.8K
View

Productivity AI tools

Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View
SaveDay logo
Productivity

SaveDay

Capture, organize, and utilize your knowledge effortlessly.

Free
View
Any Summary logo
Productivity

Any Summary

Instant Summaries of Audio & Video Interviews with AnySummary

Freemium
View
M
Productivity

Map This

Transform PDFs into engaging mind maps.

Freemium
View
ChatPDF logo
Productivity

ChatPDF

Chat with any PDF instantly

Free
View
I
Productivity

intellisay

Create an optimal daily plan using your voice

Paid
View
A
Productivity

Aurora AI

A productivity platform to centralize organizational knowledge and workflows with contextual AI assistance.

Paid
View
AskYourPDF logo
Productivity

AskYourPDF

AskYourPDF Pricing Plans: Tailored to Your Needs

Free
View