Skip to content

monte-carlo-data/mc-agent-toolkit / skills/storage-cost-analysis

monte-carlo-storage-cost-analysis

Verified

Analyze a warehouse for stale, unused, or redundant tables via the analyze_storage_costs MCP tool. Classifies waste patterns and table categories, computes safety tiers, and handles category drill-downs and lineage follow-ups.

FileKindSize
README.mdmarkdown1.9 KB
SKILL.mdskill md8.7 KB
references/output-structure.mdmarkdown4.5 KB

references/output-structure.md

View on GitHub
# `analyze_storage_costs` Output Structure

The `analyze_storage_costs` MCP tool returns a single formatted string containing two machine-readable regions. The skill treats these regions as a contract — always preserve them verbatim when copying.

## Regions

### `<!-- PRESENT_AS_IS -->` ... `<!-- /PRESENT_AS_IS -->`

A condensed summary block containing:

- Warehouse name and totals (candidate count, total candidate bytes)
- Safety-tier summary
- A Top-N table of the largest candidates across all categories (default N = 30)
- A drill-down prompt listing the available categories

**Present this block verbatim as the initial response.** Do not paraphrase, re-order columns, drop rows, or strip the HTML comment markers. The markers are load-bearing: removing them breaks the drill-down flow downstream.

### `<!-- CATEGORY_DETAILS -->` ... `<!-- /CATEGORY_DETAILS -->`

Contains per-category sections wrapped in `<!-- CATEGORY:<key> -->` ... `<!-- /CATEGORY:<key> -->` markers. One section per category.

**Do NOT present this block on the initial response.** Hold it for drill-down requests.

## Category keys and keyword mapping

| Key | User phrases that map to it |
|-----|-----------------------------|
| `temporary` | "temporary", "staging", "tmp", "stg", "test tables" |
| `archive_snapshot` | "archive", "snapshot", "backup", "old", "historical" |
| `other` | "uncategorized", "other", "unknown", "misc" |
| `production` | "production", "prod", "critical", "important", "monitored" |

"Show me everything" / "all categories" → present each section in order: `temporary` → `archive_snapshot` → `other` → `production`.

## Drill-down rule

When the user asks about a category, find the matching `<!-- CATEGORY:<key> -->` section in the `analyze_storage_costs` result already present in the conversation history and present its content verbatim. **Never re-invoke `analyze_storage_costs` for a drill-down** — the data is already there and re-fetching wastes turns.

## Column layout

Each per-category and Top-N table has this column order:

```
Table | Category | Type | Size | [$/mo] | Pattern | Usage & Risk
```

`$/mo` appears only for Snowflake warehouses.

## The Usage & Risk column

The trailing `Usage & Risk` column merges read-side activity with risk flags into a single cell:

```
{activity}                          # when no flags fire
{activity}; {flag1, flag2, ...}     # when one or more flags fire
```

**Activity values** (always present):

| Value | Meaning |
|-------|---------|
| `No reads` | No recorded reads |
| `180d · 0 reads` | Last read N days ago, zero total reads |
| `2d · 580 reads / 14 users` | Recent reads, total reads, distinct reading users |

A low `days since read` is only meaningful alongside reads + users — a single backup job or security scanner is enough to reset the "last read" clock on a cold table. Interpret staleness against the full activity.

**Risk flags** (appended after `; ` in this fixed order when any fire):

| Flag | Meaning |
|------|---------|
| `high criticality` / `medium criticality` | Pre-computed criticality label. `low` is omitted. |
| `N consumers` | Count of ALL consumers — other tables/views AND BI dashboards or non-table assets |
| `high importance score` | `is_important == true`, which means `importance_score >= 0.6`. A computed signal from the Databricks key-table-scores job, **not** a user-applied tag. |
| `has monitors` | Actively monitored by Monte Carlo |

The `N consumers` flag counts more than the lineage tool returns: `get_asset_lineage` only yields table-to-table edges, so BI dashboards and other consumer types are included in `N consumers` but won't appear in lineage results. When the user runs a lineage check and sees fewer downstream tables than `N consumers` implied, explain the gap — the missing consumers are likely dashboards or external tools.

## MCON links

MCONs in the pre-formatted tables are rendered as markdown links:

```
[`db:schema.table`](https://getmontecarlo.com/assets/MCON++<account>++<resource>++<type>++<id>)
```

Preserve the full link when copying. Never output the bare MCON string as plain text — the UI depends on the link for navigation, and the skill contract forbids surfacing raw internal identifiers.

## Errors and empty results

- Tool returns an error → report it to the user and stop.
- Tool returns "No optimization candidates found..." → relay the message and stop.
- Tool returns a warehouse picker list → let the user choose, then call the tool again with the chosen `warehouse_id`.
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall