d6e-docker-stf-development_skill

This skill helps you build Docker-based State Transition Functions for D6E to process data, access internal SQL APIs, and output JSON.

0

GitHub Stars

3

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill d6e-ai/d6e-docker-stf-skills --skill d6e-docker-stf-development

  • examples.md20.9 KB
  • reference.md22.3 KB
  • SKILL.md11.2 KB

Overview

This skill creates custom Docker-based State Transition Functions (STFs) for the D6E platform, enabling containerized workflow steps that process JSON input and emit JSON output. It provides templates and patterns for Python, Node.js, and Go, plus guidance for internal SQL API access, error handling, logging, and secure configuration.

How this skill works

The skill scaffolds a container entrypoint that reads JSON from stdin, runs business logic, optionally calls the D6E SQL API using provided workspace credentials, and writes a structured JSON result to stdout. It includes Dockerfiles, dependency manifests, input validation, retry-safe external calls, and standardized error responses written to stderr for diagnostics.

When to use it

  • Building a containerized workflow step for D6E that needs custom business logic
  • Implementing data processing, enrichment, or transformation inside D6E workflows
  • Accessing workspace databases via the D6E internal SQL API from a workflow function
  • Creating language-specific STFs (Python, Node.js, Go) with production-ready patterns
  • Testing and debugging STFs locally before publishing to a registry

Best practices

  • Read JSON from stdin and always output results as {"output": {...}}; log diagnostics to stderr only
  • Validate inputs and return typed error objects (include an error type) to keep workflow behavior predictable
  • Use the internal SQL API with proper headers and parameterized queries; avoid DDL and scope queries to the workspace
  • Keep images small: use slim base images, multi-stage builds, and .dockerignore to exclude artifacts
  • Do not log sensitive values (tokens, passwords); use environment variables for configuration and rotate secrets regularly

Example use cases

  • A Python STF that executes parameterized SELECT queries and returns paginated rows
  • A Node.js STF that calls an external API, enriches records, and writes the transformed payload to output
  • A Go-based STF that validates input fields, applies business rules, and uses the SQL API for lookups
  • A data-cleaning step that normalizes fields across sources in a workflow and reports validation errors
  • A workflow step that enforces policy-controlled reads from workspace tables and surfaces permission errors

FAQ

STFs must read a JSON envelope from stdin containing workspace and input fields, and on success print {"output": {...}} to stdout. Errors must be JSON with error and type keys.

How do I run SQL from an STF?

POST to /api/v1/workspaces/{workspace_id}/sql with Authorization: Bearer {api_token} and internal headers (X-Internal-Bypass, X-Workspace-ID, X-STF-ID). Use parameterized queries, avoid DDL, and respect workspace policy restrictions.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational