Best for
- Use when the user asks to work with a PDF or convert supported Markdown into a polished PDF in AstrBot.
AstrBotDevs/AstrBot/astrbot/builtin_stars/astrbot/skills/pdf/SKILL.md
Read, create, inspect, merge, split, rotate, encrypt, fill, and validate PDF files. Use when the user asks to work with a PDF or convert supported Markdown into a polished PDF in AstrBot.
Decision brief
Use pypdf for PDF structure operations and validation. Use ReportLab for new page layout. Do not install another PDF library unless the requested feature cannot be implemented safely with the bundled dependencies.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/AstrBotDevs/AstrBot --skill "astrbot/builtin_stars/astrbot/skills/pdf"Inspect the Agent Skill "pdf" from https://github.com/AstrBotDevs/AstrBot/blob/bb9b1878474e5ed65667d5c2c6b7fd6efbc51db4/astrbot/builtin_stars/astrbot/skills/pdf/SKILL.md at commit bb9b1878474e5ed65667d5c2c6b7fd6efbc51db4. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
1. Preserve source files unless the user explicitly requests an in-place change. 2. Inspect the input with pypdf.PdfReader: page count, metadata, encryption, page sizes, text, annotations, and form fields as relevant. 3. Perform the smallest operation that satisfies the request.…
Use astrbotfilereadtool for a quick text extraction when it is sufficient. Use Python with pypdf when page structure or exact metadata matters:
Prefer the bundled deterministic converter:
Use small pypdf scripts directly for ordinary operations.
Read forms.md before modifying AcroForms. Preserve interactivity unless the user requests a flattened result. Validate both the canonical field tree and page widget annotations; a successful render alone is not proof that field values were saved.
Permission review
The documentation includes network, browsing, or remote request actions.
Official: https://github.com/googlefonts/noto-cjk/raw/main/Sans/Variable/TTF/Subset/NotoSansSC-VF.ttfThe documentation includes network, browsing, or remote request actions.
Proxy: https://edgeone.gh-proxy.com/https://github.com/googlefonts/noto-cjk/raw/main/Sans/Variable/TTF/Subset/NotoSansSC-VF.ttfThe documentation asks the agent to read local files, directories, or repositories.
These proxies are not operated by the font project or AstrBot. Their availability and returned content can change. Never send credentials, private repository URLs, or other sensitive data through them. After downloading, verify that the finThe documentation asks the agent to read local files, directories, or repositories.
Do not download a font silently. Obtain user approval when network access or a new file is required, use HTTPS, and keep the downloaded font in a workspace or temporary directory rather than installing it system-wide.Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 89/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 38,567 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Use pypdf for PDF structure operations and validation. Use ReportLab for new page layout. Do not install another PDF library unless the requested feature cannot be implemented safely with the bundled dependencies.
pypdf.PdfReader: page count, metadata, encryption, page sizes, text, annotations, and form fields as relevant.pypdf and verify its page count, expected text or fields, and encryption state.Work in the current workspace unless the user provides another writable location. Keep intermediate files separate from final outputs and remove them when they are no longer needed.
Use astrbot_file_read_tool for a quick text extraction when it is sufficient. Use Python with pypdf when page structure or exact metadata matters:
from pypdf import PdfReader
reader = PdfReader(input_path)
print(len(reader.pages), reader.metadata)
for page_number, page in enumerate(reader.pages, start=1):
print(page_number, page.mediabox, page.rotation)
print(page.extract_text() or "")
Text extraction does not prove that visual layout is correct. Render with pdftoppm when it is available:
pdftoppm -png -r 144 input.pdf rendered/page
Prefer the bundled deterministic converter:
python <this-skill-directory>/scripts/markdown_to_pdf.py input.md output.pdf
The converter intentionally supports a limited Markdown subset:
# through ######)<!-- pagebreak -->It does not interpret raw HTML, images, tables, nested lists, footnotes, or arbitrary Markdown extensions. Simplify unsupported content or explain the limitation instead of silently changing meaning.
Font selection follows this order:
--font path/to/font.ttf or --font path/to/font.ttc.When a broader or embedded font is required and no suitable system font is readable, download it into the workspace and pass its path with --font. Prefer an official source over an arbitrary font mirror or CDN:
If an official GitHub font URL times out for a user in mainland China, the user may choose one of these third-party proxy prefixes:
https://edgeone.gh-proxy.com/https://hk.gh-proxy.com/https://gh-proxy.com/https://gh.dpik.top/Append the complete official GitHub URL directly after the prefix. For example:
Official: https://github.com/googlefonts/noto-cjk/raw/main/Sans/Variable/TTF/Subset/NotoSansSC-VF.ttf
Proxy: https://edgeone.gh-proxy.com/https://github.com/googlefonts/noto-cjk/raw/main/Sans/Variable/TTF/Subset/NotoSansSC-VF.ttf
These proxies are not operated by the font project or AstrBot. Their availability and returned content can change. Never send credentials, private repository URLs, or other sensitive data through them. After downloading, verify that the final response used HTTPS, inspect the file type, and compare a checksum with an official checksum when one is published.
Do not download a font silently. Obtain user approval when network access or a new file is required, use HTTPS, and keep the downloaded font in a workspace or temporary directory rather than installing it system-wide.
After conversion, use pypdf to confirm the output opens, contains pages, and exposes representative expected text. Render and inspect the first page plus any page with dense content, code, or a page break.
Use small pypdf scripts directly for ordinary operations.
Merge documents in the requested order:
from pypdf import PdfWriter
writer = PdfWriter()
for path in input_paths:
writer.append(path)
writer.write(output_path)
Split selected pages without modifying the source:
from pypdf import PdfReader, PdfWriter
reader = PdfReader(input_path)
writer = PdfWriter()
for page_index in selected_zero_based_indexes:
writer.add_page(reader.pages[page_index])
writer.write(output_path)
Rotate by a multiple of 90 degrees with page.rotate(angle). Encrypt with writer.encrypt(password) only when the user asks, and never echo a password into logs or the final response. Reopen encrypted outputs with the password before reporting success.
Read forms.md before modifying AcroForms. Preserve interactivity unless the user requests a flattened result. Validate both the canonical field tree and page widget annotations; a successful render alone is not proof that field values were saved.
Report the final path, the operation performed, and the validation completed. Mention any unsupported content, unavailable renderer, password requirement, or form ambiguity. Do not claim visual verification unless rendered pages were actually inspected.
Alternatives
NousResearch/hermes-agent
Create, merge, split, fill, and secure PDF files.
K-Dense-AI/scientific-agent-skills
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.
openai/skills
Use when tasks involve reading, creating, or reviewing PDF files where rendering and layout matter; prefer visual checks by rendering pages (Poppler) and use Python tools such as `reportlab`, `pdfplumber`, and `pypdf` for generation and extraction.
anthropics/skills
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.