PythonClaw pdf_protect
Add or remove password protection on PDF files. Use when: user asks to encrypt, password-protect, unlock, or decrypt a PDF. Supports owner and user passwords with permission controls. NOT for: digital signatures, certificate-based encryption, or DRM.
install
source · Clone the upstream repo
git clone https://github.com/ericwang915/PythonClaw
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ericwang915/PythonClaw "$T" && mkdir -p ~/.claude/skills && cp -r "$T/pythonclaw/templates/skills/data/pdf_protect" ~/.claude/skills/ericwang915-pythonclaw-pdf-protect && rm -rf "$T"
manifest:
pythonclaw/templates/skills/data/pdf_protect/SKILL.mdsource content
PDF Protect Skill
Add or remove password protection on PDF files using PyPDF2.
When to Use
✅ USE this skill when:
- "Password protect this PDF"
- "Encrypt report.pdf"
- "Remove password from this PDF"
- "Unlock this PDF — password is 1234"
- User wants to add or remove PDF encryption
When NOT to Use
❌ DON'T use this skill when:
- Digital signatures → use dedicated signing tools
- Certificate-based encryption → use specialized PKI tools
- DRM protection → not supported
- Reading PDF content → use
pdf_reader
Usage/Commands
Encrypt a PDF
python {skill_path}/protect_pdf.py encrypt INPUT_PDF OUTPUT_PDF --password SECRET [options]
Options:
— user password (required to open the PDF)--password SECRET
— owner password (for permissions; defaults to user password)--owner-password SECRET
— disable printing--no-print
— disable text copying--no-copy
— output result as JSON--format json
Decrypt a PDF
python {skill_path}/protect_pdf.py decrypt INPUT_PDF OUTPUT_PDF --password SECRET [options]
Options:
— password to unlock the PDF--password SECRET
— output result as JSON--format json
Examples
- "Protect with password" →
python {skill_path}/protect_pdf.py encrypt doc.pdf protected.pdf --password mypass - "Restrict printing" →
python {skill_path}/protect_pdf.py encrypt doc.pdf out.pdf --password pass --no-print - "Unlock PDF" →
python {skill_path}/protect_pdf.py decrypt locked.pdf unlocked.pdf --password pass123
Notes
- Install dependency:
pip install PyPDF2 - AES-128 encryption is used by default
- If owner password is not set, it defaults to the user password