Pratik Singhal

nano-banana-pdf-edit

办公效率v1.0.1
作者:Pratik Singhal更新于 2026-05-17共 2 个版本 · 最新版本发布于 2026-02-21nano-banana-pdf-skill@clawhub_ps06756/nano-banana-pdf-skill
PDF 处理#PDF

据 AlphaMoat 统计,截至 2026-09,nano-banana-pdf-edit 累计下载 1,828 次、获 3 个星标,在全部 5,078 个 AI 技能中排名第 4,558 位,在「办公效率」分类(435 个)中排名第 360 位。

累计安装
150
累计下载
1,828
星标
3
全站排名
#4,558
全站前 90% · 「办公效率」前 83%
平台累计安装累计下载星标评论
ClawHub ↗501,7743-
SkillHub ↗1501,8283—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

该技能将 PDF 页面转换为图像,发送到 Google Gemini 进行视觉编辑,再合并回 PDF 并通过 OCR 恢复文本层。它需要相关命令行依赖和付费 Gemini API;页面图像及某些流程中的全文可能发送到 Google。使用前应确认文档允许外部处理,并在安装依赖、产生付费 API 调用或发送文件内容前取得明确批准;机密、受监管或客户文档需遵循数据政策。输出应检查视觉效果和 OCR 文字准确度。 文档流程需要 nano-pdf、Poppler、Tesseract 和付费 GEMINI_API_KEY。

资料发布于 2026-10-29

可以用来做什么

  • 修正 PDF 页面中的文字、图表或视觉样式
  • 为现有演示文稿或报告添加视觉页面
  • 在明确授权后对 PDF 进行多页一致性编辑

什么时候用

  • 用户明确要求 AI 视觉编辑 PDF 且文件允许发送至外部模型时
  • 已确认数据政策、依赖环境、付费 API 及输出路径时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

先解释将发送到 Gemini 的文件内容、可能的费用和依赖,再提出编辑方案;不要安装依赖、上传文件或调用 API。

月度数据趋势

累计下载1,828
5921,2561,9202026-03 · 累计下载 6842026-05 · 累计下载 1,2032026-06 · 累计下载 1,3332026-07 · 累计下载 1,5512026-08 · 累计下载 1,6522026-09 · 累计下载 1,82826-0326-09
星标3
2332026-03 · 星标 22026-05 · 星标 32026-06 · 星标 32026-07 · 星标 32026-08 · 星标 32026-09 · 星标 326-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-091,828—3
2026-081,652+6.5%3
2026-071,551+16.4%3
2026-061,333+10.8%3
2026-051,203—3
2026-03684—2

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

5.8 KB · ClawHub v1.0.1
---
name: nano-pdf-edit
description: Edit PDF files visually using natural language with the nano-pdf CLI tool, powered by Google's Gemini 3 Pro Image (Nano Banana). Use this skill whenever the user wants to edit, modify, or update PDF slides or pages using AI — including fixing typos, updating charts/graphs, changing colors or branding, adding new slides, modifying text, or making any visual change to a PDF deck or report. Also trigger when the user mentions "nano-pdf", "nano pdf", "edit my pdf", "update my slides", "fix my deck", or wants AI-powered changes to PDF content. Even if the user just says "change the title on page 3" or "fix the typo on slide 5" for a PDF file, this skill applies. Do NOT use for extracting text, merging/splitting PDFs, filling forms, or other non-visual PDF operations.
version: 1.0.1
metadata:
   openclaw:
      requires:
         env:
            - GEMINI_API_KEY
         bins:
展开全部(共 123 行)
            - python3
      primaryEnv: GEMINI_API_KEY
      emoji: "📄"
      homepage: https://github.com/ps06756/nano-banana-pdf-skill
---

# Nano PDF Editing Skill

Edit PDF files with natural language prompts using the **nano-pdf** CLI tool.

Nano-PDF converts PDF pages to images, sends them to Google's Gemini 3 Pro Image with your edit instructions, then stitches the AI-edited pages back into the PDF — preserving searchable text via OCR re-hydration.

**Source**: https://github.com/gavrielc/Nano-PDF

## Prerequisites

Before running any nano-pdf command, ensure the following dependencies are installed. If any are missing, install them before proceeding:

1. **nano-pdf** — `pip install nano-pdf` (or use `uvx nano-pdf` to run without installing)
2. **poppler** — PDF-to-image rendering (`brew install poppler` on macOS / `sudo apt-get install poppler-utils` on Linux)
3. **tesseract** — OCR for text layer restoration (`brew install tesseract` on macOS / `sudo apt-get install tesseract-ocr` on Linux)
4. **GEMINI_API_KEY** — A **paid** Google Gemini API key (free tier does not support image generation). Get one at https://aistudio.google.com/api-keys — then `export GEMINI_API_KEY="your_key"`

## Two Commands

### `nano-pdf edit` — Modify existing pages

```bash
nano-pdf edit <file.pdf> <page> "<prompt>" [<page> "<prompt>" ...] [options]
```

Pages are 1-indexed. Multiple page+prompt pairs can be provided and are processed in parallel.

### `nano-pdf add` — Insert new AI-generated slides

```bash
nano-pdf add <file.pdf> <position> "<prompt>" [options]
```

Position 0 inserts at the beginning. The new slide automatically matches the visual style of the existing deck. Document context is enabled by default for `add`.

## Options Reference

For full details on all available flags, read `references/options.md` in this skill directory.

Key flags:
- `--output "new.pdf"` — Output filename (default: `edited_<original>.pdf`)
- `--resolution "4K"` — `4K` (default), `2K`, or `1K`
- `--style-refs "1,5"` — Pages to use as style references
- `--use-context` / `--no-use-context` — Include full PDF text as model context
- `--disable-google-search` — Prevent model from using Google Search

## Workflow

When a user asks to edit a PDF:

1. **Check dependencies** — Ensure nano-pdf, poppler, tesseract, and GEMINI_API_KEY are available. If any are missing, tell the user what to install and stop.
2. **Identify the edit** — Determine which page(s) need changes and what the prompt should be
3. **Choose the right command** — `edit` for modifying existing pages, `add` for inserting new ones
4. **Pick appropriate options**:
   - Use `--style-refs` if the user wants a specific visual style from certain pages
   - Use `--use-context` when editing multiple pages that need to be consistent
   - Use `--resolution "2K"` if speed matters more than quality
5. **Run nano-pdf** and present the output PDF to the user

## Prompt Writing Tips

The quality of the edit depends heavily on the prompt. Follow these guidelines:

- **Be specific**: "Change the title from 'Overview' to 'Q3 Summary'" beats "update the title"
- **Reference visible elements**: "The bar chart on the left side" helps the model locate what to change
- **One focused change per prompt**: For complex edits, use multiple page+prompt pairs
- **Mention what to preserve**: "Keep the layout the same but change the header color to blue"
- **Use style refs for consistency**: When updating branding across pages, point at a reference page

## Examples

For a comprehensive set of examples covering common use cases (typos, charts, branding, adding slides, batch edits), read `references/examples.md` in this skill directory.

Quick reference:

```bash
# Fix a typo on page 3
nano-pdf edit report.pdf 3 "Fix 'recieve' to 'receive'"

# Update chart data
nano-pdf edit deck.pdf 12 "Update the revenue chart to show Q3 at $2.5M"

# Multi-page branding update
nano-pdf edit slides.pdf \
  1 "Change header background to dark blue, text to white" \
  2 "Update the logo to show 'NewCorp' instead of 'OldCorp'" \
  --style-refs "1" --output branded.pdf

# Add a new title slide at the beginning
nano-pdf add deck.pdf 0 "Title slide: 'Annual Review 2025' with subtitle 'Building the Future'"

# Add a summary slide after page 5 using document context
nano-pdf add deck.pdf 5 "Summary slide with key takeaways as bullet points"
```

## Troubleshooting

| Issue | Solution |
|-------|----------|
| `Missing system dependencies` | Install missing deps (see Prerequisites above), restart terminal |
| `GEMINI_API_KEY not found` | `export GEMINI_API_KEY="your_key"` |
| `PAID API key required` | Enable billing at https://aistudio.google.com/api-keys |
| Style mismatch | Use `--style-refs "1,3"` pointing at pages with desired style |
| Slow processing | Use `--resolution "2K"` or `"1K"` |
| Bad OCR / text layer | Use `--resolution "4K"` for better OCR accuracy |
| Model ignores part of prompt | Break into smaller, focused edits across multiple runs |

「办公效率」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。