synthlabs-generation
$
npx mdskill add mkurman/zorai/synthlabs-generationDrive backend SynthLabs generation via HTTP routes.
- Enables scripted dataset creation without UI interaction.
- Integrates with GET and POST API session endpoints.
- Executes long-running tasks attached to zorai goals.
- Delivers session data directly through backend responses.
SKILL.md
.github/skills/synthlabs-generationView on GitHub ↗
---
name: synthlabs-generation
description: Use when you need to drive SynthLabs generation through backend routes instead of the UI.
tags: [synthlabs, synthlabs-generation]
---
# SynthLabs Generation
## Overview
Use this skill for repeatable, backend-first SynthLabs workflows such as listing sessions, creating sessions, and calling generation routes from a healthy local instance. This skill documents existing SynthLabs HTTP routes and zorai workflow guidance only. Do not assume dedicated zorai SynthLabs tools exist.
## When to Use
Use this skill when:
- the task can stay in HTTP-driven session or generation flows,
- the operator wants scripted or repeatable dataset-generation steps,
- a healthy SynthLabs backend already exists,
- or long-running generation work should be attached to a zorai task or goal.
Do not use this skill when:
- the operator needs verifier review, data preview, settings inspection, or DEEP mode,
- provider credential entry must happen in the SynthLabs UI,
- or the task is about starting or repairing the local SynthLabs instance rather than using it.
## Backend-First Workflow Rules
- Start backend-first: list or create sessions over HTTP before opening the browser.
- Prefer `GET /api/sessions` and `POST /api/sessions` for repeatable session discovery and session setup.
- Hand DEEP-mode, verifier review, data preview, and other visually inspected flows to `synthlabs-ui-operator`.
- Use zorai tasks or goals for long-running generation work so retries, notes, and follow-up review stay attached to the run.
## Backend vs. UI Routing
- Stay in backend mode for session listing, session creation, scripted generation, and other repeatable HTTP workflows.
- Switch to `synthlabs-ui-operator` when the operator needs to inspect prompts, review generated rows, enter provider credentials, use DEEP mode, or confirm output visually.
- If a direct AI route call would require inventing or reverse-engineering key encryption, stop and use SynthLabs setup or UI instead.
## Credential Boundary
- Use `POST /api/ai/generate` or `POST /api/ai/generate/stream` only when you already have a SynthLabs-compatible encrypted `apiKey` value.
- `server/utils/keyEncryption.js` decrypts `apiKey` with AES-256-CBC using a key derived from `VITE_API_KEY_SALT` or `API_KEY_SALT`.
- Do not post a plaintext provider key directly to the AI routes.
- If the only credential available is a plaintext provider key, route setup through `synthlabs-setup` or the SynthLabs UI instead of guessing the encryption format.
## Session Examples
List recent sessions from a healthy local backend:
```bash
curl -fsS "http://localhost:8787/api/sessions?limit=20"
```
Create a minimal session shell before generation work:
```bash
curl -fsS -X POST "http://localhost:8787/api/sessions" \
-H "Content-Type: application/json" \
-d '{
"name": "zorai generation run",
"source": "zorai"
}'
```
If you know the running instance expects mode metadata, extend the payload with fields the backend stores such as `appMode`, `engineMode`, `externalModel`, or `config`.
## Generation Example
Use a direct generation route only with an encrypted key value produced by a compatible SynthLabs client or UI flow:
```bash
curl -fsS -X POST "http://localhost:8787/api/ai/generate" \
-H "Content-Type: application/json" \
-d '{
"apiKey": "<encrypted iv:ciphertext value from SynthLabs-compatible flow>",
"provider": "openai",
"model": "gpt-4.1-mini",
"baseUrl": "https://api.openai.com/v1",
"systemPrompt": "You generate concise synthetic reasoning samples.",
"userPrompt": "Produce 3 algebra tutoring examples in SYNTH-style JSON.",
"outputFormat": "json"
}'
```
## Long-Running Work
- For large dataset batches, queue the work in a zorai task or goal instead of treating it as a single chat turn.
- Record the backend URL, session ID, model, and whether the run stayed backend-only or required a UI handoff.
- Use the UI operator skill for post-run verification, DEEP-mode continuation, or manual review of generated data.
## Common Mistakes
- Calling AI generation routes with a plaintext provider key instead of a SynthLabs-compatible encrypted `apiKey` value.
- Opening the browser for session creation or listing even though the backend routes already cover the task.
- Treating DEEP mode or verifier review as backend-only workflows.
- Running a large generation batch in one ad hoc turn instead of attaching it to a zorai task or goal.More from mkurman/zorai
- account-management>
- agile-scrum>
- albumentationsFast image augmentation library (Albumentations). 70+ transforms for classification, segmentation, object detection, keypoints, and pose estimation. Optimized OpenCV-based pipeline with unified API across all CV tasks. Supports images, masks, bounding boxes, and keypoints simultaneously. Note: classic Albumentations (MIT) is no longer maintained; successor AlbumentationsX uses AGPL-3.0. For torchvision-native augmentations, use torchvision.transforms.v2.
- aml-complianceAnti-Money Laundering (AML) and Know Your Customer (KYC) compliance workflow. Sanctions screening, PEP detection, transaction monitoring, suspicious activity reporting (SAR), and OFAC compliance.
- anki-connectThis skill is for interacting with Anki through AnkiConnect, and should be used whenever a user asks to interact with Anki, including to read or modify decks, notes, cards, models, media, or sync operations.
- approval-checkpoint-long-taskCanonical long-task pack for daemon-managed work with deliberate approval checkpoints, status summaries, rollback notes, and mobile-safe governance-aware updates.
- auditing-goal-artifactsUse when reviewing recent zorai goal run outputs, closure markers, ledgers, or evidence bundles to judge whether completion is credible or to identify remaining uncertainty.
- autogenAutoGen (Microsoft) — multi-agent conversation framework. Agent-to-agent chat, code generation & execution, tool use, group chat, and human-in-the-loop. Build collaborative AI systems with specialized agents.
- backtraderPython backtesting framework for trading strategies. Data feeds, brokers, analyzers, and live trading support. Strategy development with commission models, slippage, and signal-based execution.
- beautiful-mermaidRender Mermaid diagrams as SVG and PNG using the Beautiful Mermaid library. Use when the user asks to render a Mermaid diagram.