Professional sales report PDF generator skill

- Title: Professional Sales Report PDF Generator

by zubair-trabzada·MIT license·★ 1,400 Stars on the repo·GitHub ↗

Use now

Files of Professional sales report PDF generator

zubair-trabzada/main1 file shown
SKILL.md
Show the full text322 lines

Professional Sales Report PDF Generator

Metadata

  • Title: Professional Sales Report PDF Generator
  • Invocation: /sales report-pdf
  • Input: None (reads SALES-REPORT.md and prospect files from current directory)
  • Output: SALES-REPORT-{YYYY-MM-DD}.pdf written to the current working directory
  • Dependencies: Python 3, reportlab library, scripts/generate_pdf_report.py

Purpose

You generate a professional, visually polished PDF version of the sales pipeline report. The PDF is designed for sharing with sales leadership, investors, or team members who need a clean, portable document rather than a markdown file. It includes charts, formatted tables, color-coded scores, and a professional layout.


Instructions

When the user invokes /sales report-pdf, follow this process:

Step 1: Verify Prerequisites

Check that SALES-REPORT.md exists in the current working directory.

If SALES-REPORT.md does NOT exist:

  • Inform the user: "No SALES-REPORT.md found. Run /sales report first to generate the pipeline report, then run /sales report-pdf to create the PDF version."
  • Stop execution.

If SALES-REPORT.md exists:

  • Read its contents
  • Also scan for individual prospect analysis files (**/PROSPECT-ANALYSIS.md, **/COMPANY-RESEARCH.md, etc.) to enrich the PDF with additional detail
Step 2: Check for reportlab

Verify that the reportlab Python library is available by running:

python3 -c "import reportlab; print(reportlab.Version)"

If reportlab is NOT installed:

  • Inform the user: "The reportlab Python library is required for PDF generation. Install it with: pip install reportlab"
  • Offer to run the install command for them: pip install reportlab
  • After installation, continue with PDF generation

If Python 3 is NOT available:

  • Inform the user: "Python 3 is required for PDF generation. Please install Python 3 and the reportlab library."
  • Stop execution.
Step 3: Parse Report Data

Extract the following data from SALES-REPORT.md and any prospect analysis files:

Pipeline Overview Data
  • Report generation date
  • Total number of prospects
  • Average pipeline score (0-100)
  • Overall pipeline health assessment
Prospect Data Array

For each prospect, extract into a structured object:

{
  "name": "Company Name",
  "url": "https://company.com",
  "score": 85,
  "grade": "A",
  "stage": "Qualified",
  "next_action": "Send intro email to VP Engineering",
  "est_value": "$24,000 ARR",
  "component_scores": {
    "company_fit": 88,
    "contact_access": 75,
    "opportunity_quality": 90,
    "competitive_position": 82,
    "outreach_readiness": 80
  },
  "key_pain_point": "Manual API monitoring causing outages",
  "key_contact": "Jane Smith, VP Engineering",
  "risk_factors": "Long procurement cycle"
}
Top Prospects Data

For the top 5 prospects, extract detailed data including:

  • Full component score breakdown
  • Key contacts with titles
  • Pain points with severity
  • Recommended approach
  • Risk factors
Action Items

Extract the prioritized action list:

[
  {
    "priority": 1,
    "company": "Acme Corp",
    "action": "Send personalized email to VP Engineering",
    "urgency": "immediate",
    "reason": "Recent funding round creates budget window"
  }
]
Pipeline Health Metrics
{
  "total_prospects": 10,
  "average_score": 72,
  "a_grade_count": 3,
  "a_grade_pct": 30,
  "b_grade_count": 4,
  "b_grade_pct": 40,
  "c_grade_count": 2,
  "c_grade_pct": 20,
  "d_grade_count": 1,
  "d_grade_pct": 10,
  "highest_score": 92,
  "lowest_score": 35,
  "health_rating": "Good"
}
Step 4: Build JSON Input File

Write a JSON file at _pdf_input.json in the current working directory containing all extracted data:

{
  "title": "Sales Pipeline Report",
  "date": "2025-01-15",
  "overall_pipeline_score": 72,
  "health_rating": "Good",
  "total_prospects": 10,
  "prospects": [
    {
      "name": "...",
      "url": "...",
      "score": 85,
      "grade": "A",
      "stage": "Qualified",
      "next_action": "...",
      "est_value": "...",
      "component_scores": { ... },
      "key_pain_point": "...",
      "key_contact": "...",
      "risk_factors": "..."
    }
  ],
  "top_prospects": [ ... ],
  "action_items": [ ... ],
  "pipeline_health": { ... },
  "score_distribution": {
    "A+": { "count": 1, "pct": 10, "prospects": ["Acme Corp"] },
    "A": { "count": 2, "pct": 20, "prospects": ["Beta Inc", "Gamma Ltd"] },
    "B": { "count": 4, "pct": 40, "prospects": ["..."] },
    "C": { "count": 2, "pct": 20, "prospects": ["..."] },
    "D": { "count": 1, "pct": 10, "prospects": ["..."] }
  },
  "weekly_focus": [
    {
      "rank": 1,
      "company": "Acme Corp",
      "score": 92,
      "reason": "Highest score with active trigger event",
      "actions": ["Send intro email", "Connect on LinkedIn", "Schedule demo"]
    }
  ],
  "methodology": {
    "company_fit_weight": 25,
    "contact_access_weight": 20,
    "opportunity_quality_weight": 20,
    "competitive_position_weight": 15,
    "outreach_readiness_weight": 20
  }
}
Step 5: Locate or Create the PDF Generation Script

Check if the PDF generation script exists at scripts/generate_pdf_report.py relative to the project root.

Finding the project root: Look for the scripts/ directory in these locations (in order):

  1. The ai-sales-team-claude project directory (where the agents/ and skills/ folders are)
  2. The current working directory
  3. One level up from the current working directory

If the script does NOT exist:

  • Inform the user: "The PDF generation script was not found at scripts/generate_pdf_report.py. This script is part of the AI Sales Team project setup. Please ensure the project is properly installed."
  • Stop execution.

If the script exists:

  • Proceed to execution.
Step 6: Generate the PDF

Run the PDF generation script:

python3 scripts/generate_pdf_report.py _pdf_input.json "SALES-REPORT-$(date +%Y-%m-%d).pdf"

The script should produce a PDF with these sections:

PDF Section 1: Cover Page
  • Title: "Sales Pipeline Report"
  • Date of generation
  • Overall Pipeline Score displayed as a large circular gauge (0-100)
  • Pipeline health rating with color indicator
  • Quick stats: total prospects, average score, top grade count
PDF Section 2: Score Breakdown
  • Horizontal bar chart showing score distribution by grade band
  • Color coded: A+ = dark green, A = green, B = blue, C = orange, D = red
  • Each bar labeled with count and percentage
PDF Section 3: Prospect Comparison Table
  • Full table of all prospects with columns: Rank, Company, Score, Grade, Stage, Next Action, Est. Value
  • Alternating row colors for readability
  • Grade column color-coded
  • Sorted by score descending
PDF Section 4: Top Prospects Detail
  • One page (or half-page) per top prospect
  • Component score radar chart or bar chart
  • Key contacts listed
  • Pain points and approach summary
  • Risk factors highlighted
PDF Section 5: Action Plan
  • Prioritized action items in a numbered list
  • Grouped by timeframe: Immediate, Short-Term, Pipeline Building
  • Each with company name, specific action, and urgency level
PDF Section 6: Methodology
  • Brief explanation of the scoring methodology
  • Weight breakdown with percentages
  • Grade band definitions
  • Disclaimer that scores are based on publicly available information
Step 7: Clean Up and Report

After PDF generation:

  1. Verify the PDF file was created and check its file size
  2. Remove the temporary _pdf_input.json file
  3. Report to the user:
    • PDF file name and location
    • File size
    • Number of pages
    • Summary of contents

Error Handling

reportlab Not Installed
The PDF generation requires the reportlab Python library.
Install it by running: pip install reportlab

Shall I install it for you?
Python Not Available
Python 3 is required for PDF generation but was not found.
Please install Python 3 from https://python.org and then run:
  pip install reportlab
Script Not Found
The PDF generation script was not found at scripts/generate_pdf_report.py.
This script is part of the AI Sales Team project. Please ensure the project
directory structure is intact.
No Report Data
SALES-REPORT.md was not found in the current directory.
Run `/sales report` first to generate the pipeline report, then run
`/sales report-pdf` to create the PDF version.
PDF Generation Failed

If the Python script exits with an error:

  1. Capture the error output
  2. Check for common issues:
    • Invalid JSON input (malformed data)
    • File permission errors
    • Disk space issues
    • reportlab version incompatibility
  3. Report the specific error to the user with a suggested fix
  4. Keep the _pdf_input.json file for debugging (don't delete it on failure)

Output Specifications

  • File Name: SALES-REPORT-{YYYY-MM-DD}.pdf (using current date)
  • Page Size: Letter (8.5" x 11")
  • Orientation: Portrait for most pages, landscape for wide tables if needed
  • Color Scheme: Professional blues and grays with color-coded score indicators
  • Font: Helvetica or similar sans-serif for readability
  • Margins: 0.75 inch on all sides
  • Expected Length: 4-8 pages depending on number of prospects

Important Rules

  1. ALWAYS check for SALES-REPORT.md before attempting PDF generation. Never generate a PDF from scratch without the markdown report.
  2. ALWAYS check for reportlab before running the script. Provide clear installation instructions if missing.
  3. Clean up temporary files (_pdf_input.json) on success. Keep them on failure for debugging.
  4. The JSON input must be valid JSON. Validate it before passing to the script.
  5. If the PDF script fails, provide the full error output to help the user debug.
  6. Never modify the original SALES-REPORT.md file during PDF generation.
  7. Report the final PDF file path, size, and page count to the user after successful generation.
  8. If prospect data is incomplete, still generate the PDF with available data rather than failing. Mark missing data as "N/A" in the PDF.
1# Professional Sales Report PDF Generator
2 
3## Metadata
4- **Title:** Professional Sales Report PDF Generator
5- **Invocation:** `/sales report-pdf`
6- **Input:** None (reads SALES-REPORT.md and prospect files from current directory)
7- **Output:** `SALES-REPORT-{YYYY-MM-DD}.pdf` written to the current working directory
8- **Dependencies:** Python 3, `reportlab` library, `scripts/generate_pdf_report.py`
9 
10---
11 
12## Purpose
13 
14You generate a professional, visually polished PDF version of the sales pipeline report. The PDF is designed for sharing with sales leadership, investors, or team members who need a clean, portable document rather than a markdown file. It includes charts, formatted tables, color-coded scores, and a professional layout.
15 
16---
17 
18## Instructions
19 
20When the user invokes `/sales report-pdf`, follow this process:
21 
22### Step 1: Verify Prerequisites
23 
24Check that `SALES-REPORT.md` exists in the current working directory.
25 
26**If SALES-REPORT.md does NOT exist:**
27- Inform the user: "No SALES-REPORT.md found. Run `/sales report` first to generate the pipeline report, then run `/sales report-pdf` to create the PDF version."
28- Stop execution.
29 
30**If SALES-REPORT.md exists:**
31- Read its contents
32- Also scan for individual prospect analysis files (`**/PROSPECT-ANALYSIS.md`, `**/COMPANY-RESEARCH.md`, etc.) to enrich the PDF with additional detail
33 
34### Step 2: Check for reportlab
35 
36Verify that the `reportlab` Python library is available by running:
37```bash
38python3 -c "import reportlab; print(reportlab.Version)"
39```
40 
41**If reportlab is NOT installed:**
42- Inform the user: "The `reportlab` Python library is required for PDF generation. Install it with: `pip install reportlab`"
43- Offer to run the install command for them: `pip install reportlab`
44- After installation, continue with PDF generation
45 
46**If Python 3 is NOT available:**
47- Inform the user: "Python 3 is required for PDF generation. Please install Python 3 and the reportlab library."
48- Stop execution.
49 
50### Step 3: Parse Report Data
51 
52Extract the following data from `SALES-REPORT.md` and any prospect analysis files:
53 
54#### Pipeline Overview Data
55- Report generation date
56- Total number of prospects
57- Average pipeline score (0-100)
58- Overall pipeline health assessment
59 
60#### Prospect Data Array
61For each prospect, extract into a structured object:
62```json
63{
64 "name": "Company Name",
65 "url": "https://company.com",
66 "score": 85,
67 "grade": "A",
68 "stage": "Qualified",
69 "next_action": "Send intro email to VP Engineering",
70 "est_value": "$24,000 ARR",
71 "component_scores": {
72 "company_fit": 88,
73 "contact_access": 75,
74 "opportunity_quality": 90,
75 "competitive_position": 82,
76 "outreach_readiness": 80
77 },
78 "key_pain_point": "Manual API monitoring causing outages",
79 "key_contact": "Jane Smith, VP Engineering",
80 "risk_factors": "Long procurement cycle"
81}
82```
83 
84#### Top Prospects Data
85For the top 5 prospects, extract detailed data including:
86- Full component score breakdown
87- Key contacts with titles
88- Pain points with severity
89- Recommended approach
90- Risk factors
91 
92#### Action Items
93Extract the prioritized action list:
94```json
95[
96 {
97 "priority": 1,
98 "company": "Acme Corp",
99 "action": "Send personalized email to VP Engineering",
100 "urgency": "immediate",
101 "reason": "Recent funding round creates budget window"
102 }
103]
104```
105 
106#### Pipeline Health Metrics
107```json
108{
109 "total_prospects": 10,
110 "average_score": 72,
111 "a_grade_count": 3,
112 "a_grade_pct": 30,
113 "b_grade_count": 4,
114 "b_grade_pct": 40,
115 "c_grade_count": 2,
116 "c_grade_pct": 20,
117 "d_grade_count": 1,
118 "d_grade_pct": 10,
119 "highest_score": 92,
120 "lowest_score": 35,
121 "health_rating": "Good"
122}
123```
124 
125### Step 4: Build JSON Input File
126 
127Write a JSON file at `_pdf_input.json` in the current working directory containing all extracted data:
128 
129```json
130{
131 "title": "Sales Pipeline Report",
132 "date": "2025-01-15",
133 "overall_pipeline_score": 72,
134 "health_rating": "Good",
135 "total_prospects": 10,
136 "prospects": [
137 {
138 "name": "...",
139 "url": "...",
140 "score": 85,
141 "grade": "A",
142 "stage": "Qualified",
143 "next_action": "...",
144 "est_value": "...",
145 "component_scores": { ... },
146 "key_pain_point": "...",
147 "key_contact": "...",
148 "risk_factors": "..."
149 }
150 ],
151 "top_prospects": [ ... ],
152 "action_items": [ ... ],
153 "pipeline_health": { ... },
154 "score_distribution": {
155 "A+": { "count": 1, "pct": 10, "prospects": ["Acme Corp"] },
156 "A": { "count": 2, "pct": 20, "prospects": ["Beta Inc", "Gamma Ltd"] },
157 "B": { "count": 4, "pct": 40, "prospects": ["..."] },
158 "C": { "count": 2, "pct": 20, "prospects": ["..."] },
159 "D": { "count": 1, "pct": 10, "prospects": ["..."] }
160 },
161 "weekly_focus": [
162 {
163 "rank": 1,
164 "company": "Acme Corp",
165 "score": 92,
166 "reason": "Highest score with active trigger event",
167 "actions": ["Send intro email", "Connect on LinkedIn", "Schedule demo"]
168 }
169 ],
170 "methodology": {
171 "company_fit_weight": 25,
172 "contact_access_weight": 20,
173 "opportunity_quality_weight": 20,
174 "competitive_position_weight": 15,
175 "outreach_readiness_weight": 20
176 }
177}
178```
179 
180### Step 5: Locate or Create the PDF Generation Script
181 
182Check if the PDF generation script exists at `scripts/generate_pdf_report.py` relative to the project root.
183 
184**Finding the project root:** Look for the `scripts/` directory in these locations (in order):
1851. The ai-sales-team-claude project directory (where the agents/ and skills/ folders are)
1862. The current working directory
1873. One level up from the current working directory
188 
189**If the script does NOT exist:**
190- Inform the user: "The PDF generation script was not found at `scripts/generate_pdf_report.py`. This script is part of the AI Sales Team project setup. Please ensure the project is properly installed."
191- Stop execution.
192 
193**If the script exists:**
194- Proceed to execution.
195 
196### Step 6: Generate the PDF
197 
198Run the PDF generation script:
199 
200```bash
201python3 scripts/generate_pdf_report.py _pdf_input.json "SALES-REPORT-$(date +%Y-%m-%d).pdf"
202```
203 
204The script should produce a PDF with these sections:
205 
206#### PDF Section 1: Cover Page
207- Title: "Sales Pipeline Report"
208- Date of generation
209- Overall Pipeline Score displayed as a large circular gauge (0-100)
210- Pipeline health rating with color indicator
211- Quick stats: total prospects, average score, top grade count
212 
213#### PDF Section 2: Score Breakdown
214- Horizontal bar chart showing score distribution by grade band
215- Color coded: A+ = dark green, A = green, B = blue, C = orange, D = red
216- Each bar labeled with count and percentage
217 
218#### PDF Section 3: Prospect Comparison Table
219- Full table of all prospects with columns: Rank, Company, Score, Grade, Stage, Next Action, Est. Value
220- Alternating row colors for readability
221- Grade column color-coded
222- Sorted by score descending
223 
224#### PDF Section 4: Top Prospects Detail
225- One page (or half-page) per top prospect
226- Component score radar chart or bar chart
227- Key contacts listed
228- Pain points and approach summary
229- Risk factors highlighted
230 
231#### PDF Section 5: Action Plan
232- Prioritized action items in a numbered list
233- Grouped by timeframe: Immediate, Short-Term, Pipeline Building
234- Each with company name, specific action, and urgency level
235 
236#### PDF Section 6: Methodology
237- Brief explanation of the scoring methodology
238- Weight breakdown with percentages
239- Grade band definitions
240- Disclaimer that scores are based on publicly available information
241 
242### Step 7: Clean Up and Report
243 
244After PDF generation:
245 
2461. Verify the PDF file was created and check its file size
2472. Remove the temporary `_pdf_input.json` file
2483. Report to the user:
249 - PDF file name and location
250 - File size
251 - Number of pages
252 - Summary of contents
253 
254---
255 
256## Error Handling
257 
258### reportlab Not Installed
259```
260The PDF generation requires the reportlab Python library.
261Install it by running: pip install reportlab
262 
263Shall I install it for you?
264```
265 
266### Python Not Available
267```
268Python 3 is required for PDF generation but was not found.
269Please install Python 3 from https://python.org and then run:
270 pip install reportlab
271```
272 
273### Script Not Found
274```
275The PDF generation script was not found at scripts/generate_pdf_report.py.
276This script is part of the AI Sales Team project. Please ensure the project
277directory structure is intact.
278```
279 
280### No Report Data
281```
282SALES-REPORT.md was not found in the current directory.
283Run `/sales report` first to generate the pipeline report, then run
284`/sales report-pdf` to create the PDF version.
285```
286 
287### PDF Generation Failed
288If the Python script exits with an error:
2891. Capture the error output
2902. Check for common issues:
291 - Invalid JSON input (malformed data)
292 - File permission errors
293 - Disk space issues
294 - reportlab version incompatibility
2953. Report the specific error to the user with a suggested fix
2964. Keep the `_pdf_input.json` file for debugging (don't delete it on failure)
297 
298---
299 
300## Output Specifications
301 
302- **File Name:** `SALES-REPORT-{YYYY-MM-DD}.pdf` (using current date)
303- **Page Size:** Letter (8.5" x 11")
304- **Orientation:** Portrait for most pages, landscape for wide tables if needed
305- **Color Scheme:** Professional blues and grays with color-coded score indicators
306- **Font:** Helvetica or similar sans-serif for readability
307- **Margins:** 0.75 inch on all sides
308- **Expected Length:** 4-8 pages depending on number of prospects
309 
310---
311 
312## Important Rules
313 
3141. ALWAYS check for SALES-REPORT.md before attempting PDF generation. Never generate a PDF from scratch without the markdown report.
3152. ALWAYS check for reportlab before running the script. Provide clear installation instructions if missing.
3163. Clean up temporary files (_pdf_input.json) on success. Keep them on failure for debugging.
3174. The JSON input must be valid JSON. Validate it before passing to the script.
3185. If the PDF script fails, provide the full error output to help the user debug.
3196. Never modify the original SALES-REPORT.md file during PDF generation.
3207. Report the final PDF file path, size, and page count to the user after successful generation.
3218. If prospect data is incomplete, still generate the PDF with available data rather than failing. Mark missing data as "N/A" in the PDF.
322 

Discussion

Alternatives

/ar:ar-status — Experiment DashboardShow experiment dashboard with results, active loops, and progress. Use when the user runs /ar:ar-status or asks how an autoresearch experiment is going.Data & AI · MITAnalytics dashboardTurn a LinkedIn Analytics export into an interactive dark-themed React dashboard plus a written strategic analysis with 5 data-backed content recommendations. Reads every sheet in the export, builds charts for engagement trend, follower growth, post performance scatter, day-of-week heatmap, and audience breakdown. Use this skill whenever the user says "analyse my linkedin", "linkedin analytics", "build my dashboard", "review my performance", or uploads a LinkedIn Analytics export file. Requires the user's LinkedIn Analytics export (xlsx) as input.Creator · MITEarnings Preview SkillGenerate a pre-earnings briefing for any stock using Yahoo Finance data. Use this skill whenever the user wants to prepare for an upcoming earnings report, understand what analysts expect, review a company's beat/miss track record, or get a quick overview before an earnings call. Triggers include: "earnings preview for AAPL", "what to expect from TSLA earnings", MSFT reports next week", "earnings preview", "pre-earnings analysis", what are analysts expecting for NVDA", "earnings estimates for", will GOOGL beat earnings", "earnings beat/miss history", upcoming earnings", "before earnings", "earnings setup", consensus estimates", "earnings whisper", "EPS expectations", what's the street expecting", "earnings season preview", any mention of preparing for or previewing an earnings report, or any request to understand expectations ahead of a company's earnings date. Always use this skill when the user mentions a ticker in context of upcoming earnings, even if they don't say "preview" explicitly. · MITPath A — List-styleSave the results of an in-chat data-exploration session as a TL report. Triggers when the user wants to persist a channels / brands / videos (uploads) / sponsorships list or filtered set they've been working with — phrases like "save this as a report", "save the list", "turn this into a campaign", "persist this", "make a report from what you found", "save the result", "I want to come back to this".Creator · MIT