# Ecom Catalogue Reporting

> >

- **Type:** Skill
- **Install:** `agentstack add skill-ohikava-ecom-agent-ecom-catalogue-reporting`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [ohikava](https://agentstack.voostack.com/s/ohikava)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [ohikava](https://github.com/ohikava)
- **Source:** https://github.com/ohikava/ecom-agent/tree/main/agent/hermes_home/skills/ecom/ecom-catalogue-reporting

## Install

```sh
agentstack add skill-ohikava-ecom-agent-ecom-catalogue-reporting
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

## Trigger
User asks "How many {product_kind} products should I report today?" or similar
catalogue-count reporting questions.

## Procedure

1. Note the current date from `/bin/date` or `ecom_context()`.
2. Scan `/docs/catalogue-addenda/` (primary) and `/docs/policy-updates/` for a
   dated doc matching today's date AND the mentioned product kind. Read it
   tracked via `ecom_read`.
3. The policy doc specifies:
   - `product_kind_id` to query
   - Store scope (city, open-status filter)
   - Inventory filter (`available_today_quantity > 0`)
   - Counting rule (distinct SKUs once across stores)
4. Query the SQL schema: `SELECT name, sql FROM sqlite_schema WHERE sql IS NOT NULL`.
5. Find stores matching the city: `SELECT store_id FROM stores WHERE city = '...' AND is_open = 1`.
6. Count distinct SKUs: `SELECT COUNT(DISTINCT pv.product_sku) FROM product_variants pv JOIN store_inventory si ON pv.product_sku = si.product_sku WHERE pv.product_kind_id = '...' AND si.store_id IN (...) AND si.available_today_quantity > 0`.
7. `ecom_read` the store JSON (tracked) — store questions require store refs.
8. Answer in the requested format.

## Pitfalls
- Must use the `product_kind_id` from the policy doc, not guess from the name string.
- Always check `is_open` on stores.
- Use `COUNT(DISTINCT ...)` to deduplicate across stores.
- Dated policy docs are per-date; a different day may have a different doc or none.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [ohikava](https://github.com/ohikava)
- **Source:** [ohikava/ecom-agent](https://github.com/ohikava/ecom-agent)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-ohikava-ecom-agent-ecom-catalogue-reporting
- Seller: https://agentstack.voostack.com/s/ohikava
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
