direct-spend-visualizer

Visualize FeedMob direct spend data as ASCII line charts

View on GitHub
Author Richard Hao
Namespace @feed-mob/feedmob-claude-plugins
Category general
Version 1.0.0
Stars 2
Downloads 3
self.md verified
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

Installation

This plugin is part of the FeedMob Claude Plugins marketplace. It will be automatically available when the plugin is installed.

Prerequisites

  1. Python 3.6 or higher
  2. 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:

Quick Start Examples

Example 1: Single Campaign Visualization

Request:

Show me direct spend for click_url 22271 for the last 7 days

Result:

Example 2: Multiple Campaigns

Request:

Visualize direct spend for click_urls 22271, 22272, and 22273 from 2025-11-01 to 2025-11-14

Result:

Example 3: Custom Date Range

Request:

Chart direct spend for the last 30 days for click_url 22271

Result:

How It Works

  1. API Data Retrieval: Fetches direct spend data using the FeedMob MCP API (mcp__feedmob__get_direct_spends)
  2. Data Processing: Saves API response to temporary JSON file
  3. Visualization: Executes Python script to generate ASCII charts
  4. Display: Presents charts, legends, and data tables to the user

Output Format

The visualization includes:

  1. 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
  2. Legend

    • Clear explanation of chart symbols
    • Net Spend (N) vs Gross Spend (G)
  3. 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:

API Integration

This plugin uses the FeedMob MCP API to retrieve direct spend data:

Tool: mcp__feedmob__get_direct_spends

Parameters:

Example Call:

{
  "start_date": "2025-11-07",
  "end_date": "2025-11-14",
  "click_url_ids": ["22271", "22272"]
}

Best Practices

  1. Date Ranges: For large date ranges, consider breaking into smaller periods for better visualization
  2. Multiple Campaigns: The script automatically creates separate charts for each click URL ID
  3. 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:

Example user requests:

Workflow

Step 1: Fetch Direct Spend Data

Use the FeedMob MCP tool to retrieve direct spend data:

mcp__feedmob__get_direct_spends

Required parameters:

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)
Tags: general