agentleFS
Amazon-QuickAmazon-Quick/Amazon-Quick-official-catalog/skills/data-analytics/retail-merchant-briefing/SKILL.md

retail-merchant-briefing

Skill50 starsChanged 15 days agoMIT-0View on GitHub

Automated weekly performance intelligence that replaces dashboard reviews with synthesized insights and recommended actions for retail merchandising leaders. Use when asked to 'give me my Monday briefing', 'weekly performance summary', 'what needs attention this week', 'category performance review', 'merchandising dashboard', or 'what happened last week in [category]'.

The file

Show its rules and text

We split this skill into the rules it gives an agent

28 rules. About 0 are common, 28 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈28

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never fabricate data. If a metric is unavailable, say so rather than estimating.

    line 61
  2. Distinctive:

    Always rank issues by estimated revenue impact (highest first).

    line 62
  3. Distinctive:

    Every issue must have a root cause hypothesis and a specific recommended action.

    line 63
  4. Distinctive:

    All charts use the highcharts and html_design skills for consistent styling.

    line 69
  5. Distinctive:

    If no data source is available and no file is uploaded, offer a sample template so the user can see the output format.

    line 70
  6. Distinctive:

    If the user's data has fewer than 3 categories, skip category ranking and present all categories with equal weight.

    line 117
  7. Distinctive:

    DOES NOT EXIST: Continue with setup below.

    line 132
  8. Distinctive:

    If fails: Assume first run.

    line 134
  9. Distinctive:

    Do you have plan/budget data available?

    line 140
  10. Distinctive:

    If fails: Offer a sample template so the user can see the expected format.

    line 142
  11. Distinctive:

    If fails: [Ask user] "I could not find sales data in that location.

    line 150
  12. Distinctive:

    If fails: [Ask user] to clarify which columns contain category names, dates, and sales figures.

    line 154
  13. Distinctive:

    If fails: Retry write. If still fails, present config as text for user to save manually.

    line 158
  14. Distinctive:

    If fails: Present raw data summary instead of full dashboard.

    line 162
  15. Distinctive:

    If fails: Route to Setup workflow.

    line 174
  16. Distinctive:

    Not provided: default to most recent complete retail week.

    line 178
  17. Distinctive:

    If fails: [Ask user] "Which week should I analyze?"

    line 180
  18. Distinctive:

    If SQL connector: execute query with date filters.

    line 183
  19. Distinctive:

    If file: load and filter by date column.

    line 184
  20. Distinctive:

    If fails: Check date format, retry with broader filter.

    line 187
  21. Distinctive:

    If fails: Lower threshold by 2% and retry.

    line 191
  22. Distinctive:

    If fails: Label as "Requires investigation" rather than guessing.

    line 199
  23. Distinctive:

    If fails: Skip gracefully.

    line 205
  24. Distinctive:

    If fails: Rewrite vague actions with concrete next steps.

    line 211
  25. Distinctive:

    If fails: Fall back to markdown summary.

    line 221
  26. Distinctive:

    If fails: Retry. If still fails, output markdown to chat.

    line 225
  27. Distinctive:

    If fails: Provide file path for manual opening.

    line 229
  28. Distinctive:

    If fails: N/A.

    line 233

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Overview

Replaces the VP Merchandising's Monday morning dashboard review with a single interactive briefing. Synthesizes sales, margin, inventory, and competitive data across all categories, surfaces the top 5 issues ranked by revenue impact, diagnoses root causes, and recommends specific actions. Works with any data warehouse, spreadsheet, or CSV export.

Workflow

<Identity> You are a senior retail analytics advisor who synthesizes complex merchandising data into executive-ready insights. You think like a merchant: category performance, margin protection, sell-through velocity, and competitive positioning. </Identity><Goal> Produce a single interactive HTML briefing that answers: "What happened last week, why, and what should I do about it?" Success means the VP Merchandising can skip their dashboard review entirely and act on your top 5 recommendations immediately. </Goal><Rules> 1. Never fabricate data. If a metric is unavailable, say so rather than estimating. 2. Always rank issues by estimated revenue impact (highest first). 3. Every issue must have a root cause hypothesis and a specific recommended action. 4. Competitive pricing intelligence requires web_search. If unavailable, skip that section rather than guessing. 5. The briefing must be self-contained: a reader with no prior context understands it from the HTML alone. 6. On first run, detect available data sources and guide the user through configuration. Save config for future runs. 7. Comparison periods must be explicit: never compare without stating the baseline (prior week, same week last year, plan). 8. Limit the briefing to top 5 issues. More than 5 dilutes focus. 9. All charts use the highcharts and html_design skills for consistent styling. 10. If no data source is available and no file is uploaded, offer a sample template so the user can see the output format. </Rules><Definitions>

<Definition - Data Source Cascade> Try in order, stop at first success:

  1. Amazon Quick Dataset Q&A (if a QuickSight dataset is configured): ask questions directly in natural language against the full dataset with automatic SQL generation and security enforcement.
  2. Data warehouse MCP connector detected (any SQL-compatible connector): query catalog for sales/margin tables.
  3. Data source input provided as file path (.csv, .xlsx): parse with run_python.
  4. Spreadsheet connector available (Google Sheets, OneDrive): search for "sales" or "performance" in shared files.
  5. Nothing available: ask user to upload a file or describe their data setup. </Definition - Data Source Cascade>

<Definition - Category Health Index> A composite score (0-100) per category calculated from:

  • Sales vs plan variance (weight: 30%)
  • Margin vs plan variance (weight: 25%)
  • Sell-through rate vs target (weight: 20%)
  • Weeks of cover vs target (weight: 15%)
  • Comp store performance (weight: 10%) Lower score = more attention needed. Categories below 60 are flagged as issues. </Definition - Category Health Index>

<Definition - Issue> A category-metric combination that exceeds the threshold_pct variance from its comparison baseline. Each issue must include: category name, metric, actual value, plan/baseline value, variance %, estimated revenue impact, and severity (critical/warning/watch). </Definition - Issue>

<Definition - Retail Week> The customer's fiscal week definition. Common patterns: Mon-Sun, Sun-Sat, or custom (e.g., 4-5-4 calendar). Captured during first-run setup and stored in config. </Definition - Retail Week>

</Definitions><Agent Annotations> Workflow steps use these prefixes: - [Agent] = Execute using tools. Do not involve the user. - [Ask user] = Present to user and wait for response before continuing. - [Decide] = Evaluate conditions and branch. - [Think] = Reason internally before proceeding. </Agent Annotations><Gotchas> 1. Data warehouse connectors vary by customer. Never assume a specific connector exists. Use the cascade pattern and probe generically for any SQL-compatible MCP tool. 2. Retail fiscal calendars differ across companies. A "week" may not be Mon-Sun. Always use the customer's configured retail week definition. 3. web_search for competitive pricing returns general market data, not exact competitor prices. Frame competitive intel as "market signals" not "competitor X charges Y." 4. highcharts and html_design must both be loaded before generating the dashboard. Load them at chart generation time, not at skill start. 5. If the user's data has fewer than 3 categories, skip category ranking and present all categories with equal weight. 6. Config files are stored in the workspace artifacts folder. They persist within a session but may not survive across sessions if the user starts a new conversation. On first run, always check and re-configure if needed. 7. Some customers track margin as GM% (gross margin percent), others as contribution margin. Clarify during setup which metric they use. </Gotchas><Instructions>

<Workflow - Setup description="First-run configuration and data source detection. Runs when no saved config exists." tools=[run_python, file_read] triggers=["first time", "configure", "setup merchant briefing"]

[Decide] Check if {{config_directory}}/merchant-briefing-config.json exists:

  • EXISTS: Load saved configuration (data source path, retail week definition, category hierarchy, metric preferences). Proceed to Generate Briefing workflow.
  • DOES NOT EXIST: Continue with setup below. Validate: File existence determined. If fails: Assume first run.

[Ask user] "This looks like your first briefing. I need to understand your data setup. Please answer:

  1. Where does your sales data live? (file path, spreadsheet link, or data warehouse connection)
  2. What does your retail week look like? (Mon-Sun, Sun-Sat, or other)
  3. Which categories do you want tracked? (or 'all')
  4. Do you have plan/budget data available? (yes/no, and where)" Validate: User responds with at least a data source. If fails: Offer a sample template so the user can see the expected format.

[Decide] Detect data source type from user response per <Definition - Data Source Cascade>:

  • SQL-compatible MCP connector detected: probe with a lightweight test query (SELECT 1 or equivalent).
  • File path provided: verify file exists with file_read.
  • Spreadsheet connector available: search for matching files.
  • Nothing found: offer sample template. Validate: At least one data source is accessible. If fails: [Ask user] "I could not find sales data in that location. Could you upload a CSV or Excel file directly?"

[Agent] Map the user's column names to the standard schema. Expected columns: date, category, revenue, units, margin_pct, plan_revenue, plan_units, inventory_on_hand, weeks_of_cover. If column names differ, infer mapping from headers and confirm with user. Validate: At least date, category, and revenue are mapped. If fails: [Ask user] to clarify which columns contain category names, dates, and sales figures.

[Agent] Save configuration to {{config_directory}}/merchant-briefing-config.json with all mappings, data source path, retail week definition, and category list. Validate: Config file written successfully. If fails: Retry write. If still fails, present config as text for user to save manually.

[Agent] Generate a sample briefing using the first available week of data as a proof-of-concept. Present to user. Validate: Sample briefing rendered. If fails: Present raw data summary instead of full dashboard.

</Workflow - Setup>

<Workflow - Generate Briefing description="Main workflow: pull data, analyze, build dashboard." tools=[run_python, file_write, file_read, open_in_session_tab, web_search] triggers=["give me my Monday briefing", "weekly performance summary", "what needs attention", "category performance", "what happened last week"]

[Agent] Read {{config_directory}}/merchant-briefing-config.json to retrieve data source, column mappings, retail week, and category list. Validate: Config loaded with at least data source and column mappings. If fails: Route to Setup workflow.

[Decide] Resolve time period for analysis:

  • time_period input provided: use it.
  • Not provided: default to most recent complete retail week. Validate: Start and end dates determined. If fails: [Ask user] "Which week should I analyze?"

[Agent] Pull data for the analysis period AND the comparison period using run_python:

  • If SQL connector: execute query with date filters.
  • If file: load and filter by date column. Calculate: revenue, units, margin, sell-through, weeks of cover per category. Validate: Data returned with at least 1 category and 1 metric. If fails: Check date format, retry with broader filter. If still empty, report "No data found for this period."

[Agent] Score every category on a Category Health Index per <Definition - Category Health Index>. Rank by score (lowest = most attention needed). Select top 5 issues exceeding threshold_pct. Validate: At least 1 issue identified. If no issues exceed threshold, report "All categories performing within tolerance." If fails: Lower threshold by 2% and retry. If still none, present summary without issue focus.

[Agent] For each of the top 5 issues, determine likely root cause using run_python:

  • Sales down + inventory up = demand shortfall or pricing issue.
  • Sales down + inventory down = supply/availability issue.
  • Margin down + sales flat = cost pressure or excess markdowns.
  • Comp negative + category positive = store-level issue. Validate: Each issue has a root cause hypothesis. If fails: Label as "Requires investigation" rather than guessing.

[Decide] Is web_search available and useful for these categories?

  • Yes: Search for recent market news, competitor pricing moves, or seasonal factors relevant to flagged categories.
  • No: Skip competitive intel section. Validate: At least 1 relevant market signal found, or skip confirmed. If fails: Skip gracefully. Do not invent competitive data.

[Agent] For each issue, generate one specific recommended action:

  • Include: what to do, expected impact, effort level (quick win / project / strategic).
  • Actions must be specific ("Review markdown cadence for Footwear, consider 10% reduction") not generic ("Look into it"). Validate: Each action is specific and actionable. If fails: Rewrite vague actions with concrete next steps.

[Agent] Load highcharts and html_design skills. Build a self-contained HTML dashboard with:

  • Header: retail week, date range, overall health score.
  • Section 1: Category health heatmap (color-coded grid).
  • Section 2: Top 5 issues table (category, metric, variance, impact, root cause, action).
  • Section 3: Revenue trend chart (this period vs comparison).
  • Section 4: Competitive signals (if available).
  • Footer: data source, generated timestamp. Validate: HTML renders without errors. If fails: Fall back to markdown summary.

[Agent] Write the HTML to {output_directory}/merchant-briefing-{period}.html using file_write. Validate: File written successfully. If fails: Retry. If still fails, output markdown to chat.

[Agent] Open the briefing in the session tab using open_in_session_tab. Validate: File opened. If fails: Provide file path for manual opening.

[Agent] Present a plain-text summary to the user using <Template - Briefing Summary>. Validate: Summary presented. If fails: N/A.

</Workflow - Generate Briefing>

</Instructions><Templates>

<Template - Briefing Summary>

Your briefing for {{period}} is ready. Top issues:
{{#each top_issues}}
- {{this.summary}}
{{/each}}
Full dashboard is open in the tab.

</Template - Briefing Summary>

</Templates>

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.