Library Management REST API Base URL: https://api.example.com/v1 All request and response bodies use application/json. Dates use ISO 8601 in UTC. Resource IDs are UUIDs. Endpoint Table Books Method Path Purpose Status Codes GET /books List and filter books 200, 400 POST /books Create a book record 201, 400, 409, 422 GET /books/{bookId} Retrieve a book 200, 404 PATCH /books/{bookId} Update book metadata or inventory 200, 400, 404, 409, 422 …Read the full sample →
AI workflows: Development
Ready-to-run AI workflows in the Development category: open one, fill in the short form and run it. Each one shows a sample of what it makes and what a run costs.
add(a, b) Adds two values using JavaScript’s + operator. Parameters Name Type Constraints a any None. If either operand is a string, string concatenation may occur. b any None. If either operand is a string, string concatenation may occur. Returns any — The result of evaluating a + b. Errors This function does not explicitly throw errors. JavaScript may throw a TypeError for incompatible operand types, such as mixing a bigint with a number. Example const result = add(2, 3);…Read the full sample →
The Cost of Doing Nothing Assumptions Replace these inputs with internal figures as needed: 20 engineers run or wait for CI an average of 2 times per day 220 working days per year Fully loaded engineering cost: $150/hour Current suite duration: 45 minutes Estimated productive time lost per run: 15 minutes due to parallel work, context switching, and delayed feedback 5 flaky-test reruns or investigations per day, averaging 20 minutes each 2 production incidents last quarter traced to untested paths Average incident cost:…Read the full sample →
Tech debt business case
Input: our test suite takes 45 minutes, flaky tests get skipped, two incidents last quarter traced to untested paths
Use thisIdentity + Scope You are the customer support assistant for a SaaS invoicing platform. You help customers understand and use the product, troubleshoot common issues, and navigate account, subscription, invoice, payment, and billing workflows. Your scope includes: Account access and settings Creating, sending, editing, and tracking invoices Payment status and payment-method questions Subscription plans, renewals, cancellations, and billing-cycle explanations Product troubleshooting using approved documentation Collecting information for support escalation…Read the full sample →
System prompt writer
Input: a customer support assistant for a SaaS invoicing tool; must never promise refunds; escalates billing disputes
Use thisCaching Strategy 1. Data Classes Data class Cache layer TTL and reasoning Invalidation trigger Staleness tolerance Product content: name, description, images, category, attributes CDN + distributed cache + app-local cache CDN: 15–60 min; distributed: 30 min; app-local: 1–5 min. This data changes infrequently and benefits most from edge caching. Product update event; purge affected product, category, search, and listing keys. 15–60 min for presentation data; near-zero for legal or compliance fields. …Read the full sample →
Caching strategy
Input: product catalog API, 10k rps reads, prices change hourly, stock changes constantly
Use thisEstimation scale S: 0.5–1.5 engineering days M: 2–3 engineering days L: 4–5 engineering days Assumes one engineer, code review included, existing CI/CD and authentication, and no major infrastructure procurement. QA/UAT time is included per slice but cross-system rollout support is not. Delivery slices 1. Notification event contract and channel-agnostic model — M Scope Define notification types, recipients, payload schema, priority, channel eligibility, timestamps, and idempotency key. Add producer-facing API or internal library.…Read the full sample →
Estimation helper
Input: rebuild the notification system: email, push, in-app, user preferences, digest batching
Use thisimport { describe, expect, it } from 'vitest'; const add = (a: number, b: number): number => a + b; describe('add', () => { describe('happy paths', () => { it('adds two positive numbers', () => { // Arrange const a = 2; const b = 3; // Act const result = add(a, b); // Assert expect(result).toBe(5); }); it('adds two negative numbers', () = { // Arrange const a = -2; const b = -3; // Act const result = add(a, b); // Assert expect(result).toBe(-5); });…Read the full sample →
function addNumbers(firstNumber: number, secondNumber: number): number { return firstNumber + secondNumber; } Added number parameter types to fix the implicit any parameters. Restricted both operands to numbers, removing ambiguity between numeric addition and string concatenation. Added an explicit number return type to document and enforce the function’s contract. Renamed add, a, and b to addNumbers, firstNumber, and secondNumber for clearer intent.Read the full sample →
Test Plan: Checkout Flow with Promo Codes and Three Payment Methods Assumptions The checkout flow supports: Cart review Shipping and billing information Promo-code application/removal Three payment methods: Credit/debit card Digital wallet Bank transfer Order confirmation and receipt Tax, shipping, and discount calculation Risk Assessment | Risk | Impact | Likelihood | Priority | Primary Mitigation | |---|---:|---:|---:|---|…Read the full sample →
Title Android app crashes when uploading a large photo Environment Platform: Android App version: Unknown Android version: Unknown Device model: Unknown Network conditions: Unknown Assumption: The crash occurs when selecting or uploading a high-resolution or large-file-size photo. Steps to Reproduce Open the Android app. Navigate to the photo upload feature. Select a large or high-resolution photo. Start the upload. Observe that the app crashes. Expected…Read the full sample →
[Unreleased] Added Dark mode is now available for a more comfortable viewing experience in low-light environments. Changed ⚠ BREAKING: Node.js 16 is no longer supported. Migrate to Node.js 18 or later before upgrading. Fixed Users are now redirected to the correct destination after logging in. Removed ⚠ BREAKING: Support for Node.js 16 has been removed. Upgrade your environment to Node.js 18 or later.Read the full sample →
Context The API previously supported JWT authentication only. We now need to support API key–based integrations while protecting authentication endpoints and downstream services from excessive traffic and abuse. What changed Authentication middleware Refactored the auth middleware to support: JWT bearer tokens API keys Added credential detection and validation for both authentication methods. Preserved existing JWT behavior and error handling. Standardized the authenticated request context across JWT and API key flows. Rate limiting…Read the full sample →
PR description
Input: refactored the auth middleware to support API keys alongside JWT, added rate limiting
Use thisPayment Webhook Processing Service — On-Call Runbook 0. 3 AM Quick Path The three most likely causes Queue backlog: Queue depth and oldest-message age are rising while worker throughput is below arrival rate. Check worker health, errors, and downstream saturation; scale only if dependencies can absorb it. Provider timeout: Requests to or from one provider are timing out. Check provider status and timeout metrics; keep events durable and reduce retry pressure.…Read the full sample →
On-call runbook
Input: payment webhook processing service, common issues: queue backlog, provider timeouts, signature failures
Use thisPayment Webhook System 1. Event Types payment.succeeded payment.failed payment.refunded Events are delivered via HTTPS POST to a customer-configured endpoint. 2. Event Envelope { id: evt_01HTY8Z3N7Y6WQ2WQ4T91P7R5A, type: payment.succeeded, timestamp: 2025-03-08T14:52:31.482Z, version: 2025-01-01, data: { payment_id: pay_01HTY8XJ0DQK8TQ3W6A8KJX9P2, amount: 4999, currency: USD, status: succeeded, customer_id: cus_12345, order_id: order_98765 } } Field definitions…Read the full sample →
Webhook designer
Input: payment events: succeeded, failed, refunded — consumers are customer backends
Use thisMonorepo Makefile: Go API, React frontend, and Postgres via Docker Compose. SHELL := /bin/bash .DEFAULT_GOAL := help API_DIR := api WEB_DIR := frontend DIST_DIR := dist COMPOSE := docker compose GO := go NPM := npm Use npm ci when a lockfile exists; fall back to npm install for first-time setup. NPM_INSTALL := $(if $(wildcard $(WEB_DIR)/package-lock.json),$(NPM) ci,$(NPM) install) .PHONY: help setup dev test lint build clean db-up db-migrate help: ## Show available targets @awk 'BEGIN {FS = ":.*## "; printf "Usage: make \033[36m<target>\033[0m\n\nTargets:\n"} \…Read the full sample →
Makefile / task runner
Input: a monorepo with a Go API, React frontend, and Postgres via docker compose
Use thisBugs Line 1: Parameters a and b have implicit any types when noImplicitAny is enabled. Line 1: The return type is unspecified. Because + behaves differently for numbers and strings, the function’s intended behavior is ambiguous. Security No direct security vulnerabilities are present. Explicit numeric types prevent unintended string concatenation or coercion when this function is used with loosely typed input. Performance The implementation is already optimal for numeric addition. No additional allocations or unnecessary operations are performed.…Read the full sample →
-- PostgreSQL schema. -- Stores users, venues, reservable time slots, bookings, payments, and cancellations. -- All timestamps are timezone-aware, and monetary values use fixed-precision NUMERIC. CREATE TABLE users ( user_id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, email VARCHAR(320) NOT NULL, full_name VARCHAR(200) NOT NULL, phone VARCHAR(32), status VARCHAR(20) NOT NULL DEFAULT 'active' CHECK (status IN ('active', 'suspended')), created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,…Read the full sample →
DB schema designer
Input: a booking system: users, venues, time slots, payments, cancellations
Use thisPerformance review Hot path complexity Time: O(1) per call. Space: O(1). There are no loops, recursive calls, or input-dependent operations. Allocation / GC pressure For numeric inputs, the function typically creates no heap allocations, so GC pressure is negligible. If either operand is a string, + performs concatenation and allocates a new string of size O(len(a) + len(b)). Untyped parameters allow mixed operand types, which may introduce coercion and reduce JIT optimization stability at polymorphic call sites. I/O / N+1 patterns…Read the full sample →
scalar DateTime scalar URL schema { query: Query mutation: Mutation } interface Node { id: ID! } type Query { node(id: ID!): Node recipe(id: ID!): Recipe author(id: ID!): Author ingredient(id: ID!): Ingredient collection(id: ID!): Collection recipes( first: Int after: String last: Int before: String filter: RecipeFilterInput sort: RecipeSortInput ): RecipeConnection! ingredients( first: Int after: String last: Int before: String search: String ): IngredientConnection! authors( first: Int after: String…Read the full sample →
GraphQL schema designer
Input: a recipe platform: recipes, ingredients, authors, ratings, collections
Use this# syntax=docker/dockerfile:1.7 FROM node:22-bookworm-slim AS base ENV PNPM_HOME=/pnpm ENV PATH=$PNPM_HOME:$PATH RUN corepack enable FROM base AS dependencies WORKDIR /app COPY package.json pnpm-lock.yaml ./ RUN --mount=type=cache,id=pnpm,target=/pnpm/store \ pnpm install --frozen-lockfile FROM dependencies AS build COPY . . RUN pnpm run build \ pnpm prune --prod FROM node:22-bookworm-slim AS production ENV NODE_ENV=production WORKDIR /app RUN apt-get update \ apt-get install -y --no-install-recommends ffmpeg curl \ rm -rf /var/lib/apt/lists/* \…Read the full sample →
Actual cause Your code calls .map() on a value that is undefined. Since .map() is an array method, the value was likely expected to be an array but was missing, not initialized yet, or accessed through the wrong property. For example: const items = undefined; items.map(item = item.name); // TypeError Most likely fixes Initialize the value as an empty array This is most likely when data is loaded asynchronously or stored in state. const [items, setItems] = useState([]); Or provide a fallback:Read the full sample →
Error message decoder
Input: TypeError: Cannot read properties of undefined (reading 'map')
Use thisKata: Global Meeting Scheduler Problem Statement Your company has teams in New York, London, Tokyo, and several other cities. Meeting requests arrive as local date-and-time strings together with their IANA time zones. Your task is to convert each request into a canonical UTC timestamp. Unfortunately, local times are not always valid or unique: During the spring daylight-saving transition, some local times do not exist. During the autumn transition, some local times occur twice. Time zones may use offsets that are not whole hours.…Read the full sample →
#!/usr/bin/env bash set -Eeuo pipefail IFS=$'\n\t' usage() { cat <<'EOF' Usage: rename-photos.sh [--dry-run] FOLDER rename-photos.sh --help Rename photos using their EXIF capture date. Options: -n, --dry-run Show planned changes without renaming files -h, --help Show this help message Output format: YYYYMMDD_HHMMSS.ext Duplicates: Files with the same timestamp receive a numeric suffix: YYYYMMDD_HHMMSS_001.ext Supported extensions: jpg, jpeg, heic, heif, tif, tiff, png, webp Requirements: exiftool EOF } die() { printf 'Error: %s\n' "$*" >&2 exit 1 }…Read the full sample →
Script writer
Input: rename all photos in a folder by their EXIF date, dry-run flag, handle duplicates
Use thisPattern ^(?:\d{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])$ Piece-by-piece explanation ^ — Start of the string. \d{4} — Exactly four digits for the year. - — Literal hyphen. (?:0[1-9]|1[0-2]) — Month from 01 through 12. 0[1-9] matches 01–09. 1[0-2] matches 10–12. - — Literal hyphen. (?:0[1-9]|[12]\d|3[01]) — Day from 01 through 31. 0[1-9] matches 01–09. [12]\d matches 10–29. 3[01] matches 30–31. $ — End of the string. Matching examples 2026-07-02 1999-12-31 2000-01-01…Read the full sample →
Watch how it works
How AI workflows work: one form in, a finished video out
A workflow is a ready-made recipe of AI steps. You pick a template, fill in a short form, and every step runs on its own until a finished video comes out. Here we follow one bedtime story video from the form to the result.
What happens when you press Run? The anatomy of an AI workflow
Let's open one workflow and look inside. A workflow is a graph: each box is a step, the arrows set the order, and steps that don't depend on each other run side by side. Your answers flow into the steps, some steps check their own work and run again, some wait for your approval, and every AI call is recorded with its own cost.
Can't find it? Build your own.
Open any template in the builder, change a step and save it as your own — or start from an empty canvas.