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 ★
- Part 4 — Generate AGENTS.md And AI Agent Configuration Files — I'll help you create the instruction files that will guide your AI coding assistant to build your MVP 2.1k ★
- Llmwiki — Open Source Implementation of Karpathy's LLM Wiki 1.5k ★
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
Foundations
Manage BOS-AI foundation documents handoff - scan, validate, extract to structured YAML
AI Gate
AI verification for G4 — eval suite against baseline, red-team status, guardrail verification, drift check
Follow Up AI
Autonomous 3-stage AI agent (Extractor ➔ Prioritizer ➔ Drafter) that analyzes multi-channel sales conversation
Clawdbot Skill Parallel
High-accuracy web research via Parallel.ai API - outperforms Perplexity and Exa on benchmarks. Rich excerpts,
Related Agents
Memory Extractor Agent
You extract perception changes from Claude Code session transcripts - the "aha moments" where understanding sh
Research Insight Extractor
Extract actionable improvement proposals from a completed research entry by mapping external tool patterns to
Extractor
Cheap structured extraction. Capabilities - extract, classify, summarise-single-source, structured-output. Use