基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/cxcscmu/SkillLearnBench --skill pdf-form-filling命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Handles reading, populating, and saving .docx files using the python-docx library. Use this skill for any tasks involving template filling or modifying Word documents.
Perform various data analysis on SEC 13-F and obtain some insights of fund activities such as number of holdings, AUM, and change of holdings between two quarters.
This skill includes search capability in 13F, such as fuzzy search a fund information using possibly inaccurate name, or fuzzy search a stock cusip info using its name.
| name | pdf-form-filling |
| description | Methods for programmatically filling PDF forms (AcroForms) and saving the results using pypdf. |
This skill covers how to fill out AcroForms in a PDF document using pypdf.
pypdf library (pip install pypdf)from pypdf import PdfReader, PdfWriter
def fill_pdf(input_pdf_path, output_pdf_path, data_dict):
reader = PdfReader(input_pdf_path)
writer = PdfWriter()
for page in reader.pages:
writer.add_page(page)
# Fill form fields
writer.update_page_form_field_values(writer.pages[0], data_dict)
# Note: If fields span multiple pages, you might need to iterate
# through writer.pages and apply relevant parts of data_dict.
# However, writer.update_page_form_field_values can often find the fields
# globally if they are properly indexed.
with open(output_pdf_path, "wb") as output_stream:
writer.write(output_stream)
# Example data_dict
# For text fields: {"field_name": "Value"}
# For checkboxes: {"checkbox_name": "/Yes"} or similar
data = {
"full_name": "John Doe",
"is_citizen": "/Yes"
}
fill_pdf("blank.pdf", "filled.pdf", data)
SC-100[0].Page1[0].Field[0])./NeedAppearances is set to true in the PDF's Interactive Form Dictionary. pypdf handles basic filling, but complex forms might need flattening or specific appearance settings./Yes (or other export value) and /Off.