npx skills add kong/ai-marketplace --skill gateway-plugin-datakitgateway-plugin-datakit
Installation
Description
Use when designing or debugging Kong DataKit plugin flows, including node selection, DAG wiring, jq transforms, cache or vault usage, and phase-specific request or response orchestration. Do not use for generic decK, Terraform, or Konnect workflow questions.
SKILL.md
Help the agent turn an orchestration request into a correct DataKit flow, or debug an existing flow, without drifting into generic Gateway or declarative tool guidance.
Own DataKit reasoning: phase choice, node selection, DAG structure, connection shape, cache or vault requirements, and debug strategy.
Prefer working from the artifact that already owns the flow:
- If the repo already contains DataKit YAML under
deck,kong.yaml, or other declarative config, edit that artifact in place. - If the request depends on current Konnect state and
kong-konnectMCP is available, use it to inspect the attached plugin instance and confirm whether the problem is in the saved config or only in the repo copy. - If the request is only about DataKit flow behavior, stay in this skill. Hand
off only when the work becomes mainly about
decK,kongctl, or Terraform packaging.
Load only the file that matches the current branch:
-
references/node-reference.md- Load when choosing node types, checking required fields, or confirming what a node or implicit object can read or write.
-
references/patterns.md- Load when translating a user workflow into a starter flow shape such as fan-out merge, auth injection, caching, XML conversion, dynamic URLs, or header mutation.
-
references/resources-and-debugging.md- Load when the problem depends on cache or vault resources, live debug traces, deployment topology, or version-gated behavior.
Run scripts/validate_datakit_flow.py when a local YAML file already exists
and you need deterministic checks for node naming, references, branch targets,
cycles, implicit-field misuse, or missing cache or vault resources.
- Classify the request before drafting YAML.
- Identify whether the flow runs in access or response phase.
- Confirm whether the plugin should mutate
service_request, mutateresponse, or short-circuit withexit. - Confirm the attachment boundary: service, route, consumer, consumer group, or global.
- Reduce the task to a small DAG.
- List the external calls, transforms, gates, and writes that must happen.
- Prefer the fewest nodes that preserve clarity.
- Treat independent
callnodes as concurrent by default unless the output of one is required by another.
- Choose nodes from behavior, not from examples.
- Use
callfor HTTP work,jqfor reshaping,branchfor scheduling conditional paths,cachefor lookup or store,propertyfor Kong internals, andexitonly when the flow must terminate early. - Load
references/node-reference.mdinstead of guessing field names or outputs.
- Use
- Encode the flow around references and resources.
- Reserve explicit node names for actual nodes; never redeclare implicit
names such as
requestorresponse. - Keep connections explicit with
inputorinputs. - Add
resources.cacheorresources.vaultonly when the chosen nodes require them. - Prefer vault-backed secrets over hardcoded credentials.
- Reserve explicit node names for actual nodes; never redeclare implicit
names such as
- Debug from the first broken edge, not from the final symptom.
- Start with the node whose output feeds the failing downstream node.
- If the issue is structural, run the validator first.
- If the issue is live execution, enable DataKit debug mode and inspect the
trace to find the earliest
NODE_ERRORor the upstream cause ofNODE_CANCELED.
- Implicit nodes are phase-bound interfaces, not normal nodes:
requestandservice_requestbelong to access;service_responseandresponsebelong to response. -
branchcontrols which named nodes are scheduled. It does not replace normal data dependencies, so downstream nodes still need validinputorinputswiring. -
cacheandvaultnodes are incomplete without matchingresources.*configuration. - Non-2xx
callresponses are usually flow errors. Do not assume a response body exists downstream unless the call succeeded or the user explicitly wants error-path handling. -
Some capabilities are version-gated, including newer node types and dynamic URL overrides. If the request targets an older gateway, verify support before leaning on those features.
- Confirm the plugin is attached at the intended scope and phase.
- Confirm every explicit node name is unique and does not shadow an implicit node.
- Confirm each reference base exists and each referenced field is valid for that node or implicit object.
- Confirm cache and vault resources exist only when required and match the node usage.
- Confirm downstream nodes consume the actual output shape produced upstream,
especially after
jq, cache lookups, and XML conversion. - Run
python3 plugins/kong-konnect/skills/gateway-plugin-datakit/scripts/validate_datakit_flow.py <yaml-path>for local files before concluding the structure is sound. -
For live debugging, prove the intended node path executed by checking the first failing trace event, not just that the request reached Kong.
- Hand off to
deck-gatewaywhen the main job becomes declarative Gateway file integration, diff, or apply workflow. - Hand off to
terraform-kong-gatewayorterraform-konnectwhen the repo is Terraform-owned and the problem becomes provider schema or state behavior. - Hand off to
kongctl-declarativewhen the repo already useskongctlplan or apply workflows for Konnect resources.