본문으로 건너뛰기
cccskills
무료GitHub에 공개

pdf-checklist-generator

Generate PDF checklists, reports, and scorecards with Python. Organizes content into sections and tables, supports scoring criteria and status colors, and includes steps to locate and verify the generated files.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

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

설치 방법 보기

이럴 때 유용합니다

  • Creating PDF checklists with status and notes columns
  • Preparing scorecards with weights and scores
  • Turning findings into a report with multiple sections
  • Color-coding pass, fail, and pending statuses

포함된 파일(2)

  • SKILL.md8.0 KB
  • .skill_id37 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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:

LibraryBest ForInstallation
reportlabComplex layouts, tables, precise controlpip install reportlab
fpdf2Simple documents, easy APIpip install fpdf2
matplotlibCharts/graphs in PDFspip 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'),
    ('BACKGROUND', (0, -1), (-1, -1), colors.lightgrey),
]))
elements.append(table)

doc.build(elements)
print("ARTIFACT_PATH:/workspace/scorecard.pdf")

Step 3: Include ARTIFACT_PATH in Output

Always include the artifact path in your print output so the system can locate the generated file:

print(f"ARTIFACT_PATH:/workspace/your_filename.pdf")

Step 4: Verify Output

After generation, verify the PDF was created successfully:

Option A: Use read_file

read_file with filetype="pdf" and file_path="/workspace/checklist.pdf"

Option B: Use shell inspection

run_shell with command="ls -la /workspace/*.pdf"

Common Patterns

Pattern 1: Multi-Section Report

sections = [
    ("Introduction", "Overview text..."),
    ("Methodology", "Process description..."),
    ("Results", "Findings summary..."),
    ("Conclusion", "Final recommendations..."),
]

for title, content in sections:
    elements.append(Paragraph(title, styles['Heading2']))
    elements.append(Paragraph(content, styles['Normal']))
    elements.append(Spacer(1, 0.2*inch))

Pattern 2: Status Indicator Table

status_colors = {
    'Pass': colors.green,
    'Fail': colors.red,
    'Pending': colors.orange,
    'N/A': colors.grey,
}

# Apply conditional coloring in table style
for row_idx, row_data in enumerate(data[1:], 1):
    status = row_data[1]
    if status in status_colors:
        table.setStyle(TableStyle([
            ('BACKGROUND', (1, row_idx), (1, row_idx), status_colors[status]),
        ]))

Pattern 3: Page Breaks for Long Documents

from reportlab.platypus import PageBreak

elements.append(PageBreak())  # Insert page break

Troubleshooting

IssueSolution
Library not foundAdd pip install <library> at start of code
Font errorsUse built-in fonts: Arial, Helvetica, Times-Roman
Table overflowAdjust colWidths or split into multiple tables
PDF not createdCheck ARTIFACT_PATH is correct and file is written

Best Practices

  1. Always verify: Check the PDF exists and is readable after generation
  2. Use ARTIFACT_PATH: Include it in output for system discovery
  3. Keep it readable: Use adequate spacing (Spacer) between elements
  4. Test incrementally: Build complex PDFs section by section
  5. Handle errors: Wrap file operations in try/except blocks

Example Complete Workflow

# 1. Install library
!pip install reportlab -q

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

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

elements.append(Paragraph("Task Completion Checklist", styles['Heading1']))
elements.append(Spacer(1, 0.25*inch))

data = [['Task', 'Complete', 'Notes'],
        ['Setup environment', 'Yes', ''],
        ['Run tests', 'Yes', 'All passed'],
        ['Documentation', 'No', 'In progress']]

table = Table(data)
table.setStyle(TableStyle([('GRID', (0,0), (-1,-1), 1, colors.black)]))
elements.append(table)

doc.build(elements)
print("ARTIFACT_PATH:/workspace/checklist.pdf")

# 3. Verify
import os
print(f"File exists: {os.path.exists('/workspace/checklist.pdf')}")
print(f"File size: {os.path.getsize('/workspace/checklist.pdf')} bytes")

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Prepare audio stems, the separate parts of a track, for mixing by matching their durations with silence, loops, or crossfades. Verify each generated and processed file before moving to the next production step.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Match audio parts with different durations
  • Extend drums and melodic parts using suitable methods
  • Check audio specifications before mixing
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

Produce audio in separate stems, meaning individual instrument tracks, and verify each output as you go. Align track lengths with silence, loops, or crossfades, then apply effects, mix a master, and package the files.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Align instrument tracks to a reference audio file
  • Choose how to extend tracks that are too short
  • Verify audio properties after generation and effects
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

Build serverless endpoints that relay external API requests for a dashboard while keeping API keys on the server. Includes Vercel examples for input checks, caching, cross-origin access, and consistent JSON responses.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Connect a dashboard to external APIs without exposing API keys
  • Create endpoints for stock quotes and news
  • Standardize API responses and error handling
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

Produce a master track and separate audio parts through a structured Python workflow. Apply filters and reverb, export WAV files with consistent settings, package them in a ZIP archive, and check that the deliverables meet the requested specifications.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Export a master track with separate audio parts
  • Apply filters and reverb to audio
  • Check duration and format across deliverables
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

Keep document creation moving when web searches and page retrieval repeatedly fail. The skill preserves the original task, uses the model’s existing knowledge, and clearly identifies information that could not be checked against external sources.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Continue drafting after repeated web retrieval failures
  • Preserve task requirements during network errors
  • Mark information that could not be externally verified
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

When Python execution repeatedly fails in execute_code_sandbox, use a file-based alternative: save the script, run it through the shell, and capture results or errors. The guidance covers paths, imports, timeouts, structured output, and optional cleanup.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Retry Python work through the shell after repeated sandbox failures
  • Run longer tasks with an adjusted timeout
  • Execute Python work that needs multiple files or system utilities
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

HKUDS의 스킬 모두 보기

이 스킬의 문제 신고