templates/analytics/.agents/skills/adhoc-analysis/SKILL.md
How to conduct ad-hoc analyses: gather data from multiple sources, synthesize findings, save reusable analysis artifacts that anyone can re-run for fresh results.
npx skillsauth add BuilderIO/agent-native adhoc-analysisInstall 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.
Ad-hoc analyses are deep-dive investigations that cross-reference multiple data sources, produce a written report with findings, and save a reusable artifact so anyone on the team can re-run the analysis with up-to-date data at any time.
Use the ad-hoc analysis workflow when:
For simple one-off questions (e.g., "how many signups last week?"), just query the data and answer in chat — no need to save an analysis.
Clarify the scope before gathering data:
Use the available actions to pull data. Read the relevant .builder/skills/<provider>/SKILL.md before querying each source.
Common data source combinations:
| Analysis type | Data sources | |---|---| | Sales pipeline analysis | HubSpot deals + Gong calls + Slack mentions | | Customer health check | HubSpot deals + Pylon support tickets + BigQuery usage events | | Content performance | BigQuery pageviews + GA4 + SEO keywords + HubSpot signups | | Engineering velocity | GitHub PRs + Jira tickets + BigQuery deploy events | | Churn investigation | Stripe billing + HubSpot deals + Pylon tickets + BigQuery usage |
Tips for data gathering:
--grep and --fields to narrow results before cross-referencingDon't just dump raw data. Synthesize findings:
When the analysis benefits from a visual — trends over time, distributions, comparisons between categories — call generate-chart before formatting the report. The action returns a url you embed directly in the markdown.
generate-chart
--title "Closed-lost deals by month"
--type bar
--labels '["Jan","Feb","Mar"]'
--data '[18, 22, 14]'
Embed the returned URL in resultMarkdown using standard markdown image syntax:

You can include multiple charts in one analysis. Reach for a chart when it communicates the finding faster than a table — don't force visuals on every analysis.
Include the re-generation step in your saved instructions so re-runs produce fresh charts.
Structure the report clearly:
## Key Findings
- **Finding 1**: Specific insight with supporting numbers
- **Finding 2**: Another insight
- **Finding 3**: Actionable recommendation
## Summary Metrics
| Metric | Value |
|---|---|
| Total deals analyzed | 54 |
| Average deal size | $42,300 |
| Win rate | 23% |
## Detailed Analysis
### Category 1
[Detailed breakdown with tables, lists, etc.]
### Category 2
[More detail...]
## Methodology
Data sources: HubSpot (deals, contacts), Gong (calls), Slack (mentions)
Time range: Jan 1 – Mar 31, 2026
Filters: S1+ pipeline, closed-lost only
Call save-analysis with all required fields:
save-analysis
--id "closed-lost-q1-2026"
--name "Q1 2026 Closed-Lost Analysis"
--description "Deep dive into 54 Fusion deals closed-lost in Q1, cross-referenced with Gong calls and Slack activity"
--question "Why are we losing deals in Q1? Cross-reference with Gong calls and Slack."
--dataSources '["hubspot", "gong", "slack"]'
--instructions "1. Fetch closed-lost S1+ deals from HubSpot (pipeline: Fusion, close date: Q1 2026)
2. For each deal, fetch associated contacts and their emails
3. Search Gong calls matching those contact emails (lookback: 6 months before close date)
4. For top 15 deals by amount, search Slack for '{company name} fusion'
5. Calculate: total deals, avg deal size, win rate, Gong coverage rate
6. Break down by: lost reason, stage reached, deal size tier
7. Highlight deals with no Gong coverage (blind spots)
8. Save results with save-analysis using id='closed-lost-q1-2026'"
--resultMarkdown "[the full markdown report]"
--resultData '{"deals": [...], "metrics": {...}}'
Critical: Write good instructions. The instructions field is what gets sent to the agent on re-run. Be specific:
After saving, navigate the user to see the saved analysis:
navigate --view=analyses --analysisId=closed-lost-q1-2026
When a user clicks "Re-run" on a saved analysis, the agent receives:
Follow the instructions to gather fresh data, then call save-analysis with the same id to update the results. The createdAt timestamp is preserved; updatedAt is refreshed.
| Action | Purpose |
|---|---|
| save-analysis | Save or update an analysis (id, name, instructions, results) |
| get-analysis | Retrieve a saved analysis by ID |
| list-analyses | List all saved analyses (id, name, description, timestamps) |
| delete-analysis | Delete a saved analysis |
| navigate | Navigate to analyses view: --view=analyses [--analysisId=<id>] |
Analyses are stored in the SQL settings table with key prefix adhoc-analysis-{id}. They respect org/user scoping — org-scoped analyses are visible to all org members.
API endpoints (for UI consumption):
GET /api/analyses — list allGET /api/analyses/{id} — get oneDELETE /api/analyses/{id} — delete oneclosed-lost-q1-2026 not analysis-1resultData with raw metrics/rows so the UI can render richer views in the futuretools
Public booking flow — the state machine, animations, and URL/app-state sync.
tools
Trigger-based automations — reminders, follow-ups, webhooks — across the booking lifecycle.
tools
Team event types, round-robin assignment, collective bookings, host weights, and no-show calibration.
development
The pure `computeAvailableSlots` function — inputs, outputs, invariants, and debugging guide.