AI Revenue Intelligence skill
python3 telemetry/versioncheck.py 2>/dev/null || true
by ericosiu·MIT license·★ 3,615 Stars on the repo·GitHub ↗
npx degit ericosiu/ai-marketing-skills/revenue-intelligence#main ~/.claude/skills/revenue-intelligenceChecked ·commit main
Files of AI Revenue Intelligence
Show the full text214 lines
AI Revenue Intelligence
Preamble (runs on skill start)
# Version check (silent if up to date)
python3 telemetry/version_check.py 2>/dev/null || true
# Telemetry opt-in (first run only, then remembers your choice)
python3 telemetry/telemetry_init.py 2>/dev/null || true
Privacy: This skill logs usage locally to
~/.ai-marketing-skills/analytics/. Remote telemetry is opt-in only. No code, file paths, or repo content is ever collected. Seetelemetry/README.md.
AI-powered revenue intelligence: sales call insight extraction, content-to-revenue attribution, and multi-source client reporting.
When to Use
- User wants to extract insights from Gong sales call transcripts
- User needs to identify objections, buying signals, or competitive mentions in calls
- User wants to prove content ROI by mapping content to closed deals
- User needs revenue attribution across first-touch and multi-touch models
- User wants to generate a unified client report from GA4 + HubSpot + Ahrefs + Gong
- User asks about content gaps in the buyer journey
- User needs anomaly detection across marketing metrics
Tools
Gong-to-Insight Pipeline (gong_insight_pipeline.py)
Extracts structured intelligence from sales call transcripts. Works with Gong API or plain transcript files.
# Analyze a single transcript file
python gong_insight_pipeline.py --file transcript.txt
# Analyze multiple transcript files
python gong_insight_pipeline.py --dir ./transcripts/
# Pull recent calls from Gong API (last 7 days)
python gong_insight_pipeline.py --gong --days 7
# Pull specific call by ID
python gong_insight_pipeline.py --gong --call-id abc123
# Output as JSON file
python gong_insight_pipeline.py --file transcript.txt --output insights.json
# Generate content topics from recurring objections
python gong_insight_pipeline.py --dir ./transcripts/ --content-topics
# Generate follow-up suggestions for outbound sequences
python gong_insight_pipeline.py --file transcript.txt --follow-ups
What it extracts:
- Objections (categorized: pricing, timing, competition, authority, need)
- Buying signals (budget confirmed, timeline mentioned, decision maker engaged, champion identified)
- Competitive mentions (who was mentioned, context: positive/negative/neutral)
- Pricing discussions (anchors, pushback, willingness indicators)
- Content topic suggestions from recurring objection patterns
- Personalized follow-up drafts based on call context
Output: Structured JSON to stdout or file. Each call produces an insights object with objections, buying_signals, competitive_mentions, pricing_discussions, content_topics, and follow_ups arrays.
Revenue Attribution Mapper (revenue_attribution.py)
Maps content pieces to pipeline and closed revenue. Proves content ROI with first-touch and multi-touch attribution.
# Run full attribution report (GA4 + HubSpot)
python revenue_attribution.py --report
# First-touch attribution only
python revenue_attribution.py --report --model first-touch
# Multi-touch (linear) attribution
python revenue_attribution.py --report --model linear
# Time-decay attribution
python revenue_attribution.py --report --model time-decay
# Filter by date range
python revenue_attribution.py --report --start 2025-01-01 --end 2025-03-31
# Calculate cost-per-acquisition by content type
python revenue_attribution.py --cpa --costs content_costs.json
# Identify content gaps in the buyer journey
python revenue_attribution.py --gaps
# Output as JSON
python revenue_attribution.py --report --json --output attribution.json
What it produces:
- Content-to-revenue mapping (which blog posts, videos, podcasts drove deals)
- First-touch, linear, and time-decay attribution models
- Cost-per-acquisition by content type (blog, video, podcast, webinar)
- Content ROI report with revenue per piece
- Content gap analysis (funnel stages with no attribution)
- Top-performing content ranked by attributed revenue
Data sources: GA4 (page paths, sessions, conversions) + HubSpot (deals, touchpoints, close dates)
Multi-Source Client Report Generator (client_report_generator.py)
Generates unified client-ready BI reports from GA4, HubSpot, Ahrefs, and Gong.
# Generate full client report
python client_report_generator.py --client "Acme Corp"
# Specify date range
python client_report_generator.py --client "Acme Corp" --start 2025-03-01 --end 2025-03-31
# Output as markdown
python client_report_generator.py --client "Acme Corp" --format markdown --output report.md
# Output as JSON (for rendering in slides/dashboards)
python client_report_generator.py --client "Acme Corp" --format json --output report.json
# Skip specific data sources
python client_report_generator.py --client "Acme Corp" --skip gong
python client_report_generator.py --client "Acme Corp" --skip ahrefs,gong
# Enable anomaly detection
python client_report_generator.py --client "Acme Corp" --anomalies
# Compare to previous period
python client_report_generator.py --client "Acme Corp" --compare previous-month
What it produces:
- Executive summary with key metrics and period-over-period changes
- Traffic section: sessions, users, top pages, channel breakdown (GA4)
- Pipeline section: deals created, moved, closed, revenue (HubSpot)
- SEO section: keyword rankings, backlinks, domain rating changes (Ahrefs)
- Call quality section: talk ratios, objection frequency, win rates (Gong)
- Anomaly flags: unusual spikes/drops with severity and context
- Output as structured markdown or JSON
Configuration
All scripts read from environment variables. Copy .env.example to .env and fill in your values.
Required Environment Variables
| Variable | Used By | Description |
|---|---|---|
GONG_API_KEY |
Gong Pipeline, Client Report | Gong API access key |
GONG_API_BASE_URL |
Gong Pipeline, Client Report | Gong API base URL |
HUBSPOT_API_KEY |
Attribution, Client Report | HubSpot private app token |
GA4_PROPERTY_ID |
Attribution, Client Report | GA4 property ID |
GA4_CREDENTIALS_JSON |
Attribution, Client Report | Path to GA4 service account JSON |
Optional Environment Variables
| Variable | Used By | Description |
|---|---|---|
AHREFS_TOKEN |
Client Report | Ahrefs API token |
OUTPUT_DIR |
All | Directory for output files (default: ./output) |
Data Flow
Gong Transcripts → Insight Pipeline → Objections, Signals, Competitors → Content Topics + Follow-ups
GA4 + HubSpot → Attribution Mapper → Content ROI, CPA, Gap Analysis → Revenue Proof
GA4 + HubSpot + Ahrefs + Gong → Client Report → Executive Summary + Anomalies → Client Deliverable
Recommended Workflow
- Weekly: Run
gong_insight_pipeline.py --gong --days 7to extract call intelligence - Monthly: Run
revenue_attribution.py --reportto prove content ROI - Monthly: Run
client_report_generator.pyfor each client deliverable - Quarterly: Run
revenue_attribution.py --gapsto find content gaps - Ongoing: Feed Gong insight follow-ups into outbound sequences
Revenue Analytics Feedback Loop
Any recommendation that changes outbound, sales language, routing, content investment, or client reporting should get a readback.
Before recommending:
- Define the baseline window and candidate window.
- Pull source data from HubSpot, Gong, GA4, Ahrefs, and any outbound platform available.
- Identify the primary metric before looking at the result, otherwise the analysis becomes KPI karaoke.
After the change:
- Pull analytics after the readback date.
- Compare baseline vs candidate.
- Separate owner/participant effects, list quality, campaign changes, seasonality, and attribution gaps.
- Promote, keep testing, rollback, or mark unproven.
Common primary metrics:
- positive reply rate
- booked meeting rate
- qualified opportunity movement
- pipeline created
- speed-to-lead
- content-assisted revenue
- conversion rate
- objection frequency reduction
Every promoted playbook patch should include the change made, source systems, baseline window, candidate window, metric winner, caveats, and rollback rule.
Dependencies
pip install -r requirements.txt
| 1 | # AI Revenue Intelligence |
| 2 | |
| 3 | ## Preamble (runs on skill start) |
| 4 | |
| 5 | |
| 6 | # Version check (silent if up to date) |
| 7 | python3 telemetry/version_check.py 2>/dev/null || true |
| 8 | |
| 9 | # Telemetry opt-in (first run only, then remembers your choice) |
| 10 | python3 telemetry/telemetry_init.py 2>/dev/null || true |
| 11 | |
| 12 | |
| 13 | > **Privacy:** This skill logs usage locally to `~/.ai-marketing-skills/analytics/`. Remote telemetry is opt-in only. No code, file paths, or repo content is ever collected. See `telemetry/README.md`. |
| 14 | |
| 15 | |
| 16 | |
| 17 | AI-powered revenue intelligence: sales call insight extraction, content-to-revenue attribution, and multi-source client reporting. |
| 18 | |
| 19 | ## When to Use |
| 20 | |
| 21 | User wants to extract insights from Gong sales call transcripts |
| 22 | User needs to identify objections, buying signals, or competitive mentions in calls |
| 23 | User wants to prove content ROI by mapping content to closed deals |
| 24 | User needs revenue attribution across first-touch and multi-touch models |
| 25 | User wants to generate a unified client report from GA4 + HubSpot + Ahrefs + Gong |
| 26 | User asks about content gaps in the buyer journey |
| 27 | User needs anomaly detection across marketing metrics |
| 28 | |
| 29 | ## Tools |
| 30 | |
| 31 | ### Gong-to-Insight Pipeline (`gong_insight_pipeline.py`) |
| 32 | |
| 33 | Extracts structured intelligence from sales call transcripts. Works with Gong API or plain transcript files. |
| 34 | |
| 35 | |
| 36 | # Analyze a single transcript file |
| 37 | python gong_insight_pipeline.py --file transcript.txt |
| 38 | |
| 39 | # Analyze multiple transcript files |
| 40 | python gong_insight_pipeline.py --dir ./transcripts/ |
| 41 | |
| 42 | # Pull recent calls from Gong API (last 7 days) |
| 43 | python gong_insight_pipeline.py --gong --days 7 |
| 44 | |
| 45 | # Pull specific call by ID |
| 46 | python gong_insight_pipeline.py --gong --call-id abc123 |
| 47 | |
| 48 | # Output as JSON file |
| 49 | python gong_insight_pipeline.py --file transcript.txt --output insights.json |
| 50 | |
| 51 | # Generate content topics from recurring objections |
| 52 | python gong_insight_pipeline.py --dir ./transcripts/ --content-topics |
| 53 | |
| 54 | # Generate follow-up suggestions for outbound sequences |
| 55 | python gong_insight_pipeline.py --file transcript.txt --follow-ups |
| 56 | |
| 57 | |
| 58 | **What it extracts:** |
| 59 | Objections (categorized: pricing, timing, competition, authority, need) |
| 60 | Buying signals (budget confirmed, timeline mentioned, decision maker engaged, champion identified) |
| 61 | Competitive mentions (who was mentioned, context: positive/negative/neutral) |
| 62 | Pricing discussions (anchors, pushback, willingness indicators) |
| 63 | Content topic suggestions from recurring objection patterns |
| 64 | Personalized follow-up drafts based on call context |
| 65 | |
| 66 | **Output:** Structured JSON to stdout or file. Each call produces an `insights` object with `objections`, `buying_signals`, `competitive_mentions`, `pricing_discussions`, `content_topics`, and `follow_ups` arrays. |
| 67 | |
| 68 | ### Revenue Attribution Mapper (`revenue_attribution.py`) |
| 69 | |
| 70 | Maps content pieces to pipeline and closed revenue. Proves content ROI with first-touch and multi-touch attribution. |
| 71 | |
| 72 | |
| 73 | # Run full attribution report (GA4 + HubSpot) |
| 74 | python revenue_attribution.py --report |
| 75 | |
| 76 | # First-touch attribution only |
| 77 | python revenue_attribution.py --report --model first-touch |
| 78 | |
| 79 | # Multi-touch (linear) attribution |
| 80 | python revenue_attribution.py --report --model linear |
| 81 | |
| 82 | # Time-decay attribution |
| 83 | python revenue_attribution.py --report --model time-decay |
| 84 | |
| 85 | # Filter by date range |
| 86 | python revenue_attribution.py --report --start 2025-01-01 --end 2025-03-31 |
| 87 | |
| 88 | # Calculate cost-per-acquisition by content type |
| 89 | python revenue_attribution.py --cpa --costs content_costs.json |
| 90 | |
| 91 | # Identify content gaps in the buyer journey |
| 92 | python revenue_attribution.py --gaps |
| 93 | |
| 94 | # Output as JSON |
| 95 | python revenue_attribution.py --report --json --output attribution.json |
| 96 | |
| 97 | |
| 98 | **What it produces:** |
| 99 | Content-to-revenue mapping (which blog posts, videos, podcasts drove deals) |
| 100 | First-touch, linear, and time-decay attribution models |
| 101 | Cost-per-acquisition by content type (blog, video, podcast, webinar) |
| 102 | Content ROI report with revenue per piece |
| 103 | Content gap analysis (funnel stages with no attribution) |
| 104 | Top-performing content ranked by attributed revenue |
| 105 | |
| 106 | **Data sources:** GA4 (page paths, sessions, conversions) + HubSpot (deals, touchpoints, close dates) |
| 107 | |
| 108 | ### Multi-Source Client Report Generator (`client_report_generator.py`) |
| 109 | |
| 110 | Generates unified client-ready BI reports from GA4, HubSpot, Ahrefs, and Gong. |
| 111 | |
| 112 | |
| 113 | # Generate full client report |
| 114 | python client_report_generator.py --client "Acme Corp" |
| 115 | |
| 116 | # Specify date range |
| 117 | python client_report_generator.py --client "Acme Corp" --start 2025-03-01 --end 2025-03-31 |
| 118 | |
| 119 | # Output as markdown |
| 120 | python client_report_generator.py --client "Acme Corp" --format markdown --output report.md |
| 121 | |
| 122 | # Output as JSON (for rendering in slides/dashboards) |
| 123 | python client_report_generator.py --client "Acme Corp" --format json --output report.json |
| 124 | |
| 125 | # Skip specific data sources |
| 126 | python client_report_generator.py --client "Acme Corp" --skip gong |
| 127 | python client_report_generator.py --client "Acme Corp" --skip ahrefs,gong |
| 128 | |
| 129 | # Enable anomaly detection |
| 130 | python client_report_generator.py --client "Acme Corp" --anomalies |
| 131 | |
| 132 | # Compare to previous period |
| 133 | python client_report_generator.py --client "Acme Corp" --compare previous-month |
| 134 | |
| 135 | |
| 136 | **What it produces:** |
| 137 | Executive summary with key metrics and period-over-period changes |
| 138 | Traffic section: sessions, users, top pages, channel breakdown (GA4) |
| 139 | Pipeline section: deals created, moved, closed, revenue (HubSpot) |
| 140 | SEO section: keyword rankings, backlinks, domain rating changes (Ahrefs) |
| 141 | Call quality section: talk ratios, objection frequency, win rates (Gong) |
| 142 | Anomaly flags: unusual spikes/drops with severity and context |
| 143 | Output as structured markdown or JSON |
| 144 | |
| 145 | ## Configuration |
| 146 | |
| 147 | All scripts read from environment variables. Copy `.env.example` to `.env` and fill in your values. |
| 148 | |
| 149 | ### Required Environment Variables |
| 150 | |
| 151 | | Variable | Used By | Description | |
| 152 | |----------|---------|-------------| |
| 153 | | `GONG_API_KEY` | Gong Pipeline, Client Report | Gong API access key | |
| 154 | | `GONG_API_BASE_URL` | Gong Pipeline, Client Report | Gong API base URL | |
| 155 | | `HUBSPOT_API_KEY` | Attribution, Client Report | HubSpot private app token | |
| 156 | | `GA4_PROPERTY_ID` | Attribution, Client Report | GA4 property ID | |
| 157 | | `GA4_CREDENTIALS_JSON` | Attribution, Client Report | Path to GA4 service account JSON | |
| 158 | |
| 159 | ### Optional Environment Variables |
| 160 | |
| 161 | | Variable | Used By | Description | |
| 162 | |----------|---------|-------------| |
| 163 | | `AHREFS_TOKEN` | Client Report | Ahrefs API token | |
| 164 | | `OUTPUT_DIR` | All | Directory for output files (default: `./output`) | |
| 165 | |
| 166 | ## Data Flow |
| 167 | |
| 168 | |
| 169 | Gong Transcripts → Insight Pipeline → Objections, Signals, Competitors → Content Topics + Follow-ups |
| 170 | GA4 + HubSpot → Attribution Mapper → Content ROI, CPA, Gap Analysis → Revenue Proof |
| 171 | GA4 + HubSpot + Ahrefs + Gong → Client Report → Executive Summary + Anomalies → Client Deliverable |
| 172 | |
| 173 | |
| 174 | ## Recommended Workflow |
| 175 | |
| 176 | **Weekly:** Run `gong_insight_pipeline.py --gong --days 7` to extract call intelligence |
| 177 | **Monthly:** Run `revenue_attribution.py --report` to prove content ROI |
| 178 | **Monthly:** Run `client_report_generator.py` for each client deliverable |
| 179 | **Quarterly:** Run `revenue_attribution.py --gaps` to find content gaps |
| 180 | **Ongoing:** Feed Gong insight follow-ups into outbound sequences |
| 181 | |
| 182 | ## Revenue Analytics Feedback Loop |
| 183 | |
| 184 | Any recommendation that changes outbound, sales language, routing, content investment, or client reporting should get a readback. |
| 185 | |
| 186 | Before recommending: |
| 187 | Define the baseline window and candidate window. |
| 188 | Pull source data from HubSpot, Gong, GA4, Ahrefs, and any outbound platform available. |
| 189 | Identify the primary metric before looking at the result, otherwise the analysis becomes KPI karaoke. |
| 190 | |
| 191 | After the change: |
| 192 | Pull analytics after the readback date. |
| 193 | Compare baseline vs candidate. |
| 194 | Separate owner/participant effects, list quality, campaign changes, seasonality, and attribution gaps. |
| 195 | Promote, keep testing, rollback, or mark unproven. |
| 196 | |
| 197 | Common primary metrics: |
| 198 | positive reply rate |
| 199 | booked meeting rate |
| 200 | qualified opportunity movement |
| 201 | pipeline created |
| 202 | speed-to-lead |
| 203 | content-assisted revenue |
| 204 | conversion rate |
| 205 | objection frequency reduction |
| 206 | |
| 207 | Every promoted playbook patch should include the change made, source systems, baseline window, candidate window, metric winner, caveats, and rollback rule. |
| 208 | |
| 209 | ## Dependencies |
| 210 | |
| 211 | |
| 212 | pip install -r requirements.txt |
| 213 | |
| 214 |
Discussion
Browse more free Claude skills.