Table of content
Visualize FeedMob direct spend data as ASCII line charts
Installation
npx claude-plugins install @feed-mob/feedmob-claude-plugins/direct-spend-visualizer
Contents
Folders: skills
Files: README.md
Documentation
A Claude Code plugin that provides an Agent Skill for visualizing FeedMob direct spend data as ASCII line charts.
Features
- ๐ ASCII Line Charts: Generate visual spend trend charts directly in your terminal
- ๐ฐ Dual Metrics: Display both net spend and gross spend on the same chart
- ๐ Date Range Analysis: Visualize spend data across custom date ranges
- ๐ข Detailed Breakdown: View comprehensive data tables with daily totals
- ๐ฏ Multi-Campaign Support: Handle multiple click URL IDs simultaneously
- ๐ต USD Currency: All spend values displayed in USD with proper formatting
Installation
This plugin is part of the FeedMob Claude Plugins marketplace. It will be automatically available when the plugin is installed.
Prerequisites
- Python 3.6 or higher
- FeedMob MCP Server: This plugin requires the FeedMob MCP server to be installed and configured
Environment Configuration
Before using this plugin, you must set the following environment variables:
export FEEDMOB_KEY=your_feedmob_api_key
export FEEDMOB_SECRET=your_feedmob_api_secret
export FEEDMOB_API_BASE=https://xxx.xxx.xxx
You can add these to your shell profile (~/.bashrc, ~/.zshrc, etc.) to make them permanent:
# Add to ~/.bashrc or ~/.zshrc
export FEEDMOB_KEY=your_feedmob_api_key
export FEEDMOB_SECRET=your_feedmob_api_secret
export FEEDMOB_API_BASE=https://xxx.xxx.xxx
MCP Server Configuration
The plugin includes a .mcp.json file that configures the FeedMob MCP server. Ensure this is properly loaded in your Claude Code environment.
Usage
The Direct Spend Visualizer skill will automatically activate when you mention:
- “Show direct spend for click_url 22271”
- “Visualize spend data for the last 30 days”
- “Chart the spending for campaigns”
- “Display spend trends”
- “Show me a chart of direct spend”
Quick Start Examples
Example 1: Single Campaign Visualization
Request:
Show me direct spend for click_url 22271 for the last 7 days
Result:
- ASCII line chart showing net and gross spend trends
- Detailed data table with daily breakdown
- Total spend summary
Example 2: Multiple Campaigns
Request:
Visualize direct spend for click_urls 22271, 22272, and 22273 from 2025-11-01 to 2025-11-14
Result:
- Separate chart for each click URL ID
- Comparative spend analysis
- Individual totals for each campaign
Example 3: Custom Date Range
Request:
Chart direct spend for the last 30 days for click_url 22271
Result:
- Extended timeline visualization
- Month-long spend trend analysis
How It Works
- API Data Retrieval: Fetches direct spend data using the FeedMob MCP API (
mcp__feedmob__get_direct_spends) - Data Processing: Saves API response to temporary JSON file
- Visualization: Executes Python script to generate ASCII charts
- Display: Presents charts, legends, and data tables to the user
Output Format
The visualization includes:
ASCII Line Chart
- Y-axis: Spend values in USD with $ formatting
- X-axis: Dates
- N markers: Net Spend data points
- G markers: Gross Spend data points
- Automatic scaling based on data range
Legend
- Clear explanation of chart symbols
- Net Spend (N) vs Gross Spend (G)
Data Table
- Daily breakdown with dates
- Net spend and gross spend columns
- Campaign names
- Total spend summary
- All values in USD currency
Script Reference
visualize_direct_spend.py
Location: skills/scripts/visualize_direct_spend.py
Usage:
# From file
python scripts/visualize_direct_spend.py /tmp/direct_spend_data.json
# From stdin
cat data.json | python scripts/visualize_direct_spend.py
echo '{"data": [...]}' | python scripts/visualize_direct_spend.py
Input Format:
{
"status": 200,
"data": [
{
"feedmob_click_url_id": 22271,
"campaign_name": "Campaign Name",
"date": "2025-11-07",
"feedmob_net_spend": 119.92,
"feedmob_gross_spend": 78.00
}
]
}
Features:
- Handles multiple click URL IDs
- Automatic chart scaling
- Both net and gross spend visualization
- Detailed numeric breakdown
- Summary statistics
API Integration
This plugin uses the FeedMob MCP API to retrieve direct spend data:
Tool: mcp__feedmob__get_direct_spends
Parameters:
start_date: Start date in YYYY-MM-DD formatend_date: End date in YYYY-MM-DD formatclick_url_ids: Array of click URL IDs (as strings)
Example Call:
{
"start_date": "2025-11-07",
"end_date": "2025-11-14",
"click_url_ids": ["22271", "22272"]
}
Best Practices
- Date Ranges: For large date ranges, consider breaking into smaller periods for better visualization
- Multiple Campaigns: The script automatically creates separate charts for each click URL ID
- Data Availability: If no data is returned, verify the date range and cl
…(truncated)
Included Skills
This plugin includes 1 skill definition:
SKILL
Visualize FeedMob direct spend data as ASCII line charts. Use this skill when users request to view, display, chart, or visualize direct spend metrics for one or more click URL IDs. Trigger when users ask to “show direct spend,” “visualize spend data,” “chart the spending,” or similar requests involving FeedMob direct spend visualization.
View skill definition
Direct Spend Visualizer
Overview
This skill enables visualization of FeedMob direct spend data as ASCII line charts. It fetches data using the FeedMob MCP API and displays net spend and gross spend trends over time in an easy-to-read format. All spend values are reported in USD currency.
When to Use This Skill
Use this skill when users request:
- Visualization of direct spend data for specific click URL IDs
- Line charts showing spend trends over time
- Comparison of net spend vs gross spend
- Visual representation of FeedMob campaign spending
Example user requests:
- “Show me a chart of direct spend for click_url 22271”
- “Visualize the spending for the last 30 days”
- “Display spend trends for multiple campaigns”
- “Chart the direct spend data”
Workflow
Step 1: Fetch Direct Spend Data
Use the FeedMob MCP tool to retrieve direct spend data:
mcp__feedmob__get_direct_spends
Required parameters:
start_date: Start date in YYYY-MM-DD formatend_date: End date in YYYY-MM-DD formatclick_url_ids: Array of click URL IDs (as strings)
Example:
{
"start_date": "2025-11-07",
"end_date": "2025-11-14",
"click_url_ids": ["22271", "22272"]
}
Step 2: Save the API Response
Save the JSON response from the API to a temporary file. This allows the visualization script to process the data.
Example:
import json
# API response data
api_response = {
"status": 200,
"data": [
{
"feedmob_click_url_id": 22271
...(truncated)
</details>
## Source
[View on GitHub](https://github.com/feed-mob/claude-code-marketplace)