一键导入
data-querying
General guidance on querying data sources, using existing scripts vs ad-hoc queries, filtering patterns, and generating charts for the analytics app.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
General guidance on querying data sources, using existing scripts vs ad-hoc queries, filtering patterns, and generating charts for the analytics app.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
How to look up version-matched Agent Native framework docs in node_modules. Use before coding against @agent-native/core APIs or advanced features.
Use Content for repo-backed Markdown/MDX docs, blogs, resources, rich document editing, local components, shareable copies, and Content local-file workspaces. Prefer Content actions over raw filesystem writes when available.
All AI features in Clips — titles, summaries, chapters, tags, filler-word removal — delegate to the agent chat via sendToAgentChat except the narrow media pipeline path: transcription. Use when adding any AI-powered feature.
How Clips shares recordings — composes with the framework sharing skill and adds password, expiry, embed URLs, and view-counting. Use when wiring the share dialog, building embed links, adding a password, or debugging who can see a recording.
Cross-platform pattern for handling messaging integration webhooks (Slack, Telegram, WhatsApp, email, etc.) on serverless hosts. Use when adding a new integration adapter, debugging dropped messages, or wiring long-running agent work into a webhook handler.
Turn ordinary text plans into rich interactive visual plans with diagrams, file maps, annotated code, open questions, and UI/prototype review when useful.
| name | data-querying |
| description | General guidance on querying data sources, using existing scripts vs ad-hoc queries, filtering patterns, and generating charts for the analytics app. |
The analytics app connects to multiple data sources. This skill covers general patterns for querying data effectively.
<data-dictionary> and data-source status tell you which sources are configured and which table/columns/join paths to use. Use them to pick the one source that owns the fact instead of fanning out blind queries..agents/skills/<provider>/SKILL.md for table names, column mappings, auth, and gotchas. For BigQuery, read .agents/skills/bigquery/SKILL.md and use search-bigquery-schema before guessing table or column names.ask-question clarifying tool (multiple-choice) before querying. Ask at most once per turn; skip it when the dictionary or the user already answered.actions/For events recorded by the analytics template itself via its /track endpoint, use pnpm action query-agent-native-analytics --sql "SELECT ... FROM analytics_events ...". This includes pageviews, site/app traffic, template usage, app usage, and event counts collected by this analytics app. Pageviews and traffic can also live in GA4, BigQuery/warehouse tables, Mixpanel, PostHog, Amplitude, or another configured provider, so choose the source from the user's wording, connected-source status, existing dashboards, data dictionary, and user/org resources. Ask one concise clarification if multiple configured sources are plausible. Do not use db-query for data-source analysis; db-query is only for internal app tables and will confuse analytics questions. The shipped agent-native-templates-first-party SQL dashboard is the template engagement dashboard for the first-party collector source.
Example pageviews query for a local calendar day:
SELECT COUNT(*) AS pageviews
FROM analytics_events
WHERE event_name = 'pageview'
AND timestamp >= '<start-utc>'
AND timestamp < '<end-utc>'
Convert the user's requested local date/timezone to UTC before querying. For
example, May 1, 2026 in America/New_York is 2026-05-01T04:00:00Z
through 2026-05-02T04:00:00Z.
For an in-chat answer, emit a live /chart embed — never generate-chart. The embed mounts a live SqlChart that re-queries when its source changes, and it doesn't choke on rigid JSON params the way the PNG action does. Full shape in AGENTS.md ("Inline Charts in Chat" section). Reach for generate-chart only when you're building a save-analysis artifact whose markdown will render outside the app.
If generate-chart returns an error in any chat-answering flow, the recovery is to switch to the live embed, not to retry with reformatted params.
# Jira tickets
pnpm action jira-search --jql="summary ~ SSO" --fields=key,summary,status
# HubSpot deals
pnpm action hubspot-deals --query="The Knot" --limit=10 --properties=dealname,amount,dealstage
# HubSpot + Gong account/deal deep dive
pnpm action account-deep-dive --query="The Knot" --days=180 --gongLimit=10 --transcriptLimit=5
# HubSpot contacts or companies
pnpm action hubspot-records --objectType=companies --query=builder.io --properties=name,domain,lifecyclestage
# Gong call content for a customer deep dive
pnpm action gong-calls --company="The Knot" --days=180 --includeTranscripts=true --transcriptLimit=5
The first-class actions above are convenience shortcuts for the common cases, not
the limit of what you can do. Many providers (GitHub, Amplitude, PostHog,
Mixpanel, Apollo, Common Room, Twitter/X, Notion, Pylon, GA4, plus any
endpoint/filter a shortcut can't express) have no bespoke action — reach
them through the shared provider API escape-hatch pattern:
provider-api-catalog / provider-api-docs to learn the endpoint, then
provider-api-request (or providerFetch inside run-code) against the
provider's real HTTP API. For broad/corpus-wide questions ("how many", "which",
"any/none across all …") prefer this raw-API + run-code path from the first
step — fetch the full cohort with fetchAllPages/saveToFile and
grep/aggregate locally — rather than stretching a capped shortcut action.
When no existing script covers the question:
actions/ that imports the relevant server libpnpm action <name>// scripts/my-query.ts
import { runQuery } from "../server/lib/bigquery.js";
import { output } from "./helpers.js";
export default async function main(args: string[]) {
const results = await runQuery("SELECT ...");
output(results);
}
For answers that span multiple sources, follow the cross-source-analysis skill: plan which source owns each fact, fetch per source, stitch identities on BOTH a stable id AND email (ids can be reassigned), de-duplicate, and cite per-source provenance.
For complete answers, combine data from multiple sources:
query-agent-native-analytics) for events collected through /trackhubspot-records for contacts/companies/tickets/general lookup; hubspot-deals and hubspot-metrics for pipeline and revenue analysisgong-calls with includeTranscripts=true for deep dives, objections, risks, or next stepsWhen you complete an analysis and discover:
Capture it immediately using save-memory or by writing to LEARNINGS.md via
the resources tool:
resources(action: "read", path: "LEARNINGS.md") -- read first to merge
resources(action: "write", path: "LEARNINGS.md", content: "<updated content>")
Keep each entry short and actionable: what to do, what not to do, and why. This is the learnings flywheel — discoveries persist across sessions and improve future analyses.
update-dashboard, generate-chart, and save-analysis are not data queries. For analyses and dashboards, run at least one provider query action and preserve the result evidence in the final answer or resultData.query, objectType, properties, owner, limit, or provider-specific filters to narrow output; if an action returns a broad batch, filter it in your analysis and cite the records used..agents/skills/<provider>/SKILL.md when you discover new patterns..agents/skills/bigquery/SKILL.md first; if the data dictionary does not contain the exact table/columns, call search-bigquery-schema.