hex
Skill365 starsChanged 8 months agoApache-2.0View on GitHub
Internal data access primitive. Executes a Hex query and returns structured results. Called by core skills — not intended for direct use. Invoke when you need to run a Hex query on behalf of a core skill that has provided a query and pattern. Do not use for Sentry product telemetry, Sentry feature-usage questions, or explicit requests to use Sentry telemetry when the Sentry skill is available.
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- packages/docs/public/llms.txtllms.txt
- nitroSkill
- pi-agent-integrationSkill
- public-docsSkill
- slack-developmentSkill
- vercel-queuesSkill
- vercel-sandboxSkill
- example-bundle-helpSkill
- example-localSkill
- agent-browserSkill
- demo-videoSkill
- visual-web-qaSkill
- amplitudeSkill
- cloudflareSkill
- datadogSkill
- coding-workspace-fixtureSkill
- github-headless-pr-fixtureSkill
- eval-guardian-actionsSkill
- eval-authSkill
- eval-directorySkill
- eval-mcpSkill
- eval-oauthSkill
- eval-operationSkill
- incident-briefSkill
- resilient-working-directorySkill
- source-handbookSkill
- weather-lookupSkill
- github-codeSkill
- github-issuesSkill
- linearSkill
- self-updateSkill
- notionSkill
- octolensSkill
- sentrySkill
- jr-rpcSkill
- eval-authSkill
- eval-mcp-openSkill
- ttsSkill
- vercelSkill
- junior-qaSkill
- juniorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 6 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Anchor on a specific entity identifier: Always include the primary key or identifier for the entity being queried (e.g.
- Very specific: line 37
Specify the time window explicitly: Always state the period: "for the last 28 days", "from [start date] to today", "monthly for the last 6 …
- Very specific: line 41
Pass raw SQL when available: When the caller provides a specific SQL query, pass it directly to create_thread — the agent will execute it …
- Very specific: line 54
Call create_thread with the fully constructed prompt.
- Very specific: line 55
If the call fails (network error, auth error), return immediately with status: "error" and the error message.
- Very specific: line 58
Call get_thread to check thread status.
- Distinctive: line 59
Wait approximately 20 seconds between polls.
- Very specific: line 62
If still not IDLE after 10 retries, return:
- Distinctive: line 101
Do not hardcode data formats or field names — patterns come from the caller.
- Distinctive: line 102
Do not poll beyond the 10-attempt cap defined here.
- Very specific: line 103
Do not return partial results as successes — if the pattern match fails, return not_found.
- Distinctive: line 104
Do not invoke other skills or data sources — this is a single-source primitive.
- Very specific: line 105
Do not fabricate data. If Hex returns an empty or ambiguous result, return not_found with the raw output so the caller can inspect it.
- Very specific: line 106
Do not use continue_thread as a standard follow-up mechanism — it is expensive and should be used at most once per query, only when a …
- Distinctive: line 119
Do not pass raw user input directly as the Hex prompt: Always template input into the structured format defined by the caller's query.
- Very specific: line 123
Cap
get_threadpolling to 10 calls per thread: Do not poll beyond this — return status: "timeout".
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Query Hex (Atomic)
Single responsibility: execute a Hex query via MCP, poll for completion, and return results matched against the caller-provided pattern. Hex Threads take a few minutes to run — this skill owns the full create → poll → extract cycle.
Input
Receive all three from the calling core skill:
- query — the complete, self-contained prompt to send to Hex (see Prompt Construction below)
- pattern — what the target data looks like (field names, expected shape — provided by caller; do not assume)
- context — any identifying context for the query (e.g. account name, entity ID, time range)
Prompt Construction (Critical — Read Before Creating a Thread)
Hex's Threads Agent decides which tables to query and what SQL to run based entirely on your prompt. A vague prompt causes broad table exploration and significantly slower responses. A precise prompt can shave several minutes off query time.
Rules
- Batch everything into one prompt. Include every metric and data point the caller needs in a single
create_threadcall. Do NOT usecontinue_threadto fetch additional fields — each call re-triggers the full agent pipeline and adds multiple minutes of latency. Treatcontinue_threadas a last resort only when a genuinely requested data point is absent from the initial response. - Anchor on a specific entity identifier. Always include the primary key or identifier for the entity being queried (e.g. account ID, org slug, user ID, opportunity ID). Never rely on Hex to infer the entity from a name or description alone.
- Use exact field and table terminology. Vague terms force Hex to guess. Use the canonical column names, table names, and metric names from the caller's data model. If the caller provides known column names, include them in the prompt.
- Specify the time window explicitly. Always state the period:
"for the last 28 days","from [start date] to today","monthly for the last 6 months". - Request structured output. End every prompt with:
"Return results in a structured list or table." - Pass raw SQL when available. When the caller provides a specific SQL query, pass it directly to
create_thread— the agent will execute it as-is, which is faster than natural language exploration.
Example: Natural Language Query
"For account ID '12345': return (1) total revenue for the last 90 days, (2) number of active users this month, and (3) any plan or subscription changes in the last 30 days. Return results in a structured list."
Example: Raw SQL Query
"Run this SQL: SELECT id, name, revenue, created_at FROM `my-project.dataset.orders` WHERE account_id = '12345' AND created_at >= DATE_SUB(CURRENT_DATE(), INTERVAL 90 DAY) ORDER BY created_at DESC"
Steps
- Create a Hex thread.
Call
create_threadwith the fully constructed prompt. If the call fails (network error, auth error), return immediately withstatus: "error"and the error message. - Poll for completion.
Call
get_threadto check thread status.- Wait approximately 20 seconds between polls.
- Retry up to 10 times before giving up.
- Continue polling while status is not
IDLE(i.e., still processing). - If still not
IDLEafter 10 retries, return:{ "status": "timeout", "value": null, "source": "Hex", "raw": "Hex query did not complete after 10 polling attempts." }
- Extract the result.
Once the thread reaches
IDLE, read the response content. Reason against the returned data using the caller-provided pattern to locate and extract the target value(s). - Use
continue_threadonly as a last resort. If a genuinely requested data point is completely absent from the response (not just unlabeled or formatted differently), usecontinue_threadonce to ask for it specifically. Re-extract after. Do not use it to request additional data the caller didn't include in the original query — that is a caller-side error. - Return structured output.
Return one of:
- Match found:
{ "status": "found", "value": "<extracted value(s) matching the pattern>", "source": "Hex", "raw": "<full thread response for debugging>" } - No match:
{ "status": "not_found", "value": null, "source": "Hex", "raw": "<full thread response for debugging>" }
- Match found:
Constraints
- Do not hardcode data formats or field names — patterns come from the caller.
- Do not poll beyond the 10-attempt cap defined here.
- Do not return partial results as successes — if the pattern match fails, return
not_found. - Do not invoke other skills or data sources — this is a single-source primitive.
- Do not fabricate data. If Hex returns an empty or ambiguous result, return
not_foundwith the raw output so the caller can inspect it. - Do not use
continue_threadas a standard follow-up mechanism — it is expensive and should be used at most once per query, only when a requested data point is genuinely absent from the initial response.
Guardrails
Auth and error handling
- If
create_threadreturns an auth error (401/403 or OAuth failure), stop immediately and returnstatus: "error"— do not retry auth failures. - If
create_threadreturns a transient error (network timeout, 5xx), retry once. If the retry also fails, return an error status. - Never expose raw Hex API error messages to end users. Summarize the failure mode (auth, timeout, not found) without leaking internal details.
Query safety
- Do not execute write operations. Hex threads are read-only analytics queries. If a prompt implies mutation (INSERT, UPDATE, DELETE), refuse and return an error.
- Do not pass raw user input directly as the Hex prompt. Always template input into the structured format defined by the caller's query.
Rate limits
- Cap
get_threadpolling to 10 calls per thread. Do not poll beyond this — returnstatus: "timeout". - Do not chain this skill recursively. One invocation handles one query.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

