{"id":"b1c19bef-b798-495f-badb-9ead2931fbf7","shortId":"CjhHnC","kind":"skill","title":"monte-carlo-storage-cost-analysis","tagline":"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.","description":"# Monte Carlo Storage Cost Analysis Skill\n\nThis skill analyzes a data warehouse for stale tables that can be removed to reduce storage costs. It delegates classification, safety scoring, and formatting to the `analyze_storage_costs` MCP tool, then presents the pre-formatted result verbatim and handles follow-up questions (category drill-downs, lineage checks).\n\nReference file (use the Read tool to access it):\n\n- Output contract and category keywords: `references/output-structure.md`\n\n## When to activate this skill\n\nActivate when the user:\n\n- Asks about storage costs, waste, or cleanup opportunities\n- Wants to find unused, unread, or stale tables\n- Asks \"which tables can I drop?\" or \"what's costing us money?\"\n- Mentions storage optimization, cost reduction, or warehouse cleanup\n- Wants to identify zombie tables, dead-end pipelines, or temporary/archive tables\n\n## When NOT to activate this skill\n\nDo not activate when the user is:\n\n- Just querying data or exploring table contents\n- Creating or modifying monitors (use the monitoring-advisor skill)\n- Investigating data quality incidents (use the prevent skill)\n- Looking at pipeline performance or query cost (use the performance-diagnosis skill)\n\n## Prerequisites\n\nThe following MCP tools must be available (connect to Monte Carlo's MCP server):\n\n- `analyze_storage_costs` -- runs the full analysis pipeline and returns pre-formatted output\n- `get_asset_lineage` -- used only for follow-up lineage checks\n\nThe `analyze_storage_costs` tool supports **Snowflake, BigQuery, Redshift, and Databricks** warehouses only. Other warehouse types are out of scope.\n\n## Workflow\n\n**Important:** These steps are internal instructions for you. Do NOT expose step numbers, step names, or the procedural structure to the user. Just act naturally.\n\n### Step 1: Identify the warehouse\n\nYou need a warehouse to proceed.\n\n- **If the user specified a warehouse** (by name or UUID), use it.\n- **If not:** call `analyze_storage_costs` with no `warehouse_id`. The tool will either auto-pick when only one supported warehouse exists, or return a list of supported warehouses — let the user choose one, then call the tool again with the chosen `warehouse_id`.\n\n### Step 2: Run the analysis\n\nCall `analyze_storage_costs` with:\n\n- `warehouse_id`: the warehouse UUID\n\nThe tool fetches candidates, classifies them into waste patterns (Unread, Write-only, Dead-end, Static waste, Zombie, Other stale) and table categories (Temporary, Archive/Snapshot, Production, Other), computes safety tiers, and returns a formatted analysis.\n\n- If the tool returns an error, report it to the user and stop.\n- If no candidates are found, tell the user and stop.\n\n### Step 3: Present the initial summary\n\nThe tool output contains two regions:\n\n1. A `<!-- PRESENT_AS_IS -->` block with a condensed summary, a Top-N table, and a drill-down prompt.\n2. A `<!-- CATEGORY_DETAILS -->` block with per-category tables wrapped in `<!-- CATEGORY:<key> -->` markers. Do NOT present these yet.\n\nPresent ONLY the `<!-- PRESENT_AS_IS -->` block — copy it verbatim, preserving every column, row, and value. Add a brief intro sentence if needed, then paste the block unchanged. The user will see the summary and top tables, then choose a category to drill into.\n\n**CRITICAL — do NOT call any other tool after `analyze_storage_costs` succeeds.** No `search`, no `get_table`, no troubleshooting agents, no cross-checks. The analysis result IS the final answer; your only remaining job is to present the `<!-- PRESENT_AS_IS -->` block verbatim.\n\n**CRITICAL — preserve markdown-linked MCONs verbatim.** The pre-formatted tables already contain properly linked MCONs (e.g., `` [`db:schema.table`](https://getmontecarlo.com/assets/MCON++...) ``). Never output bare MCON strings as plain text.\n\n### Step 4: Handle follow-up requests\n\n**Category drill-downs.** When the user asks about a specific category (\"show me temporary tables\", \"what about production?\", \"tell me more about archive\"):\n\n1. Find the matching `<!-- CATEGORY:<key> -->` section in the `analyze_storage_costs` result already in the conversation. **Do NOT re-invoke `analyze_storage_costs`** — the data is already there.\n2. Present that section's content verbatim — every column, row, and value.\n3. After presenting, remind the user of remaining categories they haven't explored yet.\n\nCategory keywords (see `references/output-structure.md` for the full list):\n\n- \"temporary\", \"staging\", \"tmp\", \"stg\" → `CATEGORY:temporary`\n- \"archive\", \"snapshot\", \"backup\", \"old\" → `CATEGORY:archive_snapshot`\n- \"uncategorized\", \"other\", \"unknown\" → `CATEGORY:other`\n- \"production\", \"prod\", \"critical\", \"important\" → `CATEGORY:production`\n\nIf the user says \"show me everything\" or \"all categories\", present all category sections in order: temporary → archive → uncategorized → production.\n\n**Lineage checks.** When the user asks what consumes a specific table (\"check lineage for X\", \"is it safe to remove Y?\", \"what depends on this table?\"):\n\n1. Call `get_asset_lineage` with `mcons: [<table mcon>]` and `direction: \"DOWNSTREAM\"`.\n2. If `has_relationships: false` → the table's consumers are likely BI dashboards or tools (not other tables). Mention this — it may still be safe to remove, but the user should verify with dashboard owners.\n3. If downstream tables exist AND are also stale → recommend removing both.\n4. If downstream tables are active → flag as risky, do NOT recommend removal.\n\n**Note:** The `N consumers` flag in the Usage & Risk column counts ALL consumers, including BI dashboards (Looker, Tableau, Power BI) and other non-table assets. The lineage tool only returns table-to-table edges, so lineage results may show fewer consumers than the count. When that happens, explain the gap to the user.\n\n## Reading the Usage & Risk column\n\nEach row's final `Usage & Risk` cell combines read-side activity with risk flags. Format:\n\n```\n{activity}                          # no flags fire\n{activity}; {flag1, flag2, ...}     # one or more flags fire\n```\n\n**Activity values** (always present):\n\n- `No reads` -- no recorded reads\n- `180d · 0 reads` -- last read N days ago, zero total reads\n- `2d · 580 reads / 14 users` -- recent reads, total reads and distinct reading users\n\nA low `days since read` is only meaningful when paired with the read count — a single backup job or security scanner can make a cold table look \"1d\". Always weigh staleness against reads + users.\n\n**Risk flags** (appended after `; ` in this fixed order when any fire):\n\n- `high criticality` / `medium criticality` -- pre-computed criticality\n- `N consumers` -- has active consumers (tables, views, or BI dashboards); verify before removing\n- `high importance score` -- `is_important` is a thresholded `importance_score ≥ 0.6` computed upstream in Databricks, **not** a user-applied tag\n- `has monitors` -- actively monitored by Monte Carlo\n\n## Table categories\n\nTables are automatically classified for prioritized review:\n\n- **Temporary/Staging** -- Short-lived ETL/test tables (safest to drop)\n- **Archive/Snapshot** -- Historical copies, date-suffixed tables (verify retention policies)\n- **Production** -- Monitored, critical, or lineage-important tables (highest risk)\n- **Other** -- No strong signal either way (needs manual review)\n\n## Scope limitations\n\n- **Storage** costs only -- not compute, query optimization, or billing\n- One warehouse per analysis\n- **Snowflake, BigQuery, Redshift, and Databricks** only\n- **Recommendations only** -- never execute DROP TABLE or destructive actions","tags":["storage","cost","analysis","agent","toolkit","monte-carlo-data","agent-observability","agent-skills","ai-agents","claude-code","codex-skills","cursor"],"capabilities":["skill","source-monte-carlo-data","skill-storage-cost-analysis","topic-agent-observability","topic-agent-skills","topic-ai-agents","topic-claude-code","topic-codex-skills","topic-cursor","topic-data-observability","topic-data-quality","topic-mcp","topic-monte-carlo","topic-opencode","topic-skill-md"],"categories":["mc-agent-toolkit"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/monte-carlo-data/mc-agent-toolkit/storage-cost-analysis","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add monte-carlo-data/mc-agent-toolkit","source_repo":"https://github.com/monte-carlo-data/mc-agent-toolkit","install_from":"skills.sh"}},"qualityScore":"0.489","qualityRationale":"deterministic score 0.49 from registry signals: · indexed on github topic:agent-skills · 78 github stars · SKILL.md body (7,531 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-02T12:55:22.287Z","embedding":null,"createdAt":"2026-04-18T22:12:55.886Z","updatedAt":"2026-05-02T12:55:22.287Z","lastSeenAt":"2026-05-02T12:55:22.287Z","tsv":"'/assets/mcon++...)':601 '0':941 '0.6':1040 '1':310,463,641,773 '14':954 '180d':940 '1d':991 '2':378,481,669,783 '2d':951 '3':452,681,818 '4':611,830 '580':952 'access':107 'act':307 'action':1134 'activ':117,120,175,180,835,914,919,923,931,1020,1053 'add':510 'advisor':200 'agent':557 'ago':947 'alreadi':591,652,667 'also':825 'alway':933,992 'analysi':6,47,244,381,427,563,1119 'analyz':7,18,51,75,238,264,335,383,546,648,661 'answer':568 'append':1000 'appli':1049 'archiv':640,709,714,744 'archive/snapshot':417,1076 'ask':124,140,624,752 'asset':253,776,868 'auto':347 'auto-pick':346 'automat':1062 'avail':230 'backup':711,980 'bare':604 'bi':794,857,862,1025 'bigqueri':270,1121 'bill':1115 'block':465,483,500,520,577 'brief':512 'call':334,368,382,541,774 'candid':395,443 'carlo':3,44,234,1057 'categori':28,34,94,112,415,487,534,617,628,689,695,707,713,719,725,736,739,1059 'cell':909 'check':99,262,561,748,758 'choos':365,532 'chosen':374 'classif':68 'classifi':23,396,1063 'cleanup':130,159 'cold':988 'column':506,677,852,902 'combin':910 'comput':29,420,1015,1041,1111 'condens':468 'connect':231 'consum':754,791,846,855,885,1018,1021 'contain':460,592 'content':191,674 'contract':110 'convers':655 'copi':501,1078 'cost':5,20,46,65,77,127,149,155,216,240,266,337,385,548,650,663,1108 'count':853,888,977 'creat':192 'critic':538,579,723,1010,1012,1016,1088 'cross':560 'cross-check':559 'dashboard':795,816,858,1026 'data':53,187,203,665 'databrick':273,1044,1124 'date':1080 'date-suffix':1079 'day':946,966 'db':597 'dead':166,406 'dead-end':165,405 'deleg':67 'depend':769 'destruct':1133 'diagnosi':221 'direct':781 'distinct':961 'down':37,97,620 'downstream':782,820,832 'drill':36,96,478,536,619 'drill-down':35,95,477,618 'drop':145,1075,1130 'e.g':596 'edg':878 'either':345,1100 'end':167,407 'error':433 'etl/test':1071 'everi':505,676 'everyth':733 'execut':1129 'exist':354,822 'explain':892 'explor':189,693 'expos':294 'fals':787 'fetch':394 'fewer':884 'file':101 'final':567,906 'find':134,642 'fire':922,930,1008 'fix':1004 'flag':836,847,917,921,929,999 'flag1':924 'flag2':925 'follow':41,91,225,259,614 'follow-up':40,90,258,613 'format':72,85,250,426,589,918 'found':445 'full':243,701 'gap':894 'get':252,553,775 'getmontecarlo.com':600 'getmontecarlo.com/assets/mcon++...)':599 'handl':33,89,612 'happen':891 'haven':691 'high':1009,1030 'highest':1094 'histor':1077 'id':341,376,388 'identifi':162,311 'import':284,724,1031,1034,1038,1092 'incid':205 'includ':856 'initi':455 'instruct':289 'intern':288 'intro':513 'investig':202 'invok':660 'job':572,981 'keyword':113,696 'last':943 'let':362 'like':793 'limit':1106 'lineag':39,98,254,261,747,759,777,870,880,1091 'lineage-import':1090 'link':583,594 'list':358,702 'live':1070 'look':210,990 'looker':859 'low':965 'make':986 'manual':1103 'markdown':582 'markdown-link':581 'marker':491 'match':644 'may':804,882 'mcon':584,595,605,779 'mcp':21,78,226,236 'meaning':971 'medium':1011 'mention':152,801 'modifi':194 'money':151 'monitor':195,199,1052,1054,1087 'monitoring-advisor':198 'mont':2,43,233,1056 'monte-carlo-storage-cost-analysi':1 'must':228 'n':473,845,945,1017 'name':298,327 'natur':308 'need':315,516,1102 'never':602,1128 'non':866 'non-tabl':865 'note':843 'number':296 'old':712 'one':351,366,926,1116 'opportun':131 'optim':154,1113 'order':742,1005 'output':109,251,459,603 'owner':817 'pair':973 'past':518 'pattern':25,400 'per':486,1118 'per-categori':485 'perform':213,220 'performance-diagnosi':219 'pick':348 'pipelin':168,212,245 'plain':608 'polici':1085 'power':861 'pre':84,249,588,1014 'pre-comput':1013 'pre-format':83,248,587 'prerequisit':223 'present':81,453,494,497,575,670,683,737,934 'preserv':504,580 'prevent':208 'priorit':1065 'procedur':301 'proceed':319 'prod':722 'product':418,635,721,726,746,1086 'prompt':480 'proper':593 'qualiti':204 'queri':186,215,1112 'question':93 're':659 're-invok':658 'read':104,898,912,936,939,942,944,950,953,957,959,962,968,976,996 'read-sid':911 'recent':956 'recommend':827,841,1126 'record':938 'redshift':271,1122 'reduc':63 'reduct':156 'redund':14 'refer':100 'references/output-structure.md':114,698 'region':462 'relationship':786 'remain':571,688 'remind':684 'remov':61,766,809,828,842,1029 'report':434 'request':616 'result':86,564,651,881 'retent':1084 'return':247,356,424,431,873 'review':1066,1104 'risk':851,901,908,916,998,1095 'riski':838 'row':507,678,904 'run':241,379 'safe':764,807 'safest':1073 'safeti':30,69,421 'say':730 'scanner':984 'schema.table':598 'scope':282,1105 'score':70,1032,1039 'search':551 'section':645,672,740 'secur':983 'see':525,697 'sentenc':514 'server':237 'short':1069 'short-liv':1068 'show':629,731,883 'side':913 'signal':1099 'sinc':967 'singl':979 'skill':48,50,119,177,201,209,222 'skill-storage-cost-analysis' 'snapshot':710,715 'snowflak':269,1120 'source-monte-carlo-data' 'specif':627,756 'specifi':323 'stage':704 'stale':11,56,138,412,826,994 'static':408 'step':286,295,297,309,377,451,610 'stg':706 'still':805 'stop':440,450 'storag':4,19,45,64,76,126,153,239,265,336,384,547,649,662,1107 'string':606 'strong':1098 'structur':302 'succeed':549 'suffix':1081 'summari':456,469,527 'support':268,352,360 'tabl':15,27,57,139,142,164,171,190,414,474,488,530,554,590,632,757,772,789,800,821,833,867,875,877,989,1022,1058,1060,1072,1082,1093,1131 'table-to-t':874 'tableau':860 'tag':1050 'tell':446,636 'temporari':416,631,703,708,743 'temporary/archive':170 'temporary/staging':1067 'text':609 'threshold':1037 'tier':31,422 'tmp':705 'tool':22,79,105,227,267,343,370,393,430,458,544,797,871 'top':472,529 'top-n':471 'topic-agent-observability' 'topic-agent-skills' 'topic-ai-agents' 'topic-claude-code' 'topic-codex-skills' 'topic-cursor' 'topic-data-observability' 'topic-data-quality' 'topic-mcp' 'topic-monte-carlo' 'topic-opencode' 'topic-skill-md' 'total':949,958 'troubleshoot':556 'two':461 'type':278 'uncategor':716,745 'unchang':521 'unknown':718 'unread':136,401 'unus':12,135 'up':42 'upstream':1042 'us':150 'usag':850,900,907 'use':102,196,206,217,255,330 'user':123,183,305,322,364,438,448,523,623,686,729,751,812,897,955,963,997,1048 'user-appli':1047 'uuid':329,391 'valu':509,680,932 'verbatim':87,503,578,585,675 'verifi':814,1027,1083 'via':16 'view':1023 'want':132,160 'warehous':9,54,158,274,277,313,317,325,340,353,361,375,387,390,1117 'wast':24,128,399,409 'way':1101 'weigh':993 'workflow':283 'wrap':489 'write':403 'write-on':402 'x':761 'y':767 'yet':496,694 'zero':948 'zombi':163,410","prices":[{"id":"16f50479-9803-44fe-afa4-927a05e7825d","listingId":"b1c19bef-b798-495f-badb-9ead2931fbf7","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"monte-carlo-data","category":"mc-agent-toolkit","install_from":"skills.sh"},"createdAt":"2026-04-18T22:12:55.886Z"}],"sources":[{"listingId":"b1c19bef-b798-495f-badb-9ead2931fbf7","source":"github","sourceId":"monte-carlo-data/mc-agent-toolkit/storage-cost-analysis","sourceUrl":"https://github.com/monte-carlo-data/mc-agent-toolkit/tree/main/skills/storage-cost-analysis","isPrimary":false,"firstSeenAt":"2026-04-18T22:12:55.886Z","lastSeenAt":"2026-05-02T12:55:22.287Z"}],"details":{"listingId":"b1c19bef-b798-495f-badb-9ead2931fbf7","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"monte-carlo-data","slug":"storage-cost-analysis","github":{"repo":"monte-carlo-data/mc-agent-toolkit","stars":78,"topics":["agent-observability","agent-skills","ai-agents","claude-code","codex-skills","cursor","data-observability","data-quality","mcp","monte-carlo","opencode","skill-md","skillsmp","vscode"],"license":"apache-2.0","html_url":"https://github.com/monte-carlo-data/mc-agent-toolkit","pushed_at":"2026-04-30T23:25:43Z","description":"Official Monte Carlo toolkit for AI coding agents. Skills and plugins that bring data and agent observability — monitoring, triaging, troubleshooting, health checks  — into Claude Code, Cursor, and more.","skill_md_sha":"09552f1359aceee2d1bb3022d751c6308469a9e2","skill_md_path":"skills/storage-cost-analysis/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/monte-carlo-data/mc-agent-toolkit/tree/main/skills/storage-cost-analysis"},"layout":"multi","source":"github","category":"mc-agent-toolkit","frontmatter":{"name":"monte-carlo-storage-cost-analysis","description":"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."},"skills_sh_url":"https://skills.sh/monte-carlo-data/mc-agent-toolkit/storage-cost-analysis"},"updatedAt":"2026-05-02T12:55:22.287Z"}}