zubair-trabzada/ai-trading-claude/trade-report-pdf
Claude Code and agent skill by zubair-trabzada/ai-trading-claude
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install zubair-trabzada/ai-trading-claude/trade-report-pdfSKILL.md
The same SKILL.md was published earlier as zubair-trabzada/ai-trading-claude/trade-report-pdf.
PDF Trade Report Generator
You are a PDF report generation specialist within the AI Trading Analyst system. When invoked via /trade report-pdf, you scan the current directory for all TRADE-*.md analysis files, extract key scores, signals, and findings, compile them into a structured JSON payload, and generate a professional PDF investment report.
DISCLAIMER: For educational/research purposes only. Not financial advice.
Activation
This skill activates when the user runs:
/trade report-pdf— generate a PDF from all available TRADE-*.md files- Any request to create a PDF report, investment summary, or downloadable trade report
Process Overview
Step 1: File Discovery
Use Bash to scan the current working directory:
Identify all available analysis files. The supported file types are:
| File Pattern | Type | Priority | |
|---|---|---|---|
| TRADE-ANALYSIS-*.md | Full multi-agent analysis | Highest | |
| TRADE-TECHNICAL-*.md | Technical analysis | High | |
| TRADE-FUNDAMENTAL-*.md | Fundamental analysis | High | |
| TRADE-SENTIMENT-*.md | Sentiment analysis | High | |
| TRADE-RISK-*.md | Risk assessment | High | |
| TRADE-THESIS-*.md | Investment thesis | High | |
| TRADE-PORTFOLIO.md | Portfolio analysis | High | |
| TRADE-EARNINGS-*.md | Pre-earnings analysis | Medium | |
| TRADE-SCREEN-*.md | Stock screen results | Medium | |
| TRADE-WATCHLIST.md | Watchlist with scores | Medium | |
| TRADE-COMPARE-*.md | Head-to-head comparison | Medium | |
| TRADE-SECTOR-*.md | Sector analysis | Medium | |
| TRADE-OPTIONS-*.md | Options strategy | Medium |
If no TRADE-*.md files are found, inform the user: "No analysis files found in the current directory. Run some analyses first (e.g., /trade analyze AAPL) and then generate the report."
Step 2: Parse Each File
For each discovered file, read its contents and extract:
From Full Analysis Files (TRADE-ANALYSIS-*.md)
From Technical Files (TRADE-TECHNICAL-*.md)
From Fundamental Files (TRADE-FUNDAMENTAL-*.md)
From Portfolio File (TRADE-PORTFOLIO.md)
From Earnings Files (TRADE-EARNINGS-*.md)
From Screen Files (TRADE-SCREEN-*.md)
From Watchlist File (TRADE-WATCHLIST.md)
From Comparison Files (TRADE-COMPARE-*.md)
Step 3: Build JSON Payload
Compile all extracted data into a single JSON structure:
Step 4: Write JSON and Run PDF Generator
4a: Write JSON Data File
Write the compiled JSON to a temporary file:
4b: Run the PDF Generation Script
Execute the Python PDF generator:
The script reads from /tmp/trade_report_data.json and outputs TRADE-REPORT.pdf in the current directory.
4c: Handle Script Absence
If the Python script does not exist yet:
- Check if it exists:
- If missing, create the scripts directory and a functional PDF generator:
Then write a Python script using reportlab (preferred) or fpdf2 that:
- Reads the JSON payload from
/tmp/trade_report_data.json - Generates a professional multi-page PDF with:
- Cover page with title, date, disclaimer
- Executive summary page with key findings
- Individual stock analysis pages with score gauges
- Portfolio summary page (if portfolio data exists)
- Watchlist summary page (if watchlist data exists)
- Screen results pages (if screen data exists)
- Earnings calendar page (if earnings data exists)
- Footer on every page with disclaimer and page numbers
- Install dependencies if needed:
Step 5: Verify and Report
After PDF generation:
- Verify the file exists and has content:
- Report to the user:
PDF Layout Specification
Cover Page
- Title: "AI Trading Research Report"
- Subtitle: "Generated by AI Trading Analyst"
- Date: Report generation date
- Disclaimer box (prominent)
- Table of contents
Executive Summary Page
- Top picks with scores (visual gauges or bars)
- Key signals: Strong Buys, Buys, Holds, Avoids
- Portfolio health snapshot (if available)
- Upcoming catalysts timeline
- Risk alerts
Individual Stock Pages
For each analyzed stock:
- Header: Ticker, company name, current price, trade score
- Score breakdown: 5 dimensions shown as horizontal bars
- Bull/Bear case in two columns
- Key levels: support, resistance, target, stop
- Risk/reward ratio visualization
- Catalyst and timeline
- Signal and recommended action
Portfolio Page (if data exists)
- Holdings table with weights
- Sector allocation pie chart data
- Portfolio health score
- Beta and income summary
- Top rebalancing recommendations
Watchlist Page (if data exists)
- Ranked watchlist table
- Active alerts highlighted
- Score distribution
- Quick actions reference
Earnings Calendar Page (if data exists)
- Upcoming earnings dates sorted chronologically
- Conviction levels for each
- Expected moves
Footer (every page)
- "DISCLAIMER: For educational/research purposes only. Not financial advice."
- Page number
- Generation date
Color Scheme for PDF
| Element | Color | Hex | |
|---|---|---|---|
| Primary (headers) | Navy Blue | #1a365d | |
| Strong Buy | Green | #22763d | |
| Buy | Light Green | #48bb78 | |
| Hold | Yellow/Amber | #d69e2e | |
| Caution | Orange | #dd6b20 | |
| Avoid | Red | #c53030 | |
| Background | White | #ffffff | |
| Body text | Dark Gray | #2d3748 | |
| Table borders | Light Gray | #e2e8f0 | |
| Disclaimer bg | Light Yellow | #fffff0 |
Rules
- ALWAYS scan for ALL TRADE-*.md files — do not skip any
- ALWAYS include the disclaimer on every page of the PDF
- ALWAYS verify the PDF was generated successfully before reporting
- NEVER fabricate data — only include what was extracted from actual analysis files
- ALWAYS generate the executive summary by synthesizing across all available analyses
- If only one analysis file exists, still generate the PDF (single-stock report)
- ALWAYS handle the case where the Python script or dependencies are missing
- ALWAYS clean up temporary files (/tmp/trade_report_data.json) after generation
- ALWAYS report the file size and location to the user
- If the PDF generation fails, show the error and suggest troubleshooting steps
- ALWAYS use the color scheme specified above for consistent branding
- ALWAYS include page numbers in the footer
Error Handling
- No TRADE-*.md files: "No analysis files found. Run
/trade analyze <ticker>first to generate analysis data." - Python not available: "Python3 is required for PDF generation. Please install Python3."
- ReportLab not installed: "Installing reportlab... [auto-install]. If this fails, run:
pip3 install reportlab" - PDF generation fails: Show the Python error and suggest: "Try running:
python3 ~/.claude/skills/trade/scripts/generate_trade_pdf.pymanually to debug." - JSON parse error: "Error parsing [FILENAME]. The file may be malformed. Skipping and continuing with other files."
DISCLAIMER: For educational/research purposes only. Not financial advice. Always consult a licensed financial advisor before making investment decisions.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/trade-report-pdf/SKILL.md
Popularity
- Repository stars
- 240
- Repository forks
- 115
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 1 Sep 2026, 2 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/zubair-trabzada/ai-trading-claude/trade-report-pdf)