Sort my legal inbox

From ja-818/houston · View interactive version

Sort my legal inbox is an AI agent skill from the GitHub repository ja-818/houston. Sweep your inbox for legal stuff (contracts to review, NDAs, customer data requests, anything that needs a lawyer's attention) and tell you what needs you and what doesn't. I just sort and summarize, I never reply.

How to use this skill

Skill file

Sort My Legal Inbox

When to use

Steps

<!-- houston-workflow:v1 -->

  1. Read shared context: context/legal-context.md. If missing/empty, ask the user in plain language: "I need a few basics about your company first. Want to set those up now?" Then run set-up-my-legal-info if yes. Stop until that's done.
  2. Read config: config/counterparty-stack.json. If your inbox isn't connected, ask the user in plain language: "I need to connect your inbox to look through it. Want to connect Gmail or Outlook now?" Stop until connected.
  3. Discover inbox tool via Composio. Run composio search inbox for tool slug. Confirm slug matches counterparty-stack.inboxCategory.
  4. Pull inbound. Default window: last 7 days (or user N). Query inbox slug for likely-legal messages - contract attachments (.pdf, .docx), law-firm sender domains, subject keywords ("NDA", "MSA", "DPA", "DSR", "subpoena", "office action", "terms", "agreement"), threads replying to prior legal inbound.
  5. Classify each item. Apply rubric, pick one bucket:
  1. Route each item. Recommend one:
  1. Write summary to intake-summaries/{YYYY-MM-DD}.md atomically (*.tmp → rename). Structure: counts at top ("7 items: 3 NDA, 1 MSA, 1 DSR, 2 other"), then one section per item with From, Subject, Received, Classification, One-line summary, Recommended route.
  2. Append to outputs.json - read existing array, add { id, type: "intake-summary", title, summary, path, status: "draft", createdAt, updatedAt, attorneyReviewRequired }. Set attorneyReviewRequired: true if any item flagged for attorney review.
  3. Summarize to user. Plain language. One short paragraph: "I found {N} legal items. {X} NDAs (with the safe ones flagged), {Y} customer contracts, {Z} that need a real lawyer's eyes. Want me to draft replies for the safe ones, or fully review the customer contracts?" Never name files or paths.

Never invent

Every classification ties to observed message. If inbox tool errored or returned no data, mark UNKNOWN in summary - don't guess. If attachment unparseable, say so and ask user to paste.

Outputs

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.