Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Execute Hex primary workflow: Core Workflow A. Use when implementing primary use case, building main features, or core integration tasks. Trigger with phrases like "hex main workflow", "primary task with hex".
.claude/skills/jeremylongshore-hex-core-workflow-a/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 20% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 40% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -10% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 6% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 71% | 0% |
Trigger Hex project runs from external orchestration tools (Airflow, Dagster, cron) with input parameters, status polling, and error handling. This is the primary integration pattern for embedding Hex in data pipelines.
typescriptimport 'dotenv/config'; const TOKEN = process.env.HEX_API_TOKEN!; const BASE = 'https://app.hex.tech/api/v1'; interface RunConfig { projectId: string; inputParams?: Record<string, any>; updateCache?: boolean; killRunning?: boolean; } async function triggerRun(config: RunConfig) { const response = await fetch(`${BASE}/project/${config.projectId}/run`, { method: 'POST', headers: { 'Authorization': `Bearer ${TOKEN}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ inputParams: config.inputParams || {}, updateCacheResult: config.updateCache ?? true, killRunningExecution: config.killRunning ?? false, }), }); if (!response.ok) throw new Error(`Trigger failed: ${response.status} ${await response.text()}`); return response.json(); }
typescriptasync function runAndWait(config: RunConfig, timeoutMs = 600000): Promise<any> { const { runId, projectId } = await triggerRun(config); const startTime = Date.now(); while (Date.now() - startTime < timeoutMs) { const res = await fetch(`${BASE}/project/${projectId}/run/${runId}`, { headers: { 'Authorization': `Bearer ${TOKEN}` }, }); const status = await res.json(); switch (status.status) { case 'COMPLETED': return { success: true, runId, duration: Date.now() - startTime }; case 'ERRORED': throw new Error(`Run ${runId} errored: ${status.statusMessage || 'unknown'}`); case 'KILLED': throw new Error(`Run ${runId} was killed`); default: await new Promise(r => setTimeout(r, 5000)); } } throw new Error(`Run ${runId} timed out after ${timeoutMs}ms`); }
typescript// Run multiple Hex projects in sequence (data pipeline) async function runPipeline(steps: RunConfig[]) { const results = []; for (const step of steps) { console.log(`Running: ${step.projectId}`); const result = await runAndWait(step); console.log(`Completed in ${result.duration}ms`); results.push(result); } return results; } // Example: ETL pipeline await runPipeline([ { projectId: 'extract-project-id', inputParams: { date: '2025-01-01' } }, { projectId: 'transform-project-id' }, { projectId: 'load-project-id', updateCache: true }, ]);
typescriptasync function cancelRun(projectId: string, runId: string) { const response = await fetch(`${BASE}/project/${projectId}/run/${runId}`, { method: 'DELETE', headers: { 'Authorization': `Bearer ${TOKEN}` }, }); console.log(`Cancelled run ${runId}: ${response.status}`); }
| Error | Cause | Solution | |-------|-------|----------| | 429 Too Many Requests | Rate limit (20/min, 60/hr) | Queue runs with delays | | Run ERRORED | Project code failed | Check project logs in Hex UI | | Run KILLED | Timeout or manual cancel | Increase timeout or fix slow queries | | 404 | Project not published | Publish project before triggering runs |
For scheduled runs, see hex-core-workflow-b.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 22,333 | 19,474 | -13% | 1 | 1 | 0% | 3,550 | 4,250 | +20% | 0 | 0 | — |
case-02 | fail→pass | 17,544 | 36,760 | +110% | 1 | 1 | 0% | 3,792 | 5,325 | +40% | 0 | 0 | — |
case-03 | fail→pass | 25,219 | 17,856 | -29% | 1 | 1 | 0% | 3,901 | 3,516 | -10% | 0 | 0 | — |
case-04 | pass→pass | 31,689 | 14,215 | -55% | 1 | 1 | 0% | 1,882 | 2,810 | +49% | 0 | 0 | — |
case-05 | fail→fail | 20,091 | 15,578 | -22% | 1 | 1 | 0% | 2,868 | 3,056 | +7% | 0 | 0 | — |
case-06 | fail→pass | 20,658 | 16,035 | -22% | 1 | 1 | 0% | 2,697 | 2,857 | +6% | 0 | 0 | — |
case-07 | fail→pass | 10,118 | 9,201 | -9% | 1 | 1 | 0% | 878 | 1,500 | +71% | 0 | 0 | — |
case-08 | fail→pass | 19,229 | 7,135 | -63% | 1 | 1 | 0% | 2,681 | 1,337 | -50% | 0 | 0 | — |
case-09 | pass→pass | 10,825 | 7,380 | -32% | 1 | 1 | 0% | 802 | 1,227 | +53% | 0 | 0 | — |
case-10 | pass→pass | 41,957 | 9,245 | -78% | 1 | 1 | 0% | 6,517 | 1,508 | -77% | 0 | 0 | — |
case-11 | fail→pass | 11,267 | 2,361 | -79% | 1 | 1 | 0% | 1,025 | 1,404 | +37% | 0 | 0 | — |
case-12 | pass→pass | 11,644 | 8,677 | -25% | 1 | 1 | 0% | 1,205 | 1,660 | +38% | 0 | 0 | — |
case-13 | pass→pass | 8,975 | 4,231 | -53% | 1 | 1 | 0% | 1,680 | 1,714 | +2% | 0 | 0 | — |
case-14 | fail→pass | 5,727 | 6,791 | +19% | 1 | 1 | 0% | 960 | 1,297 | +35% | 0 | 0 | — |
case-15 | fail→pass | 20,570 | 6,675 | -68% | 1 | 1 | 0% | 2,594 | 1,262 | -51% | 0 | 0 | — |
case-16 | pass→pass | 15,058 | 8,522 | -43% | 1 | 1 | 0% | 1,792 | 1,593 | -11% | 0 | 0 | — |
case-17 | pass→pass | 9,054 | 5,099 | -44% | 1 | 1 | 0% | 1,431 | 1,799 | +26% | 0 | 0 | — |
case-18 | pass→pass | 10,546 | 7,771 | -26% | 1 | 1 | 0% | 1,651 | 2,014 | +22% | 0 | 0 | — |
case-19 | pass→pass | 16,333 | 7,302 | -55% | 1 | 1 | 0% | 1,867 | 1,320 | -29% | 0 | 0 | — |
case-20 | pass→pass | 14,207 | 5,639 | -60% | 1 | 1 | 0% | 1,815 | 1,929 | +6% | 0 | 0 | — |
case-21 | fail→pass | 22,749 | 1,996 | -91% | 1 | 1 | 0% | 3,288 | 1,313 | -60% | 0 | 0 | — |
case-22 | fail→pass | 8,888 | 7,224 | -19% | 1 | 1 | 0% | 711 | 1,407 | +98% | 0 | 0 | — |
case-23 | fail→pass | 14,120 | 6,633 | -53% | 1 | 1 | 0% | 1,459 | 1,235 | -15% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +52 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.