abc-analysis — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited abc-analysis (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Classify SKUs into A/B/C priority tiers based on revenue contribution (Pareto analysis). Produces a classified CSV, Pareto curve chart (PNG), and a formatted PDF report — all three, every run.
Activate when the user:
Before running the script, prefer explicit paths the user already provided. Only search for files when the path is missing or ambiguous.
orders_export*.csv, Orders*.csv in the current directory and common locations (~/Downloads, ~/Desktop)Name, Email, Lineitem sku, Lineitem quantity, Lineitem priceTitle, Variant SKU, Variant PricePython 3.9+ is required. Install dependencies before the first run:
pip install pandas>=2.0 matplotlib>=3.7 reportlab>=4.0pip install fails| Error | Fix |
|---|---|
permission denied | Use pip install --user pandas matplotlib reportlab |
pip: command not found | Try pip3 install or python3 -m pip install |
externally-managed-environment (Debian/Ubuntu) | Create a venv: python3 -m venv .venv && source .venv/bin/activate && pip install pandas matplotlib reportlab |
| Module still not found after install | Confirm the Python running the script matches where pip installed: which python3 and which pip3 should share a prefix |
Alternatively, if you have resolved the installed skill root, install from the bundled requirements file:
pip install -r "$SKILL_DIR/scripts/requirements.txt"Set SKILL_DIR to the installed skill directory in your environment before using that command.
The skill needs sales data with SKU identifiers and revenue (or quantity) information.
Lineitem sku, Lineitem quantity, Lineitem price automatically.Title, Variant SKU columns.Any CSV with SKU and revenue/quantity columns works. Use --sku-col and --revenue-col to specify column names if auto-detection fails.
The script also auto-detects a date column (looking for Created at, Date, Order Date, order_date) for two purposes:
--period requires a date column to filter by days lookbackIf no date column is found, period filtering is skipped and new product detection falls back to a generic caveat.
Resolve the installed skill root first. The exact path depends on where the skill was installed in the current environment.
SKILL_DIR="<resolved-installed-skill-dir>"
python "$SKILL_DIR/scripts/abc_analysis.py" \
--orders <path-to-orders-csv> \
--products <path-to-products-csv> \
--output-dir ./abc-output| Flag | Default | Description |
|---|---|---|
--orders | (required) | Path to orders/sales CSV |
--products | — | Path to products CSV (for title enrichment) |
--output-dir | ./abc-output | Directory for output files |
--thresholds | 80,95 | A/B cumulative % split points |
--period | all data | Days lookback filter (e.g., 90 for last 90 days) |
--metric | revenue | Classify by revenue or quantity |
--sku-col | auto-detect | SKU column name for generic CSVs |
--revenue-col | auto-detect | Revenue column name for generic CSVs |
--quantity-col | auto-detect | Quantity column name for generic CSVs |
--products-sku-col | auto-detect | SKU column name in products CSV (when different from orders) |
--json | false | Output structured JSON to stdout instead of human-readable text |
--csv-only | false | Skip PNG and PDF generation (faster, CSV only) |
Default output goes to ./abc-output relative to the current working directory. For clarity, prefer placing outputs next to the input files or in a location you can communicate clearly to the user:
--output-dir "$(dirname /path/to/orders.csv)/abc-output"After the script runs, always tell the user the full absolute path to each output file.
Shopify exports with 90-day lookback:
python "$SKILL_DIR/scripts/abc_analysis.py" \
--orders orders_export.csv \
--products products_export.csv \
--output-dir ./abc-output \
--period 90Generic sales CSV:
python "$SKILL_DIR/scripts/abc_analysis.py" \
--orders sales_data.csv \
--sku-col "Item Code" \
--revenue-col "Total Sales" \
--output-dir ./abc-outputCustom thresholds (70/90 split):
python "$SKILL_DIR/scripts/abc_analysis.py" \
--orders orders.csv \
--thresholds 70,90The script always produces all three outputs:
The script also prints a summary to stdout with tier breakdowns and output file paths.
After the script runs:
reference.md for follow-up questions about ABC methodology or deeper discussion of any recommendation--products is omitted, the CSV and PDF will show SKU codes without product namesFinancial Status column are automatically filtered to paid/authorized orders. If absent, cancelled orders may inflate revenue — noted in caveats~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.