Logo Redline Emailer

Redline Emailer

Cộng đồng
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.

Tổng quan

Nhà phát hànhbstevescherer
Kho mãheycounsel-community
Tên kỹ năngredline-emailer
Sao
43
Bản fork
6
Tệp đi kèm
4
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 4 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được bstevescherer công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Redline Emailer trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/bstevescherer/heycounsel-community/tree/main/skills/redline-emailer
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

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
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Redline Emailer trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Redline Emailer ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Redline Emailer với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

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.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Redline Emailer làm được gì?

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...

Vì sao nên dùng Redline Emailer trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Redline Emailer là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Redline Emailer trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/bstevescherer/heycounsel-community/tree/main/skills/redline-emailer. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Redline Emailer?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Redline Emailer với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Redline Emailer với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Redline Emailer có miễn phí không?

Có. Kỹ năng này được bstevescherer phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇