Seal Extractor — AI skill for Claude Code
Extract red seals (公章/印章) from scanned documents — OpenCV color filtering + AI gap repair.
How to install Seal Extractor
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open 24kchengYe/seal-extractor and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Seal Extractor does
Extract red seals (公章/印章) from scanned documents — OpenCV color filtering + AI gap repair. Claude Code skill.
Alternatives in AI
- Design Md Chrome — Chrome extension to extract styles from any website and generate DESIGN.md files and design skills for AI base 2.7k ★
- Human In The Loop MCP Server — A powerful MCP Server that enables AI assistants like Claude to interact with humans through intuitive GUI dia 159 ★
- OpenTor — Tor/Dark Web access skill for AI agents (OpenCode & Claude Code) 85 ★
README
Seal Extractor
**Extract red seals (公章/印章) from scanned documents with pixel-perfect fidelity.**
A Claude Code skill that removes black table lines, handwritten text, and annotations from scanned seals — preserving the original red ink pixels exactly as they are, with optional AI-powered gap repair.
The Problem
When you scan a document with a red official seal (公章), the seal overlaps with:
- Black table grid lines
- Handwritten annotations (dates, "盖章", signatures)
- Other printed text
You need the clean seal isolated — for archiving, reprinting, or digital use — but manual Photoshop work is tedious, and AI image generators change the font style.
The Solution
A two-step pipeline that combines the best of both worlds:
Step 1: OpenCV Color Filtering (local, fast, deterministic)
- HSV + Lab color space analysis detects red pixels with high precision
- Black/gray elements (lines, text) are detected and removed
- Morphological operations clean noise and fill small internal gaps
- Result: original seal pixels preserved exactly — zero AI hallucination
Step 2: AI Gap Repair (optional, via OpenRouter)
- Where black lines crossed over the red seal, small white gaps remain after Step 1
- Calls Gemini image models to naturally inpaint these gaps
- Preserves original font style and proportions
- Models tried in order: Gemini 3 Pro → 3.1 Flash → 2.5 Flash
Installation
claude skill install 24kchengYe/seal-extractor
Or clone manually:
cd ~/.claude/skills/
git clone https://github.com/24kchengYe/seal-extractor.git
Dependencies
pip install opencv-python numpy
Usage
In Claude Code
Just tell Claude what you need:
提取这个公章
extract the seal from this image
把公章抠出来,去掉黑线
Claude will automatically use this skill.
Command Line
**Basic extraction (transparent background):**
python scripts/extract_seal.py input.png -o seal_clean.png
**White background:**
python scripts/extr
Related Skills
Ecom Agent
Free ecommerce tools + original research, built in the open by an AI agent on a $1k budget. We scanned 70 bran
MCP Server Code Extractor
🎯 Precise code extraction for AI assistants - MCP server using tree-sitter to extract functions, classes & sn
Livewire Snapshot Extractor
Extract Livewire component snapshots (v2, v3, v4) as structured context for Claude Code and other AI coding as
Foundations
Manage BOS-AI foundation documents handoff - scan, validate, extract to structured YAML
5dive Council
Governance for AI agents: a multi-agent council that deliberates, votes by quorum on a bar scaled to the stake
Stealth Chrome Devtools MCP
Undetectable browser automation for AI agents via MCP. Stealth Chrome DevTools with smart profile management,
Related Agents
Video Insights Extractor
Watches a video (TikTok/YouTube/local file) and extracts insights and to-dos, filtering out anything the user'
Design System Curator
Curates design tokens (color/type/space/radius/motion), component specs (props/states/a11y/content slots), and
Memory Extractor Agent
You extract perception changes from Claude Code session transcripts - the "aha moments" where understanding sh