skills/deepline-analytics/SKILL.md
Use this skill when answering business analytics, RevOps, GTM metric, pipeline, revenue, funnel, customer, or warehouse questions with Deepline. Triggers on phrases like 'query Snowflake', 'analyze pipeline', 'total ACV', 'break down by quarter', 'use the semantic layer', 'run a semantic query', or any use of snowflake_get_semantic_layer / snowflake_run_semantic_query. Skip prospecting, enrichment, contact finding, outbound, or personalization workflows; use deepline-gtm for those.
npx skillsauth add getaero-io/gtm-eng-skills deepline-analyticsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill to answer customer analytics questions through Deepline's warehouse and semantic-layer tools. The goal is not just to run SQL; it is to preserve the customer's business definitions by starting from the semantic layer, validating the query path, and reporting exactly what metric definitions and filters were used.
Use deepline-gtm instead when the task is prospecting, enrichment, contact finding, outbound sequencing, personalization, or row-by-row lead/account research. Analytics questions ask about existing customer data: revenue, pipeline, funnel, conversion, retention, usage, calls, accounts, opportunities, or warehouse tables.
If Snowflake credentials or a semantic layer are missing, stop and report the setup blocker. Guessing table names or falling straight to raw SQL hides the actual problem and usually produces incorrect business definitions.
| User asks... | Job | Start with |
| --- | --- | --- |
| "What is total pipeline by quarter?" | Metric breakdown | snowflake_get_semantic_layer, then snowflake_run_semantic_query |
| "Break revenue down by product/month" | Dimensional analysis | Inspect semantic tables for revenue metrics and time dimensions |
| "How many opportunities / accounts / calls..." | Simple count metric | Find the semantic count metric before writing SQL |
| "Why does this number look wrong?" | Debug/validation | Run semantic query, inspect returned SQL, then compare with raw SQL only if needed |
| "Query this specific warehouse table" | SQL fallback | Check whether it is represented in the semantic layer; otherwise use snowflake_run_query |
| "Upload/edit/read the semantic layer" | Admin setup | Use snowflake_update_semantic_layer / snowflake_get_semantic_layer, then return here for querying |
Use the Deepline CLI for these tools. snowflake_get_semantic_layer and snowflake_run_semantic_query are Deepline tool IDs invoked with deepline tools execute ...; do not search for MCP/deferred tool names first.
deepline auth status so you know which workspace receives the query.deepline tools execute snowflake_get_semantic_layer ... before constructing payloads. Use includeYaml: false for a quick table list, and includeYaml: true when choosing exact metrics, dimensions, or filters.table_name, named metrics, named dimensions or time_dimensions, and named filters from the YAML. Do not invent them.rowLimit; expand after it succeeds. This catches missing credentials, missing semantic objects, and warehouse schema drift cheaply.snowflake_run_semantic_query returns both result rows and rendered SQL. The SQL is the audit trail and the safest starting point for any raw-SQL fallback.For a customer metric question where the semantic table is knowable from the wording, use this exact CLI path. Do not call ToolSearch, do not look for MCP tools, and do not write raw SQL first.
deepline auth status
deepline tools execute snowflake_get_semantic_layer --payload '{"includeYaml": true}' --json
deepline tools execute snowflake_run_semantic_query --payload '{
"type": "metrics",
"params": {
"table_name": "OPPORTUNITY",
"metrics": ["total_pipeline_generated"],
"dimensions": ["discovery_quarter_label", "discovery_quarter_start"]
},
"rowLimit": 100
}' --json
Read result.data.rows directly from the JSON response. Select latest periods by sorting DISCOVERY_QUARTER_START descending. Do not chase extracted_csv files, shell-sort CSV artifacts, or rerun the semantic query unless the JSON response is unavailable.
Do not open saved transcript files, tool-results/*.txt, or full semantic-layer blobs with Read, cat, or ad hoc Python just to confirm names. Large semantic YAML can exceed tool read limits. Use the current command output, targeted text search, or rerun with includeYaml: false for a table list before requesting full YAML.
Do not treat rowLimit as ordering. For labels like Q226, parse them as Q2 2026 only if no date-start dimension is available.
Use the same shape for other metrics: replace only table_name, metrics, and dimensions after confirming names in the semantic layer.
The current public Snowflake semantic API accepts typed metrics payloads:
{
"type": "metrics",
"params": {
"table_name": "OPPORTUNITY",
"metrics": ["num_opportunities"],
"dimensions": ["close_quarter_label"],
"filters": ["exclude_renewal_opportunities"]
},
"rowLimit": 100
}
It also accepts the legacy flat metrics form when needed:
{
"table_name": "OPPORTUNITY",
"metrics": ["num_opportunities"],
"dimensions": ["close_quarter_label"],
"rowLimit": 100
}
Use the typed form by default because it matches the old Aero run_semantic_query shape and leaves room for other query types.
table_name is a semantic table name from the YAML, not the model root name and not necessarily the physical Snowflake table.metrics are aggregate business definitions. Use them for reported numbers.dimensions and time_dimensions group the metric. Use semantic names, not raw SQL expressions.facts are row-level values. They can be useful for detail extracts but are not usually the right answer for aggregate reports.filters are named semantic filters from the YAML.rowLimit limits returned rows; use low limits for pilots and larger limits only after the payload is correct.Do not use rowLimit: 5 to answer "last 5 quarters", "latest 12 months", or similar questions. Semantic query results are not ordered unless you explicitly sort the returned rows or run SQL that orders them.
For recent-period questions:
discovery_quarter_label plus discovery_quarter_start.rowLimit: 100 for quarters.Q226 as Q2 2026 before selecting the latest periods.Q when choosing latest periods unless the user explicitly asks about missing-date records.The semantic tool supports Aero-compatible custom SQL fields:
custom_dimensions
custom_filter_expressions
steps[].source_table
steps[].ts_expr
steps[].filter_expr
steps[].events_sql
Use these when the semantic layer has the right table/metric but lacks the exact date bucket or filter the user needs. They are raw SQL snippets, so prefer named semantic dimensions and filters when they exist. Custom dimensions should be expression-first with an alias, for example DATE_TRUNC('month', close_date) AS close_month, not alias-first.
Read the YAML like a business contract:
created_* instead of close_* can change the business meaning.name unless the tool explicitly supports aliases.sf_account.industry. Use them only if the YAML defines the relationship and the field.Bad — invents SQL inside filters, so the renderer looks for a named filter with that whole string:
{"filters": ["stage_name = 'Closed Won'"]}
Good — uses a named semantic filter when one exists:
{"filters": ["exclude_renewal_opportunities"]}
Good — if no named filter exists, keep the semantic metric/table and put the raw predicate in custom_filter_expressions:
{"custom_filter_expressions": ["stage_name = 'Closed Won'"]}
Basic metric:
deepline tools execute snowflake_run_semantic_query --payload '{
"type": "metrics",
"params": {
"table_name": "OPPORTUNITY",
"metrics": ["num_opportunities"]
},
"rowLimit": 1
}'
Grouped metric:
deepline tools execute snowflake_run_semantic_query --payload '{
"type": "metrics",
"params": {
"table_name": "OPPORTUNITY",
"metrics": ["total_pipeline_generated"],
"dimensions": ["discovery_quarter_label"]
},
"rowLimit": 100
}'
Read the semantic layer:
deepline tools execute snowflake_get_semantic_layer --payload '{"includeYaml": true}'
Treat errors as diagnostic signal, not noise to hide.
| Error pattern | Meaning | Response |
| --- | --- | --- |
| SNOWFLAKE_CREDENTIALS_REQUIRED | Workspace has no Snowflake credentials | Ask user to connect Snowflake; do not retry different payloads |
| "No Snowflake semantic layer is configured" | No saved layer for this workspace | Ask for/upload semantic layer before querying |
| "table not found" in renderer | table_name is not a semantic table | Re-read YAML and use a table under tables: |
| "metric/dimension/filter not found" | Payload invented or misspelled a semantic object | Re-read YAML; use canonical names |
| SQL compilation invalid identifier | Rendered SQL references a warehouse column not available in the active Snowflake schema, or a renderer exposure bug | Show the rendered SQL/error; compare with raw SQL only after preserving the semantic intent |
| Results include blank/null buckets | Data has null dimension values or label expression permits blanks | Report the bucket and consider a named has_* filter if present |
| limited: true | Returned rows were truncated by rowLimit | Say the output is limited; rerun with a higher limit if the user needs all groups |
When a semantic query fails, fix the table/metric/dimension/filter and rerun before claiming an answer. If you fall back to raw SQL, state that it is a fallback and preserve the semantic metric definition you started from.
A good analytics answer includes:
Avoid false precision. If the semantic layer says a metric is a forecast, pipeline, ACV, ARR, bookings, or net revenue, use that language exactly. These are not interchangeable.
Use snowflake_run_query when the question is outside the semantic layer, when you need to debug a warehouse/schema issue, or when the semantic renderer cannot express the requested shape even with custom dimensions/filters. Start from the rendered semantic SQL whenever possible because it carries base filters, joins, and metric definitions.
Do not silently replace a semantic metric with a hand-written approximation. If you change the definition, name the change and explain why.
tools
Use for Deepline Plays/CLI V2 work: get started, find/describe/run prebuilts, process CSVs, bootstrap/wrap/fork plays, author durable V2 workflows, find companies or contacts, size TAM, inspect/export runs, explain billing, and repair failures. Triggers on deepline CLI work, plays, prebuilts, CSV enrichment, prospecting, TAM, provider routing, play authoring, staleAfterSeconds, datasets, runs, exports, billing, and eval-style GTM tasks.
development
Use to prospect, enrich, qualify, and activate outbound, especially when users mention Deepline, CSV processing, lead/account/contact research, waterfall enrichment, email or LinkedIn lookup, personalization, scoring, or campaign activation. Route CSV-heavy and provider-driven requests here, then rely on linked sub-docs and provider playbooks for execution details. Providers: adyntel, ai_ark, allegrow, apify, apollo, attio, aviato, bettercontact, bloomberry, builtwith, cloudflare, contactout, crustdata, crustdata-v2, customer_db, dataforseo, datagma, deepline_native, deeplineagent, discolike, dropleads, exa, findymail, firecrawl, forager, fullenrich, generic_http, google_ads_audiences, heyreach, hubspot, hunter, icypeas, instantly, ipqs, leadmagic, lemlist, limadata, linkedin_ads_audiences, linkedin_scraper, lusha, meta_audiences, openmart, openwebninja, parallel, peopledatalabs, predictleads, prospeo, rocketreach, salesforce, serper, slack, smartlead, snowflake, theirstack, trestle, upcell, wiza, zerobounce.
testing
Use when finding real role-holders at known company domains from an ICP, especially prompts like 'find all job titles at these companies', 'find qualified titles', 'find RevOps or marketing-ops buyers', or when exact title discovery should precede paid people search.
tools
Use for Deepline SDK/CLI V2 GTM work: route, build, run, debug, and export durable plays; find companies or contacts; enrich email, phone, LinkedIn, or custom signals; migrate Clay-like tables; configure cron/webhook/API plays; control Deepline spend; and recover from play/tool shape failures. Triggers on deepline CLI work, CSV enrichment, prospecting, waterfalls, outbound lists, provider routing, play authoring, SDK V2 syntax, staleAfterSeconds, datasets, and eval-style GTM tasks.