Specification
- Skill ID
- personamanagmentlayer/pcl/retail-expert
- Publisher
- personamanagmentlayer
- Repository
- pcl
- Installs
- 0
- Files
- 2
- Synced
- Sep 23, 2026
How to use it
Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.
personamanagmentlayer/pcl/retail-expertInstalls these files- SKILL.md
- references/POINT_OF_SALE_SYSTEM.md
What this skill tells the agent
Retail Expert
Expert guidance for retail systems, point-of-sale solutions, inventory management, e-commerce platforms, customer analytics, and omnichannel retail strategies.
Core Concepts
Retail Systems
- Point of Sale (POS) systems
- Inventory Management Systems (IMS)
- Customer Relationship Management (CRM)
- Order Management Systems (OMS)
- Warehouse Management Systems (WMS)
- E-commerce platforms
- Payment processing
Omnichannel Retail
- Online-to-offline (O2O) integration
- Buy online, pick up in store (BOPIS)
- Ship from store
- Unified customer profiles
- Cross-channel inventory visibility
- Consistent pricing across channels
- Integrated loyalty programs
Technologies
- Mobile POS (mPOS)
- Self-checkout systems
- Electronic shelf labels (ESL)
- RFID for inventory tracking
- Computer vision for analytics
- AI-powered recommendations
- Contactless payments
Inventory Management
import numpy as np
from datetime import datetime, timedelta
class InventoryManagementSystem:
"""Inventory management and optimization"""
def __init__(self):
self.products = {}
self.warehouses = {}
self.transfer_orders = []
def calculate_reorder_point(self,
average_daily_demand: float,
lead_time_days: int,
service_level: float = 0.95) -> dict:
"""Calculate optimal reorder point"""
# Safety stock calculation
demand_std_dev = average_daily_demand * 0.2 # Assume 20% variation
# Z-score for service level
from scipy import stats
z_score = stats.norm.ppf(service_level)
safety_stock = z_score * demand_std_dev * np.sqrt(lead_time_days)
reorder_point = (average_daily_demand * lead_time_days) + safety_stock
return {
'reorder_point': int(np.ceil(reorder_point)),
'safety_stock': int(np.ceil(safety_stock)),
'average_daily_demand': average_daily_demand,
'lead_time_days': lead_time_days,
'service_level': service_level
}
def calculate_economic_order_quantity(self,
annual_demand: float,
ordering_cost: Decimal,
holding_cost_per_unit: Decimal) -> dict:
"""Calculate Economic Order Quantity (EOQ)"""
eoq = np.sqrt(
(2 * annual_demand * float(ordering_cost)) /
float(holding_cost_per_unit)
)
# Calculate total annual cost
number_of_orders = annual_demand / eoq
ordering_cost_total = number_of_orders * float(ordering_cost)
holding_cost_total = (eoq / 2) * float(holding_cost_per_unit)
total_cost = ordering_cost_total + holding_cost_total
return {
'eoq': int(np.ceil(eoq)),
'orders_per_year': number_of_orders,
'order_frequency_days': int(365 / number_of_orders),
'total_annual_cost': total_cost,
'ordering_cost': ordering_cost_total,
'holding_cost': holding_cost_total
}
def analyze_abc(self, products: List[dict]) -> dict:
"""ABC analysis for inventory classification"""
# Calculate annual value for each product
for product in products:
product['annual_value'] = (
product['unit_cost'] * product['annual_demand']
)
# Sort by annual value
sorted_products = sorted(
products,
key=lambda x: x['annual_value'],
reverse=True
)
total_value = sum(p['annual_value'] for p in sorted_products)
cumulative_value = 0
results = {'A': [], 'B': [], 'C': []}
for product in sorted_products:
cumulative_value += product['annual_value']
percentage = (cumulative_value / total_value) * 100
if percentage <= 80:
category = 'A' # Top 20% items, 80% value
elif percentage <= 95:
category = 'B' # Next 30% items, 15% value
else:
category = 'C' # Bottom 50% items, 5% value
product['abc_category'] = category
results[category].append(product)
return {
'classification': results,
'summary': {
'A_items': len(results['A']),
'B_items': len(results['B']),
'C_items': len(results['C']),
'total_value': total_value
}
}
def forecast_demand(self,
historical_sales: List[float],
periods_ahead: int = 12) -> dict:
"""Forecast future demand using exponential smoothing"""
# Triple exponential smoothing (Holt-Winters)
alpha = 0.3 # Level smoothing
beta = 0.1 # Trend smoothing
gamma = 0.2 # Seasonality smoothing
season_length = 12 # Monthly seasonality
n = len(historical_sales)
forecast = []
# Initialize level and trend
level = np.mean(historical_sales[:season_length])
trend = (np.mean(historical_sales[season_length:2*season_length]) -
np.mean(historical_sales[:season_length])) / season_length
# Initialize seasonal indices
seasonal = np.array(historical_sales[:season_length]) / level
# Generate forecasts
for i in range(periods_ahead):
season_idx = i % season_length
forecast_value = (level + trend * (i + 1)) * seasonal[season_idx]
forecast.append(max(0, forecast_value))
return {
'forecast': forecast,
'periods_ahead': periods_ahead,
'method': 'holt_winters',
'confidence_interval_95': self._calculate_confidence_interval(
historical_sales,
forecast
)
}
def check_stock_levels(self) -> List[dict]:
"""Check stock levels and generate alerts"""
alerts = []
for sku, product in self.products.items():
# Check for low stock
if product.stock_quantity <= product.reorder_point:
alerts.append({
'type': 'reorder',
'severity': 'high',
'sku': sku,
'product_name': product.name,
'current_stock': product.stock_quantity,
'reorder_point': product.reorder_point,
'action': 'Place purchase order'
})
# Check for overstock
max_stock = product.reorder_point * 3
if product.stock_quantity > max_stock:
alerts.append({
'type': 'overstock',
'severity': 'medium',
'sku': sku,
'product_name': product.name,
'current_stock': product.stock_quantity,
'max_stock': max_stock,
'action': 'Review purchasing strategy'
})
# Check for no sales (dead stock)
# Implementation would check sales history
return alerts
def _calculate_confidence_interval(self,
historical: List[float],
forecast: List[float]) -> dict:
"""Calculate 95% confidence interval for forecast"""
# Simplified confidence interval
std_error = np.std(historical) * 1.5
return {
'lower': [max(0, f - 1.96 * std_error) for f in forecast],
'upper': [f + 1.96 * std_error for f in forecast]
}Customer Analytics
from sklearn.cluster import KMeans
import pandas as pd
class CustomerAnalytics:
"""Customer segmentation and analytics"""
def __init__(self):More from personamanagmentlayer
Use this skill in a project
Open any RiverX project, search the Skills panel for personamanagmentlayer/pcl/retail-expert, and install it in one click.
