بنقرة واحدة
enriching-local-api-info
How to enrich component notes and input type documentation served by the local workflows-api
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
How to enrich component notes and input type documentation served by the local workflows-api
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
How to use the CARTO CLI to interact with the platform
How to write, validate, and upload CARTO Workflows
Builds Geographically Weighted Regression (GWR) workflows in CARTO. Triggers when the user mentions GWR, geographically weighted regression, spatially varying relationships, local regression, local coefficients, spatial regression, "what drives X in different areas", "why do prices vary spatially", "local factors affecting Y", varying coefficients, coefficient maps, spatial non-stationarity, or wants to model how the relationship between a dependent variable and predictors changes across geography. Produces per-cell regression coefficients that reveal how predictor importance shifts from place to place.
Builds Getis-Ord Gi* hotspot analysis workflows in CARTO. Triggers when the user mentions hotspots, coldspots, spatial clusters, Getis-Ord, Gi*, cluster detection, concentration areas, "where do X cluster", spacetime hotspot, temporal clusters, time-varying patterns, hotspot trends, emerging hotspots, Mann-Kendall, or wants to find statistically significant spatial or spatiotemporal patterns in point or grid data.
Builds Moran's I spatial autocorrelation workflows in CARTO. Triggers when the user mentions spatial autocorrelation, Moran's I, spatial dependency, spatial correlation, spatial outliers, HH HL LH LL quadrants, high-high clusters, low-low clusters, spatial weight matrix, "is there clustering", "are values spatially correlated", local indicators of spatial association, LISA, spatial randomness test, or wants to determine whether a variable exhibits spatial clustering, dispersion, or randomness across a gridded dataset. Also relevant when the user needs to classify locations into cluster types (HH, HL, LH, LL) rather than just identifying hotspots and coldspots.
Guides building ML pipelines in CARTO Workflows when the user wants to train a model, predict, classify, forecast, or do regression. Triggers on machine learning, ML, prediction, classification, regression, forecasting, churn, predict, train model, BigQuery ML, Snowflake ML, BQML, ARIMA, time series prediction.
| name | enriching-local-api-info |
| description | How to enrich component notes and input type documentation served by the local workflows-api |
The workflows-api serves component schemas (with notes) and input type documentation (with format, examples, pitfalls) to the CLI. This skill explains how to add or improve that information and verify it locally.
File: ~/Projects/cloud-native/packages/workflows-engine/src/input-formats.ts
Each input type (Table, Number, Condition, ColumnsForJoin, etc.) is an entry in the INPUT_TYPE_FORMATS record. Structure:
[WorkflowComponentParamType.Condition]: {
type: 'Condition',
title: 'Condition',
format: 'Prose description of the value format and structure.',
examples: [
'{ "name": "conditions", "type": "Condition", "value": "..." }'
],
pitfalls: [
'Common mistake or non-obvious behavior.'
]
}
Directory: ~/Projects/cloud-native/packages/workflows-engine/src/components/
Each component is defined in its own file (e.g., buffer.ts, spatialjoin.ts). The component definition object has an optional notes array — short strings surfaced alongside the schema. These cover gotchas like unexpected output column names, deprecated components, or parameters whose names differ from what you'd guess.
// Example from buffer.ts
{
name: 'native.buffer',
description: '...',
starred: true,
notes: [
'Output geometry column is named "geom_buffer", not "buffer" or "geom".'
]
}
curl -s http://localhost:3030/
# Expected: {"status":"running"}
The workflows-engine package is consumed directly from src/ via ts-node — no build step needed. Just restart the API process:
kill $(lsof -i :3030 -t)
cd ~/Projects/cloud-native/workflows-api && yarn start:no-check &>/tmp/workflows-api.log &
Wait a few seconds for startup, then confirm:
curl -s http://localhost:3030/
For input types, request a component that uses the type you changed:
export CARTO_WORKFLOWS_API_URL=http://localhost:3030
carto workflows components get <component-names> --connection <connection> --input-formats --json
Note: CARTO_WORKFLOWS_API_URL is only needed if you're experimenting with an unmerged local workflows-api service. The --input-formats data is now embedded in the CLI and works offline — no local API server is required in normal use.
For component notes, fetch the component detail:
carto workflows components get <component-name> --connection <connection> --json
If the API isn't running at all:
cd ~/Projects/cloud-native/workflows-api
yarn start:no-check &>/tmp/workflows-api.log &
Check logs if startup fails:
tail -30 /tmp/workflows-api.log
~/Projects/cloud-native/packages/workflows-engine/src/kill $(lsof -i :3030 -t) && cd ~/Projects/cloud-native/workflows-api && yarn start:no-check &>/tmp/workflows-api.log &export CARTO_WORKFLOWS_API_URL=http://localhost:3030 && carto workflows components get <component> --connection <conn> --input-formats --jsonNo build, no compile, no dependency install. Edit, restart, verify.
Offline note: --input-formats data is now bundled in the CLI itself. The CARTO_WORKFLOWS_API_URL override is only relevant when testing local engine changes against an unmerged workflows-api service.