Best use case
SKILL.md - sales-analytics is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
## Overview
Teams using SKILL.md - sales-analytics should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/sales-analytics/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How SKILL.md - sales-analytics Compares
| Feature / Agent | SKILL.md - sales-analytics | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
## Overview
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
Best AI Agents for Marketing
A curated list of the best AI agents and skills for marketing teams focused on SEO, content systems, outreach, and campaign execution.
SKILL.md Source
# SKILL.md - sales-analytics
## Overview
The sales-analytics skill provides advanced revenue analytics for farm direct-market sales. It computes season comparisons, per-product price histories, market comparisons, and trend analysis.
## Available Tools
### compare_seasons
Compare revenue performance between two seasons for the same farm.
**Input schema:**
```typescript
{
season_a: string; // e.g. "Spring 2025"
season_b: string; // e.g. "Spring 2024"
group_by?: "product" | "market" | "category"; // default: "product"
}
```
**Returns:**
```typescript
{
season_a: { name: string; total_revenue: number; event_count: number; avg_per_event: number };
season_b: { name: string; total_revenue: number; event_count: number; avg_per_event: number };
delta_revenue: number;
delta_pct: number;
rows: Array<{
group_key: string; // product/market/category name
revenue_a: number;
revenue_b: number;
delta_revenue: number;
delta_pct: number;
}>;
}
```
---
### compare_markets
Side-by-side comparison of two markets over the same date range.
**Input schema:**
```typescript
{
market_id_a: string;
market_id_b: string;
date_from: string;
date_to: string;
}
```
**Returns:**
```typescript
{
market_a: { name: string; type: string; total_revenue: number; event_count: number; avg_per_event: number; avg_customers: number | null };
market_b: { name: string; type: string; total_revenue: number; event_count: number; avg_per_event: number; avg_customers: number | null };
shared_products: Array<{
product_name: string;
revenue_a: number;
revenue_b: number;
avg_price_a: number;
avg_price_b: number;
}>;
weekly_revenue: Array<{
week: string;
revenue_a: number;
revenue_b: number;
}>;
}
```
---
### get_price_history
Retrieve historical unit prices for a single product over time, optionally split by market.
**Input schema:**
```typescript
{
product_id: string;
date_from?: string;
date_to?: string;
split_by_market?: boolean; // default false
}
```
**Returns:**
```typescript
{
product_name: string;
unit: string;
avg_price: number;
min_price: number;
max_price: number;
data_points: Array<{
date: string;
unit_price: number;
market_name: string | null;
quantity_sold: number;
}>;
by_market?: Array<{
market_name: string;
avg_price: number;
data_points: number;
}>;
}
```
---
### get_season_summary
Get a summary table of all seasons on record.
**Input schema:** `{}`
**Returns:**
```typescript
{
seasons: Array<{
season_name: string; // "Spring 2025"
date_from: string;
date_to: string;
total_revenue: number;
event_count: number;
avg_per_event: number;
top_product: string;
top_market: string;
}>;
}
```
---
### get_revenue_by_category
Revenue breakdown by product category for a date range.
**Input schema:**
```typescript
{
date_from: string;
date_to: string;
market_id?: string;
}
```
**Returns:**
```typescript
{
total_revenue: number;
categories: Array<{
category: string;
revenue: number;
pct_of_total: number;
product_count: number;
top_product: string;
}>;
}
```
---
### suggest_pricing
Analyze price history and suggest optimal pricing for each product based on historical data.
**Input schema:**
```typescript
{
product_id?: string; // if omitted, analyze all products
benchmark_market_id?: string; // compare price against this market specifically
}
```
**Returns:**
```typescript
{
suggestions: Array<{
product_name: string;
current_default_price: number;
avg_actual_price: number;
suggested_price: number;
reasoning: string; // e.g. "avg actual $4.31 exceeds default $4.00 — consider raising default"
price_by_market: Array<{ market_name: string; avg_price: number }>;
}>;
}
```
## Implementation Notes
- All queries use SQL aggregation on the `sale_line_items` table joined to `sale_events`, `products`, and `markets`
- Season boundaries are loaded from the `settings` table at query time; if not configured the season name is derived from the month: `{month_name} {year}`
- `compare_markets` weekly revenue aligns both markets to the same ISO week numbers, inserting `0` for weeks where a market had no events
- `suggest_pricing` returns suggestions only for products with at least 5 line item records; products with fewer records are returned with `reasoning: "insufficient data"`
- Percentage changes are computed as `(b - a) / a * 100` and returned as `number` rounded to 1 decimal placeRelated Skills
api-analytics-proxy
Transparent HTTP reverse proxy that records every request and response to SQLite and exposes a React dashboard for traffic analytics, latency percentiles, and error inspection
SKILL.md - market-sales-tracker
## Overview
yield-analytics
Query and interpret yield analytics data from harvest-logger. Use when asked about yield trends over time, comparing crop performance, finding the best-performing field, analyzing grade quality rates, running season comparisons, or generating data for external reports. Triggers include "yield trend", "top crops", "grade analysis", "field performance", "season comparison", "best yield", "harvest analytics", or any task requiring aggregated harvest data rather than individual entries.
Skill: Uptime Monitoring
## Overview
Skill: Status Page
## Overview
Skill: unit-conversion
## Overview
Skill: recipe-scaler
## Overview
reading-list
Operate the reading-list API to save, manage, tag, search, and export articles.
email-digest
Configure, test, and troubleshoot the reading-list daily email digest delivered via nodemailer.
websocket-realtime
Use the WebSocket connection in poll-builder to receive live vote updates. Use when you need to stream real-time poll results, monitor a poll for new votes, or build a live dashboard. Triggers include "live results", "real-time updates", "stream votes", "watch poll", or "WebSocket".
poll-builder
Self-hosted poll creation tool with real-time results. Use when you need to create a poll, check vote counts, close a poll, export results, or get the shareable link for a poll. Triggers include "create poll", "vote", "poll results", "survey", "collect votes", "share poll", or any task involving polling or voting.
Skill: personal-finance
## Overview