pdf-checklist-workflow
Qué hace
Esta skill describe cómo producir listas de comprobación y evaluaciones en PDF con bibliotecas de Python, con un método de respaldo. Está pensada para quienes necesitan un PDF descargable con secciones, tablas y puntuación.
Cuándo usarla
- ✓Cuando necesito una lista de comprobación, un informe o una evaluación en PDF con secciones y tablas.
- ✓Cuando el documento necesita puntuación o un marco de evaluación.
- ✓Cuando el entorno aislado falla y aun así el PDF debe producirse.
Link de la skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/pdf-checklist-workflow/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Crea una evaluación en PDF para nuestro personal con secciones, tablas y un marco de puntuación. Si el entorno aislado falla, escribe el script y ejecútalo desde la shell.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La IA elige una biblioteca de PDF, escribe el código que construye las secciones y las tablas, guarda el archivo en el espacio de trabajo e imprime la ruta del artefacto. Si eso falla, escribe el script en un archivo y lo ejecuta en la shell.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
PDF Checklist/Report Generation Workflow
This skill provides a reusable pattern for creating structured PDF documents such as checklists, reports, or assessments using Python in a sandboxed environment.
Overview
Use this workflow when you need to:
- Generate PDF checklists, reports, or assessments
- Create structured documents with tables, sections, and headers
- Include scoring criteria or evaluation frameworks
- Produce downloadable artifacts for users
Primary method: Use execute_code_sandbox for Python PDF generation
Fallback method: If execute_code_sandbox fails, create and run Python scripts via shell commands
Step-by-Step Instructions
Step 1: Choose a PDF Library
Select a Python library based on your needs:
| Library | Best For | Complexity |
|---|---|---|
reportlab |
Professional reports, complex layouts | Medium |
fpdf / fpdf2 |
Simple documents, quick generation | Low |
matplotlib |
Charts, graphs, visual elements | Medium |
Step 2: Write PDF Generation Code in execute_code_sandbox
Use the execute_code_sandbox tool with Python code that:
- Imports the chosen PDF library
- Defines document structure (title, sections, tables)
- Adds content (text, tables, scores, criteria)
- Saves to a file path like
/workspace/output.pdf - Outputs the path using
ARTIFACT_PATH:prefix for download
Determine workspace directory dynamically: Before generating PDFs, identify the correct output path:
# Option 1: Use current directory
WORKDIR=$(pwd)
# Option 2: Check common workspace locations
if [ -d "/workspace" ]; then WORKDIR="/workspace"
elif [ -d "$HOME/workspace" ]; then WORKDIR="$HOME/workspace"
else WORKDIR=$(pwd); fi
In Python code, use environment variables or dynamic path detection:
import os
workspace = os.environ.get('WORKSPACE', os.getcwd())
output_path = os.path.join(workspace, 'output.pdf')
Example using fpdf2:
from fpdf import FPDF
class PDFChecklist(FPDF):
def header(self):
self.set_font('Arial', 'B', 16)
self.cell(0, 10, 'Assessment Checklist', 0, 1, 'C')
self.ln(10)
def section_title(self, title):
self.set_font('Arial', 'B', 12)
self.cell(0, 10, title, 0, 1, 'L')
self.ln(5)
def add_checklist_item(self, item, criteria, score):
self.set_font('Arial', '', 10)
self.cell(100, 8, item, 1)
self.cell(60, 8, criteria, 1)
self.cell(30, 8, str(score), 1)
self.ln()
# Create PDF
pdf = PDFChecklist()
pdf.add_page()
pdf.set_auto_page_break(auto=True, margin=15)
# Add sections
pdf.section_title('Evaluation Criteria')
pdf.add_checklist_item('Requirement 1', 'Must meet standard', 5)
pdf.add_checklist_item('Requirement 2', 'Should be complete', 4)
# Save
output_path = '/workspace/checklist.pdf'
pdf.output(output_path)
print(f'ARTIFACT_PATH:{output_path}')
Example using reportlab (more professional):
from reportlab.lib import colors
from reportlab.lib.pagesizes import letter
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import inch
def create_pdf_report(output_path):
doc = SimpleDocTemplate(output_path, pagesize=letter)
styles = getSampleStyleSheet()
story = []
# Title
title_style = ParagraphStyle('CustomTitle', parent=styles['Heading1'],
fontSize=18, spaceAfter=30, alignment=1)
story.append(Paragraph("Assessment Report", title_style))
story.append(Spacer(1, 0.3*inch))
# Section header
story.append(Paragraph("Evaluation Summary", styles['Heading2']))
story.append(Spacer(1, 0.2*inch))
# Data table
data = [
['Criteria', 'Description', 'Score'],
['Completeness', 'All sections filled', '8/10'],
['Accuracy', 'Information verified', '9/10'],
['Clarity', 'Easy to understand', '7/10']
]
table = Table(data, colWidths=[2*inch, 2.5*inch, 1*inch])
table.setStyle(TableStyle([
('BACKGROUND', (0, 0), (-1, 0), colors.grey),
('TEXTCOLOR', (0, 0), (-1, 0), colors.whitesmoke),
('ALIGN', (0, 0), (-1, -1), 'CENTER'),
('FONTNAME', (0, 0), (-1, 0), 'Helvetica-Bold'),
('BOTTOMPADDING', (0, 0), (-1, 0), 12),
('BACKGROUND', (0, 1), (-1, -1), co
Preguntas frecuentes
¿Qué bibliotecas se enumeran?
La guía enumera reportlab para maquetaciones complejas, fpdf o fpdf2 para documentos sencillos y matplotlib para los gráficos.
¿Dónde se guarda el archivo?
La guía guarda el resultado en el espacio de trabajo e imprime una ruta para poder descargarlo.
¿Cuál es el método de respaldo?
Si el entorno aislado falla, el script se escribe en un archivo y se ejecuta desde la shell.
Detalles
Descripción original del autor
Generate structured PDF documents with tables, sections, and scoring using Python libraries in execute_code_sandbox
repo: HKUDS/AgentPilot
Popularidad
- Estrellas en GitHub
- 7,8 mil
- Posición en el ranking
- #12913
- Licencia
- MIT
- Actualizada
- 1/11/2026
Comentarios
- …
Más skills de este repositorio
agentpilot
7,8 milAyuda a tu agente a mejorar un proyecto paso a paso, preparando una tarea y ejecutando el bucle de AgentPilot que propone, prueba y puntúa cambios.
openspace
7,8 milAyuda a tu agente a configurar OpenSpace, una herramienta que guarda y recupera skills de agentes, y a conectarla a tu app de IA mediante MCP.
rsi-arena
7,8 milAyuda a tu agente a configurar y ejecutar pruebas de referencia de IA conocidas, como AIME y Terminal-Bench, para comparar distintos métodos de mejora.
experiment-guide
7,8 milAyuda a tu agente a planificar experimentos pequeños, leer sus resultados y anotar conclusiones mientras investiga cómo mejorar un programa.
Skills parecidas
feishu-doc
394 milAyuda a tu agente a leer, crear y editar documentos en la nube de Feishu, incluidos texto, imágenes y tablas, usando la herramienta de documentos.
feishu-drive
394 milPermite que tu agente explore, organice y comente archivos de una carpeta de la nube de Feishu que se haya compartido con el bot.
feishu-perm
394 milAyuda a tu agente a revisar y cambiar quién puede acceder a un archivo de Feishu, eligiendo el permiso más pequeño que cumpla tu petición.