Przejdź do treści
Biblioteka skilli
Dokumenty i biuro · Konwersja i formaty

pdf

/pdf

Czyta, tworzy, edytuje, scala, dzieli, wypełnia i sprawdza układ plików PDF w przestrzeni roboczej.

Repozytorium
pilotdeck ↗
Licencja
AGPL-3.0
Ostatnia zmiana repozytorium
27.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
8
Skrypty
3
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

AGPL-3.0, copyleft: przeróbki udostępniane innym muszą mieć tę samą licencję.

Co sprawdzić przed instalacją
  • 3 skrypty w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: assets/starter_pdf.py, scripts/pdf.sh, scripts/pdf_cli.py

Co robi i kiedy

Czyta, tworzy, edytuje, scala, dzieli, wypełnia i sprawdza układ plików PDF w przestrzeni roboczej.

Oryginalny opis (EN)

Read, create, edit, merge, split, rotate, fill, render, and verify workspace PDF files. Use whenever the requested input or deliverable is a .pdf, including extracting text or tables, inspecting metadata and page geometry, generating a new PDF, rearranging pages, filling AcroForm fields, or checking visual layout. Do not use for Google Drive or browser-only PDF workflows.

Jak działa

  1. Hard requirements
  2. Read the relevant references
  3. Prepare the runtime
  4. Route the request
  5. Inspect or extract
  6. Create a PDF
  7. Perform structural operations
  8. Validate and render
  9. Deliver
Sekcje z nagłówków SKILL.md, w oryginale · 141 linii, 752 słów
Podgląd SKILL.md
---
name: pdf
description: Read, create, edit, merge, split, rotate, fill, render, and verify workspace PDF files. Use whenever the requested input or deliverable is a .pdf, including extracting text or tables, inspecting metadata and page geometry, generating a new PDF, rearranging pages, filling AcroForm fields, or checking visual layout. Do not use for Google Drive or browser-only PDF workflows.
---

# PDF

Work with PDFs through the bundled `pdf.sh` workflow. Treat structure extraction and visual rendering as complementary: parsed text is evidence about content, while rendered pages are the evidence for layout.

## Hard requirements

- Preserve every input PDF. Write edits to a distinct output unless the user explicitly requests replacement.
- Use `pdfplumber` for text, table, image, and coordinate-aware inspection; use `pypdf` for page structure, metadata, page operations, and AcroForms; use ReportLab for new PDFs.
- Inspect an existing PDF before changing it. Render it first when layout, page order, form appearance, or visual fidelity matters.
- Create a new PDF from one executable Python builder. Patch and rerun the same builder rather than accumulating one-off scripts.
- Never assume successful text extraction proves that a PDF looks correct.
- Run `audit`, render every final page with Poppler, and inspect every page PNG at full size before delivery. A montage is only an overview.
- Fix clipped or overlapping content, missing glyphs, broken tables, incorrect page order, bad image crops, inconsistent page sizes, and wrong page numbers before delivery.
- Do not depend on Codex-private runtime paths or install Python packages globally.

## Read the relevant references

- Read [creation.md](references/creation.md) before creating or visually redesigning a PDF.
- Read [structure-and-forms.md](references/structure-and-forms.md) before merging, splitting, rotating, editing metadata, or handling forms.
- Read [qa-checklist.md](references/qa-checklist.md) before delivery.

## Prepare the runtime

Resolve the CLI once:

```bash
SKILL_ROOT={{SKILL_ROOT_SHELL}}
PDF_TOOL="$SKILL_ROOT/scripts/pdf.sh"
bash "$PDF_TOOL" check || bash "$PDF_TOOL" fix
```

`fix` creates an isolated Python environment under `${PDF_SKILL_CACHE:-${XDG_CACHE_HOME:-$HOME/.cache}/pilotdeck-pdf}`. Poppler is a system dependency; if `pdfinfo` or `pdftoppm` is missing, follow the platform-specific hint printed by `fix`.

Use the turn-scoped PilotDeck work directory for every intermediate. The host sets `PILOTDECK_WORK_DIR`; the fallback keeps manual runs internal to the project:

```bash
WORKSPACE="${PILOTDECK_WORK_DIR:-$PWD/.pilotdeck/work/manual/<task-slug>}/pdf"
mkdir -p "$WORKSPACE/tmp" "$WORKSPACE/qa"
```

Keep builders, extracted content, split pages, converted files, inspections, renders, and QA reports in `WORKSPACE`. Put only requested deliverables in the project or user-selected output directory. Never create QA directories or other intermediates beside the user's files.

## Route the request

Choose one route:

1. Read-only question: inspect or extract only; do not export a modified PDF.
2. New PDF: scaffold one builder, build, audit, render, inspect, and iterate.
3. Existing PDF structural edit: inspect and render first, make the smallest page-level change, then audit and render again.
4. AcroForm task: inspect fields, fill a distinct output, render every affected page, and verify appearances.

Scanned/image-only PDFs may contain no machine-readable text. Do not call that an extraction failure if rendered pages are valid. OCR is not bundled; disclose the limitation or use a separately available OCR workflow when the user requests it.

## Inspect or extract

Create a compact structural and content overview:

```bash
bash "$PDF_TOOL" inspect \
  --input "$INPUT_PDF" \
  --out "$WORKSPACE/tmp/inspection.json"
```

Extract full page text and detected tables when needed:

```bash
bash "$PDF_TOOL" inspect \
  --input "$INPUT_PDF" \
  --out "$WORKSPACE/tmp/inspection.json" \
  --text-out "$WORKSPACE/tmp/text.json" \
  --tables-out "$WORKSPACE/tmp/tables.json"
```

Do not load a large extraction wholesale when page-level inspection or targeted searching is enough.

## Create a PDF

Scaffold one builder and edit it for the task:

```bash
bash "$PDF_TOOL" scaffold --out "$WORKSPACE/tmp/build_pdf.py"
bash "$PDF_TOOL" build \
  --builder "$WORKSPACE/tmp/build_pdf.py" \
  --out "$FINAL_PDF"
```

The builder must accept `--out <path>`, work offline, embed or register fonts explicitly, and keep page numbering deterministic. Follow [creation.md](references/creation.md).

## Perform structural operations

```bash
bash "$PDF_TOOL" merge --inputs first.pdf second.pdf --out merged.pdf
bash "$PDF_TOOL" split --input source.pdf --out-dir "$WORKSPACE/tmp/pages" --pages "1-3,7"
bash "$PDF_TOOL" rotate --input source.pdf --out rotated.pdf --degrees 90 --pages "2,4-5"
```

For forms:

```bash
bash "$PDF_TOOL" forms-inspect --input form.pdf --out "$WORKSPACE/tmp/fields.json"
bash "$PDF_TOOL" forms-fill \
  --input form.pdf \
  --data "$WORKSPACE/tmp/values.json" \
  --out filled.pdf
```

These operations preserve the source and do not reflow page content. See [structure-and-forms.md](references/structure-and-forms.md).

## Validate and render

Run the final structural audit:

```bash
bash "$PDF_TOOL" audit \
  --input "$FINAL_PDF" \
  --out "$WORKSPACE/qa/audit.json"
```

Render every page and optionally create an overview montage:

```bash
bash "$PDF_TOOL" render \
  --input "$FINAL_PDF" \
  --out-dir "$WORKSPACE/qa/render" \
  --dpi 144 \
  --montage "$WORKSPACE/qa/montage.png"
```

Inspect every `page-*.png` at full resolution. Revise the builder or edit, then rerun audit and render until hard failures are gone and every warning is understood.

After changing this skill or its runtime, run:

```bash
bash "$PDF_TOOL" self-test --out "$WORKSPACE/self-test"
```

## Deliver

Return the final PDF and a concise summary. Mention deliberate limitations such as image-only pages, unsupported dynamic forms, signatures, or preserved source defects. Do not deliver builders, extracted text, JSON reports, renders, runtime files, or scratch artifacts unless requested.
Pliki w paczce (8)
  • SKILL.md 6 KB
  • assets/starter_pdf.py 6 KB
  • references/creation.md 2 KB
  • references/qa-checklist.md 1 KB
  • references/structure-and-forms.md 2 KB
  • runtime/requirements.txt 1 KB
  • scripts/pdf.sh 5 KB
  • scripts/pdf_cli.py 26 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · openbmb/pilotdeck100AGPL-3.0
chris-peterson/fathom100MIT
shunwuyu/ai_lesson100MIT
rongxinzy/rongxinai100AGPL-3.0
mateaix/mateclaw100Apache-2.0
Navinspire-ia/navin100AGPL-3.0
ai-workspace-lab/xworkspace-core-skills100MIT
astrbotdevs/astrbot100AGPL-3.0
wrongstack/wrongstack100MIT

Migawka bazy z 13.11.2026 · wersja paczki 390a962d6a86 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 90pdf-tools
    Tworzy, łączy, dzieli, wypełnia i wyciąga dane z PDF, dobierając bibliotekę do zadania i walidując wynik.
  • 90pdf-skill
    Czyta, tworzy, konwertuje i łączy pliki PDF: wyciąga tekst i tabele, wypełnia formularze, dodaje znak wodny i robi OCR.
  • 95pdf-processing
    Wyciąga tekst i tabele z plików PDF, wypełnia formularze i scala dokumenty w jeden plik.
  • 100pdf-pro
    Tworzy, edytuje, sprawdza i konwertuje PDF-y, wypełnia i spłaszcza formularze, usuwa poufne treści i projektuje układ.
  • 100pdf-official
    Wyciąga tekst i tabele z PDF-ów, tworzy nowe pliki, scala i dzieli dokumenty oraz obsługuje formularze.
  • 100pdf-processing
    Sprawdza, wyciąga, rozpoznaje (OCR), tworzy, łączy, dzieli, redaguje, kompresuje i weryfikuje dokumenty PDF, zachowując pliki źródłowe i wygląd stron.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.