xiaohongshu
xiaohongshu
merge-book-cover
Merge a cover image into a PDF book while preserving aspect ratio and matching width. Use when the user wants to "merge cover", "combine pdf", "fix cover size", or "add cover image".
Full skill instructions
Merges a cover image (PNG/JPG) into an existing PDF book, ensuring the cover matches the book's page width exactly while preserving its aspect ratio.
Why? Solving the problem of misaligned or distorted cover pages when combining images with PDF documents programmatically.
assets/cover.png exists.docs/Data-Science-with-Python.pdf exists.python3 .agent/skills/merge-book-cover/scripts/merge_cover.pyimg2pdf, pikepdf, PillowEnsure the required Python packages are installed.
python3 -m pip install img2pdf pikepdf Pillow
Ensure the source files are in place:
assets/cover.pngdocs/Data-Science-with-Python.pdfExecute the script to resize the cover and merge it.
python3 .agent/skills/merge-book-cover/scripts/merge_cover.py
[!TIP] The script automatically detects the width of the book's first page and scales the cover to match it perfectly, avoiding white margins or distortion.
Check the output file: docs/Data-Science-with-Python_FINAL.pdf.
| Problem | Cause | Solution |
|---|---|---|
ModuleNotFoundError | Missing Python packages | Run python3 -m pip install ... |
FileNotFoundError | Missing cover or book PDF | check paths assets/cover.png and docs/... |
| Aspect Ratio issues | N/A | Script auto-calculates height based on width. |
python3 .agent/skills/merge-book-cover/scripts/merge_cover.pydocs/Data-Science-with-Python_FINAL.pdf.xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience