# Query

> Run an arbitrary TQL query against the current TelemetryDeck app. Use when no recipe fits and a hand-written TQL is required (funnel, retention, multi-dim groupBy, postAggregations, filtered aggregations).

- **Type:** Skill
- **Install:** `agentstack add skill-agenkin-telemetrydeck-analytics-query`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [agenkin](https://agentstack.voostack.com/s/agenkin)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [agenkin](https://github.com/agenkin)
- **Source:** https://github.com/agenkin/telemetrydeck-analytics/tree/main/skills/query
- **Website:** https://github.com/agenkin/telemetrydeck-analytics

## Install

```sh
agentstack add skill-agenkin-telemetrydeck-analytics-query
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Query

Run raw TQL against the current app. Two ways:

**(a) Inline JSON from `$ARGUMENTS`** — pipe it to `tdq query -`:

```bash
echo '$ARGUMENTS' | tdq query -
```

**(b) JSON file path** — pass the path directly:

```bash
tdq query $ARGUMENTS
```

Pick (b) if `$ARGUMENTS` looks like a file path, else (a).

## Writing the TQL

Before writing the JSON, read `skills/analytics/tql/index.md` in this plugin to route to the right sub-reference (filters, aggregators, intervals, funnel, retention, recipes, etc.). Do **not** try to recall TQL syntax from memory — the progressive-disclosure tree is there for a reason.

Rules that always apply:
- Set `"filter": { "__auto_app_and_test_mode_filter__": true }` unless you need a custom filter (in which case include the `appID` + `isTestMode=false` selectors yourself).
- Every query needs `queryType` and `granularity`.
- Prefer `userCount` / `thetaSketch` over deprecated `cardinality`.

If the user's first query returns `(no rows)`, re-run with `--raw` to see whether the result is genuinely empty or the parser dropped it:

```bash
tdq query /tmp/q.json --raw 2>/tmp/raw.json
```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [agenkin](https://github.com/agenkin)
- **Source:** [agenkin/telemetrydeck-analytics](https://github.com/agenkin/telemetrydeck-analytics)
- **License:** MIT
- **Homepage:** https://github.com/agenkin/telemetrydeck-analytics

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-agenkin-telemetrydeck-analytics-query
- Seller: https://agentstack.voostack.com/s/agenkin
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
