This skill should be used when the user asks to "generate PDFs from SwiftUI", "export to PDF", "create report templates", "export data to CSV", "implement print functionality", "share documents", or needs guidance on iOS document export and PDF generation.
From ios-dev-toolkitnpx claudepluginhub nbkm8y5/claude-plugins --plugin ios-dev-toolkitThis skill uses the workspace's default tool permissions.
references/export-formats-reference.mdreferences/pdf-generation-patterns.mdreferences/report-templates-guide.mdscripts/create_report_template.pyscripts/export_to_csv.pyscripts/generate_pdf_from_view.pyscripts/setup_print_renderer.pySearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides implementation of event-driven hooks in Claude Code plugins using prompt-based validation and bash commands for PreToolUse, Stop, and session events.
Generate professional PDFs, export data to multiple formats, and implement sharing/printing for iOS applications.
Use this skill when:
Use generate_pdf_from_view.py to create PDF export functionality:
python scripts/generate_pdf_from_view.py AmortizationTableView --page-size letter
This generates Swift code that adds a generatePDF() method to your view.
Use create_report_template.py to scaffold a complete report:
python scripts/create_report_template.py MortgageReport --logo --sections Summary Details Analysis
This creates a SwiftUI view with headers, footers, sections, and branding.
Use export_to_csv.py to generate CSV export code:
python scripts/export_to_csv.py Payment date amount principal interest balance --share-sheet
This generates CSV export functionality with share sheet integration.
For a mortgage calculator app with a 30-year amortization schedule:
Generate PDF renderer for your table view:
python scripts/generate_pdf_from_view.py AmortizationTableView --page-size letter --multi-page
Review references/pdf-generation-patterns.md for multi-page table patterns
Implement pagination using the multi-page pattern:
Test the PDF generation with full 360-payment schedule
For a professional mortgage summary report with charts and tables:
Create report template:
python scripts/create_report_template.py MortgageSummaryReport --logo --sections Summary LoanDetails PaymentBreakdown AmortizationSchedule
Review references/report-templates-guide.md for:
Customize each section with:
Generate PDF using the report template
Export data in multiple formats and share via iOS share sheet:
Generate CSV export:
python scripts/export_to_csv.py Payment month payment principal interest balance --share-sheet
Generate PDF export using generate_pdf_from_view.py
Review references/export-formats-reference.md for:
Implement share button that offers both PDF and CSV
Add native iOS print functionality:
Generate print renderer:
python scripts/setup_print_renderer.py ReportView --page-size letter
Add print button to your UI that calls the generated print() method
Test print preview and actual printing
Generate PDF rendering code for SwiftUI views.
Arguments:
view_name - Name of the SwiftUI view (required)--page-size - PDF page size: letter, a4, legal, tabloid (default: letter)--no-margins - Disable default margins--multi-page - Generate multi-page document supportExample:
python scripts/generate_pdf_from_view.py MortgageReport --page-size a4 --multi-page
Generate professional report templates with branding.
Arguments:
report_name - Name of the report view (required)--no-header - Disable header section--no-footer - Disable footer section--logo - Include company logo in header--sections - Custom section names (default: Summary Details Analysis)Example:
python scripts/create_report_template.py QuarterlyReport --logo --sections Executive Operations Financial
Generate CSV export functionality for data models.
Arguments:
model_name - Name of the data model (required)properties - Model properties to export (required, multiple)--no-headers - Don't include column headers--share-sheet - Generate share sheet integration codeExample:
python scripts/export_to_csv.py Transaction date description amount category --share-sheet
Generate print support code for SwiftUI views.
Arguments:
view_name - Name of the SwiftUI view (required)--page-size - Print page size: letter, a4, legal, tabloid (default: letter)--no-preview - Don't generate print preview functionalityExample:
python scripts/setup_print_renderer.py InvoiceView --page-size letter
Comprehensive patterns for PDF generation. Read this when:
Key sections:
Professional report template patterns. Read this when:
Key sections:
Complete export format guide. Read this when:
Key sections:
func exportReport() {
do {
let pdfData = reportView.generatePDF()
let url = try savePDF(pdfData, fileName: "MortgageReport_\(Date().ISO8601Format()).pdf")
// Share the PDF
presentShareSheet(with: [url])
} catch {
showError("Failed to generate PDF: \(error.localizedDescription)")
}
}
struct ExportView: View {
@State private var showShareSheet = false
@State private var exportItems: [Any] = []
var body: some View {
Button("Export & Share") {
exportItems = generateExports()
showShareSheet = true
}
.sheet(isPresented: $showShareSheet) {
ShareSheet(items: exportItems)
}
}
func generateExports() -> [Any] {
var items: [Any] = []
// PDF
let pdfData = reportView.generatePDF()
items.append(pdfData)
// CSV
if let csvURL = try? payments.saveAsCSV() {
items.append(csvURL)
}
return items
}
}
struct PaginatedReport: View {
let allPayments: [Payment]
let paymentsPerPage = 36
var pages: [[Payment]] {
stride(from: 0, to: allPayments.count, by: paymentsPerPage).map {
Array(allPayments[$0..<min($0 + paymentsPerPage, allPayments.count)])
}
}
@MainActor
func generatePDF() -> Data {
let pageRect = CGRect(origin: .zero, size: CGSize(width: 612, height: 792))
let renderer = UIGraphicsPDFRenderer(bounds: pageRect)
return renderer.pdfData { context in
for (index, pagePayments) in pages.enumerated() {
context.beginPage()
let pageView = ReportPage(
payments: pagePayments,
pageNumber: index + 1,
totalPages: pages.count
)
let controller = UIHostingController(rootView: pageView)
controller.view.frame = pageRect
controller.view.backgroundColor = .white
controller.view.layer.render(in: context.cgContext)
}
}
}
}
layoutIfNeeded() before rendering@State binding is properly connectedComplete implementation for exporting 30-year amortization schedule:
# 1. Generate PDF renderer with multi-page support
python scripts/generate_pdf_from_view.py AmortizationScheduleView --multi-page
# 2. Generate CSV export with share sheet
python scripts/export_to_csv.py Payment month payment principal interest balance --share-sheet
# 3. Create summary report template
python scripts/create_report_template.py MortgageSummaryReport --logo --sections Summary Details Schedule
# 4. Generate print support
python scripts/setup_print_renderer.py MortgageSummaryReport
Then implement the full export feature:
This skill works well with: