Redline Emailer logo

Redline Emailer

Community
bstevescherer
redline-emailer

Translates contract redlines into client-ready or opposing-counsel emails. Accepts three input modes: (1) a .docx with tracked changes, (2) a redlined PDF with strikethrough/underline formatting, or (3) a verbal description of changes. Produces a copy-paste-ready email, tone-matched to the recipient: plain-English for own clients, professional legal cover for opposing counsel. Use when the attorney says "write the redline email", "summarize these changes for the client", "draft a cover email for the redline", "explain these edits to opposing counsel", or "turn this redline into an email". Do NOT use for drafting contracts or generating redlines — use the relevant drafter skill. Do NOT use for diffing two clean (non-redlined) document versions.

Overview

Publisherbstevescherer
Repositoryheycounsel-community
Skill nameredline-emailer
Stars
43
Forks
6
Bundled files
4
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by bstevescherer on GitHub. Read the source before you install it.

Installation

Install the Redline Emailer AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/bstevescherer/heycounsel-community/tree/main/skills/redline-emailer
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/bstevescherer/heycounsel-community.git /tmp/heycounsel-community
mkdir -p .claude/skills
cp -r /tmp/heycounsel-community/skills/redline-emailer .claude/skills/redline-emailer
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Redline Emailer in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Redline Emailer on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Redline Emailer is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Input Modes

ModeTriggerInput
A: .docx Tracked ChangesUser provides a .docx with Track ChangesParse Word XML for w:del/w:ins elements
B: Redlined PDFUser provides a .pdf with redline formattingParse PDF for strikethrough/underline/color-coded text
C: Verbal DescriptionUser describes changes, no fileWork from the attorney's description

Auto-detect the mode from what the user provides. See references/intake-questions.md Q1.


Instructions

Step 1: Load References

Read before doing anything:

  • references/intake-questions.md — short intake flow (4 questions, most auto-detectable)
  • references/email-templates.md — tone guides and structural templates for both recipient types
  • references/validation-rules.md — quality checks per recipient type

Step 2: Run Intake

Follow references/intake-questions.md. This should take 60 seconds or less.

What you must know before proceeding:

  1. Input mode (auto-detect from file type)
  2. Recipient: client or opposing counsel
  3. Contract identity: title, parties
  4. Special instructions (if any)

Do NOT re-ask questions the attorney already answered in their initial request. If the attorney says "write the redline email for opposing counsel" and drops a .docx, you have all four answers — go straight to Step 3.

Step 3: Extract Changes

This step varies by input mode.


Mode A: .docx with Tracked Changes

Extract changes from Word XML. The .docx format uses the same elements that redline_engine.py writes — we're reading them instead.

Namespace:

W = 'http://schemas.openxmlformats.org/wordprocessingml/2006/main'

Element patterns:

  • <w:del> → <w:r> → <w:delText> = deleted text
  • <w:ins> → <w:r> → <w:t> = inserted text

Extraction approach:

  1. Load the .docx with python-docx: doc = Document(filepath)
  2. Walk doc.element.body looking for {W}del and {W}ins elements
  3. Substitutions: When w:del and w:ins are siblings in the same w:p, they represent a substitution (old → new)
  4. Pure deletions: A w:del with no adjacent w:ins = text was removed
  5. Pure additions: A w:ins with no adjacent w:del = text was added
  6. Comments: Parse word/comments.xml from the .docx zip archive for w:comment elements — these provide reviewer context for each change. Match comments to changes via w:commentRangeStart / w:commentReference IDs.

Grouping: For each change, find the nearest preceding paragraph with a heading style (e.g., Heading 1, Heading 2) to determine which contract section it belongs to. If no heading styles are used, fall back to pattern matching: "Section X.X", "Article Y", numbered paragraphs.

Output: A structured change list:

[
  { section: "Section 4.2 — Limitation of Liability",
    type: "substitution",
    old: "twelve (12) months",
    new: "twenty-four (24) months",
    comment: "Per client instruction — doubled the liability cap" },
  ...
]

Mode B: Redlined PDF

Parse the PDF for redline formatting. Redlined PDFs come in two flavors — detect which one and apply the right strategy.

Format detection: Scan the first 2-3 pages using PyMuPDF (fitz):

python
import fitz
doc = fitz.open(filepath)
page = doc[0]
blocks = page.get_text("dict")["blocks"]

Check text spans for formatting flags:

  • Strikethrough flag present → Strikethrough + underline format
  • Red/colored text without strikethrough → Track Changes exported to PDF
  • Neither → Uncertain format (trigger fallback)

Strikethrough + underline format:

  • Spans with strikethrough flag = deleted text
  • Spans with underline flag (especially if also colored/red) = inserted text
  • The fitz span flags field: bit 0x100 = strikethrough (check via span["flags"] & 2**8)
  • Group by surrounding text context and section headings

Track Changes exported to PDF:

  • Look for visual patterns: red text, margin annotations, inline "[Deleted: ...]" text
  • Balloon-style comments in margins may appear as separate text blocks positioned outside the main content area (check x-coordinate relative to page margins)
  • This format is harder to parse reliably — extract what you can

Fallback (uncertain format or low-confidence extraction): Present the extracted text to the attorney:

"I extracted the following text from the PDF but I'm not fully confident in which parts are additions vs. deletions. Can you confirm or correct?"

Show the extracted text with your best guess at markup, and let the attorney correct before proceeding to email generation.

Grouping: Same heading/section detection as Mode A, applied to the PDF text flow.


Mode C: Verbal Description

No document processing. The attorney describes the changes. Structure their description into the same change list format during email generation.

If the description is unstructured, ask:

"Can you organize by section or topic? For example: 'In the payment terms, we changed X to Y. In the liability section, we added Z.'"

If the attorney prefers to stay informal, work with what they give you.


Step 4: Generate Email

Using the change list from Step 3 and the recipient type from Step 2:

  1. Select the appropriate template from references/email-templates.md (Template A for client, Template B for counsel)
  2. Map each change to the appropriate email section
  3. Apply the tone rules for the selected recipient type
  4. Check for tone calibration overrides (casual, contentious, sophisticated client, etc.)
  5. Fill in subject line, greeting, body sections, and sign-off
  6. Leave [Attorney Name] / [Firm Name] / [Client Name] as placeholders unless provided during intake

For client emails: Group changes by topic/impact, not section number. Each change gets a "what it means for you" explanation.

For counsel emails: List changes by section number with precise references. Keep each bullet to 1-2 sentences.

For large redlines (20+ changes): Prioritize commercially significant changes. Group minor/conforming changes under a single note: "Additional conforming changes have been made throughout."

Step 5: Validate and Deliver

Run every applicable check from references/validation-rules.md:

  • Universal checks 1-4 (both recipients)
  • Client checks 5-8 (Template A only)
  • Counsel checks 9-12 (Template B only)

Fix any failures silently. Do not show the validation output — just deliver a clean email.

Deliver the email as plain text in the conversation, formatted and ready to copy-paste. Include the subject line on its own line at the top.

After delivery, offer:

"Want me to adjust the tone, add/remove anything, or generate a version for [the other recipient type]?"


Performance Notes

  • The intake should feel instant. Do not ask questions you can answer from the document or from context.
  • If extraction (Mode A or B) takes more than a few seconds, give the attorney a brief status: "Reading the tracked changes..." / "Parsing the redlined PDF..."
  • The email should read like YOU wrote it, not like a template was filled in. Vary sentence structure. Avoid repetitive bullet patterns.
  • For Mode B (PDF), be honest about extraction confidence. A partially-correct extraction that the attorney can fix is better than a confidently-wrong one.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Redline Emailer AI skill do?

Translates contract redlines into client-ready or opposing-counsel emails. Accepts three input modes: (1) a .docx with tracked changes, (2) a redlined PDF with strikethrough/underline formatting, or (3) a verbal description of changes. Produces a copy-paste-ready email, tone-matched to the recipient: plain-English for own clients, professional legal cover for opposing counsel. Use when the attorney says "write the redline email", "summarize these changes for the client", "draft a cover email for the redline", "explain these edits to opposing counsel", or "turn this redline into an email". D...

Why use Redline Emailer on TypingMind?

Because you install it once and use it with any model. Redline Emailer is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Redline Emailer in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/bstevescherer/heycounsel-community/tree/main/skills/redline-emailer. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Redline Emailer?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Redline Emailer?

As many as you like. As long as a model supports skills, you can use Redline Emailer with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Redline Emailer AI skill free?

Yes. It is published on GitHub by bstevescherer under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇