inspect-pdf-fields
Use this skill to inspect all form fields in a PDF file, printing their names, types, and current values/export values. Useful for understanding the structure of a PDF form before filling it.
- License 许可
- MIT
- 最近更新
- 2026-10-02
- Stars
- ★ 93
- Forks
- 8
01 前言 Front Matter
- name
- inspect-pdf-fields
- description
- Use this skill to inspect all form fields in a PDF file, printing their names, types, and current values/export values. Useful for understanding the structure of a PDF form before filling it.
03 SKILL.md 正文
Inspect PDF Form Fields
import pypdf
import sys
pdf_path = sys.argv[1] if len(sys.argv) > 1 else "/root/sc100-blank.pdf"
reader = pypdf.PdfReader(pdf_path)
print(f"Number of pages: {len(reader.pages)}")
print(f"Number of fields: {len(reader.get_fields()) if reader.get_fields() else 0}")
print()
fields = reader.get_fields()
if not fields:
print("No form fields found.")
else:
for field_name, field_obj in fields.items():
field_type = field_obj.get("/FT", "Unknown")
field_value = field_obj.get("/V", "")
field_default = field_obj.get("/DV", "")
# Get export values for checkboxes/radio buttons
ap = field_obj.get("/AP", {})
kids = field_obj.get("/Kids", [])
print(f"Field Name: {repr(field_name)}")
print(f" Type: {field_type}")
print(f" Value: {repr(field_value)}")
print(f" Default: {repr(field_default)}")
# Try to get export values
if field_type in ["/Btn"]:
opt = field_obj.get("/Opt", [])
print(f" Options: {opt}")
# Check AP for on state name
if ap:
n_dict = ap.get("/N", {})
if hasattr(n_dict, 'keys'):
print(f" AP/N keys (export values): {list(n_dict.keys())}")
print()
Run this script to see all fields:
python3 /root/inspect_fields.py /root/sc100-blank.pdf 2>&1 | head -200
04 同仓库更多 Skills
object_counter
Count occurrences of an object in the image using computer vision algorithm.
travel-planning-workflow
Invoke this skill when performing travel planning. It defines a structured workflow for generating itineraries. Following this workflow is essential to ensure the final plan satisfies user requirements.
bundled-dataset-search-tool
invoke this skill when you need to perform database search for travel planning. This skill provides some useful pre-packaged tools to look up accommodations, attractions, cities, driving distance, flights, and restaurants from the bundled dataset.
glm-output
Output-processing guidance for GLM tasks. Especially useful after glm-basics and glm-calibration when you need verifier-matching metrics from output.nc and a final /root/metrics.json.
glm-calibration
Calibration guidance for GLM tasks. Often most effective after glm-basics has clarified the setup; glm-output is the companion skill for exact final metric computation.
glm-basics
A good starting point for GLM calibration tasks. Use to inspect glm3.nml, confirm how GLM runs, and identify the relevant files before moving on to calibration and output evaluation.