npx skills add https://github.com/eddiebe147/claude-settings --skill report-builderSKILL.md
Report Builder
The Report Builder skill automates the creation of professional business reports with data analysis, visualizations, executive summaries, and formatted sections. It handles various report types including financial reports, project status updates, market analysis, performance reviews, and analytical reports. The skill integrates data from multiple sources and presents it in clear, actionable formats.
Generate reports in PDF, Word, or HTML formats with charts, tables, trend analysis, and key insights. Perfect for recurring reports, automated dashboards, and data-driven decision-making documentation.
Core Workflows
Workflow 1: Generate Executive Report
Purpose: Create high-level report with summary, key metrics, and recommendations
Steps:
- Collect data from various sources
- Calculate key performance indicators (KPIs)
- Generate executive summary highlighting critical points
- Create data visualizations (charts, graphs)
- Add detailed sections with supporting data
- Include recommendations and action items
- Format with professional layout
- Export to PDF with branding
Implementation:
const PDFDocument = require('pdfkit');
const ChartJS = require('chartjs-node-canvas');
const fs = require('fs');
async function generateExecutiveReport(reportData, outputPath) {
const doc = new PDFDocument({ margin: 50 });
const stream = fs.createWriteStream(outputPath);
doc.pipe(stream);
// Cover page
doc.fontSize(32)
.fillColor('#2C3E50')
.text(reportData.title, { align: 'center' })
.moveDown()
.fontSize(18)
.fillColor('#7F8C8D')
.text(reportData.subtitle, { align: 'center' })
.moveDown(2)
.fontSize(12)
.text(`Reporting Period: ${reportData.period}`, { align: 'center' })
.text(`Generated: ${new Date().toLocaleDateString()}`, { align: 'center' });
// Company logo if provided
if (reportData.logo) {
doc.image(reportData.logo, doc.page.width / 2 - 50, 150, { width: 100 });
}
// Executive Summary
doc.addPage();
doc.fontSize(24)
.fillColor('#2C3E50')
.text('Executive Summary', { underline: true })
.moveDown();
doc.fontSize(11)
.fillColor('#34495E')
.text(reportData.executiveSummary, { align: 'justify', lineGap: 4 });
// Key Metrics Section
doc.moveDown(2);
doc.fontSize(18)
.fillColor('#2C3E50')
.text('Key Performance Indicators');
doc.moveDown();
// KPI Cards (2x2 grid)
const kpiWidth = 220;
const kpiHeight = 100;
const spacing = 20;
reportData.kpis.forEach((kpi, index) => {
const row = Math.floor(index / 2);
const col = index % 2;
const x = 50 + col * (kpiWidth + spacing);
const y = doc.y + row * (kpiHeight + spacing);
// KPI Card background
doc.fillColor(kpi.trend === 'up' ? '#27AE60' : kpi.trend === 'down' ? '#E74C3C' : '#3498DB')
.opacity(0.1)
.rect(x, y, kpiWidth, kpiHeight)
.fill();
doc.opacity(1);
// KPI Label
doc.fontSize(10)
.fillColor('#7F8C8D')
.text(kpi.label, x + 10, y + 10, { width: kpiWidth - 20 });
// KPI Value
doc.fontSize(28)
.fillColor('#2C3E50')
.text(kpi.value, x + 10, y + 30);
// KPI Change
const changeColor = kpi.trend === 'up' ? '#27AE60' : kpi.trend === 'down' ? '#E74C3C' : '#7F8C8D';
doc.fontSize(12)
.fillColor(changeColor)
.text(kpi.change, x + 10, y + 70);
});
// Adjust Y position after KPI grid
doc.y += Math.ceil(reportData.kpis.length / 2) * (kpiHeight + spacing) + spacing;
// Detailed Sections
reportData.sections.forEach(async (section) => {
doc.addPage();
// Section Title
doc.fontSize(20)
.fillColor('#2C3E50')
.text(section.title, { underline: true })
.moveDown();
// Section Content
doc.fontSize(11)
.fillColor('#34495E')
.text(section.content, { align: 'justify', lineGap: 4 });
// Add chart if section has data
if (section.chartData) {
doc.moveDown();
const chartImage = await generateChart(section.chartData);
doc.image(chartImage, 100, doc.y, { width: 400 });
doc.moveDown(15); // Space for chart
}
// Add table if section has table data
if (section.tableData) {
doc.moveDown();
addTable(doc, section.tableData);
}
});
// Recommendations
doc.addPage();
doc.fontSize(20)
.fillColor('#2C3E50')
.text('Recommendations', { underline: true })
.moveDown();
reportData.recommendations.forEach((rec, index) => {
doc.fontSize(11)
.fillColor('#34495E')
.text(`${index + 1}. ${rec}`, { lineGap: 6 });
doc.moveDown(0.5);
});
// Footer on all pages
const pages = doc.bufferedPageRange();
for (let i = 0; i < pages.count; i++) {
doc.switchToPage(i);
doc.fontSize(8)
.fillColor('#95A5A6')
.text(
`${reportData.company} | Confidential | Page ${i + 1} of ${pages.count}`,
50,
do
...
Repository Stats
Stars6
Forks1