Pdf report

From agent0ai/space-agent · View interactive version

Pdf report is an AI agent skill from the GitHub repository agent0ai/space-agent. Create and download browser-generated PDFs from structured data or HTML

How to use this skill

Skill file

Use this skill when the user wants a browser-generated PDF report, a downloaded PDF summary, or a PDF built from structured data or custom HTML.

load helper

helpers

structured report shape

pdf and html options

guidance

examples

Downloading a structured PDF report

_javascript

const pdfReport = await import("/mod/_core/skillset/ext/skills/pdf-report/pdf-report.js")

return await pdfReport.downloadPdfFromReport({

filename: "project-status.pdf",

report: {

title: "Project Status",

eyebrow: "Sprint 14",

subtitle: "Frontend runtime workstream",

summary: "The helper move is complete and the remaining work is doc cleanup.",

theme: {

accentColor: "#0b6bcb",

backgroundColor: "#eef5ff",

surfaceColor: "#ffffff"

},

sections: [

{

title: "Highlights",

items: [

"Skill-specific helpers now live inside their owning skill folders.",

"PDF output is built from generic HTML and CSS instead of a canned weather wrapper."

]

},

{

title: "Counts",

metrics: [

{ label: "Open items", value: "2" },

{ label: "Blocked", value: "0" }

]

}

],

footer: "Generated locally in the browser."

}

})

Downloading a custom HTML PDF

_javascript

const pdfReport = await import("/mod/_core/skillset/ext/skills/pdf-report/pdf-report.js")

return await pdfReport.downloadPdfFromHtml({

filename: "brief.pdf",

widthPx: 900,

page: { size: "a4", marginPt: 28 },

css: `

.brief { padding: 48px; font-family: Georgia, serif; color: #1f2937; }

.brief h1 { margin: 0 0 12px; font-size: 36px; }

.brief .lede { font-size: 18px; color: #4b5563; }

`,

html: `

<article class="brief">

<h1>Research Brief</h1>

<p class="lede">This layout is fully custom HTML and CSS.</p>

<p>Use this path when the user wants a specific art direction instead of the built-in structured report layout.</p>

</article>

`

})

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.