Langsung ke konten
Skillpedia
PDF, Word & slide7.8k Β· #12909

pdf-checklist-generator

Fungsinya

Skill ini adalah pola yang bisa dipakai ulang untuk membuat dokumen PDF profesional dengan Python di dalam sandbox. Skill ini cocok untuk orang yang membutuhkan penilaian, daftar periksa, atau laporan terstruktur dalam bentuk PDF.

Kapan dipakai

  • βœ“Saat saya membutuhkan PDF terstruktur dengan tabel, bagian, dan penilaian.
  • βœ“Saat saya ingin struktur dokumen direncanakan sebelum kode apa pun ditulis.
  • βœ“Saat saya membutuhkan artefak yang bisa diunduh untuk tugas alur kerja.

Link skill

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/pdf-checklist-generator/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/pdf-checklist-generator/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBuat kartu skor PDF untuk ulasan vendor dengan rubrik penilaian dan bagian untuk setiap kategori.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

AI merencanakan judul, bagian, kolom tabel, dan rubrik penilaian terlebih dahulu, lalu menulis kode reportlab atau fpdf2 untuk menghasilkan dokumen di dalam sandbox.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

PDF Checklist/Report Generator

This skill provides a reusable pattern for creating professional PDF documents (checklists, reports, scorecards) using Python libraries within execute_code_sandbox.

When to Use This Skill

  • Need to generate structured PDF documents programmatically
  • Creating checklists with scoring criteria
  • Building reports with tables, sections, and formatted content
  • Producing downloadable artifacts for workflow tasks

Library Selection

Choose the appropriate library based on your needs:

Library Best For Installation
reportlab Complex layouts, tables, precise control pip install reportlab
fpdf2 Simple documents, easy API pip install fpdf2
matplotlib Charts/graphs in PDFs pip install matplotlib

Step-by-Step Procedure

Step 1: Plan Document Structure

Define the sections, tables, and scoring criteria before coding:

  • Document title and metadata
  • Section headers
  • Table columns and rows
  • Scoring rubric (if applicable)

Step 2: Write Python Code in execute_code_sandbox

Use execute_code_sandbox with the appropriate library. Here are templates:

Template A: Using reportlab (recommended for tables)

from reportlab.lib import colors
from reportlab.lib.pagesizes import letter
from reportlab.platypus import SimpleDocTemplate, Table, TableStyle, Paragraph, Spacer
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import inch

# Create PDF
doc = SimpleDocTemplate("checklist.pdf", pagesize=letter)
elements = []
styles = getSampleStyleSheet()

# Title
title_style = ParagraphStyle('CustomTitle', parent=styles['Heading1'], alignment=1)
elements.append(Paragraph("Compliance Checklist", title_style))
elements.append(Spacer(1, 0.25*inch))

# Create table data
data = [
    ['Criteria', 'Status', 'Score', 'Notes'],
    ['Security Review', 'Pass', '10', 'All checks passed'],
    ['Code Quality', 'Pass', '8', 'Minor improvements'],
    ['Documentation', 'Pending', '5', 'Needs updates'],
]

# Create and style table
table = Table(data, colWidths=[3*inch, 1*inch, 1*inch, 2*inch])
table.setStyle(TableStyle([
    ('BACKGROUND', (0, 0), (-1, 0), colors.grey),
    ('TEXTCOLOR', (0, 0), (-1, 0), colors.whitesmoke),
    ('ALIGN', (0, 0), (-1, -1), 'CENTER'),
    ('GRID', (0, 0), (-1, -1), 1, colors.black),
    ('BACKGROUND', (0, 1), (-1, -1), colors.beige),
]))
elements.append(table)

# Build PDF
doc.build(elements)
print("PDF created: checklist.pdf")
print(f"ARTIFACT_PATH:/workspace/checklist.pdf")

Template B: Using fpdf2 (simpler API)

from fpdf import FPDF

pdf = FPDF()
pdf.add_page()
pdf.set_font("Arial", "B", 16)
pdf.cell(0, 10, "Project Report", ln=True, align='C')

pdf.set_font("Arial", size=12)
pdf.ln(10)

# Add sections
sections = [
    ("Executive Summary", "Project completed successfully."),
    ("Key Findings", "All milestones achieved on time."),
    ("Recommendations", "Continue current practices."),
]

for title, content in sections:
    pdf.set_font("Arial", "B", 14)
    pdf.cell(0, 10, title, ln=True)
    pdf.set_font("Arial", size=12)
    pdf.multi_cell(0, 8, content)
    pdf.ln(5)

pdf.output("report.pdf")
print("PDF created: report.pdf")
print(f"ARTIFACT_PATH:/workspace/report.pdf")

Template C: Checklist with Scoring

from reportlab.lib.pagesizes import letter
from reportlab.platypus import SimpleDocTemplate, Table, TableStyle, Paragraph, Spacer
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.lib import colors

doc = SimpleDocTemplate("scorecard.pdf", pagesize=letter)
elements = []
styles = getSampleStyleSheet()

# Title
elements.append(Paragraph("Evaluation Scorecard", styles['Heading1']))
elements.append(Spacer(1, 0.25*inch))

# Scoring criteria table
criteria = [
    ['Category', 'Weight', 'Score (0-10)', 'Weighted'],
    ['Functionality', '30%', '9', '2.7'],
    ['Performance', '25%', '8', '2.0'],
    ['Security', '25%', '10', '2.5'],
    ['Documentation', '20%', '7', '1.4'],
    ['TOTAL', '100%', '-', '8.6/10'],
]

table = Table(criteria, colWidths=[2.5*inch, 1*inch, 1.5*inch, 1.5*inch])
table.setStyle(TableStyle([
    ('BACKGROUND', (0, 0), (-1, 0), colors.darkblue),
    ('TEXTCOLOR', (0, 0), (-1, 0), colors.whitesmoke),
    ('ALIGN', (0, 0), (-1, -1), 'CENTER'),
    ('GRID', (0, 0), (-1, -1), 1, colors.black),
    ('FONTNAME', (0, -1), (-1, -1), 'Helvetica-Bold'),
    
Pertanyaan umum

Mengapa struktur direncanakan lebih dulu?

Menentukan bagian, tabel, dan rubrik penilaian di awal membuat kode lebih sederhana dan hasilnya lebih konsisten.

Pustaka apa yang disebutkan?

Panduan ini menyebut reportlab, fpdf2, dan matplotlib, masing-masing untuk kebutuhan yang berbeda.

Apakah perlu pemasangan khusus?

Panduan ini menunjukkan perintah pip install untuk pustaka yang dipilih.

Detail

Deskripsi asli dari pembuat

Generate structured PDF checklists and reports with tables, sections, and scoring criteria using Python libraries

repo: HKUDS/AgentPilot

Popularitas

Bintang GitHub
7.8k
Peringkat
#12909
Lisensi
MIT
Diperbarui
1/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa