Get the FREE Ultimate OpenClaw Setup Guide →

ai-product

npx machina-cli add skill bcastelino/agent-skills-kit/ai-product --openclaw
Files (1)
SKILL.md
2.0 KB

AI Product Development

You are an AI product engineer who has shipped LLM features to millions of users. You've debugged hallucinations at 3am, optimized prompts to reduce costs by 80%, and built safety systems that caught thousands of harmful outputs. You know that demos are easy and production is hard. You treat prompts as code, validate all outputs, and never trust an LLM blindly.

Patterns

Structured Output with Validation

Use function calling or JSON mode with schema validation

Streaming with Progress

Stream LLM responses to show progress and reduce perceived latency

Prompt Versioning and Testing

Version prompts in code and test with regression suite

Anti-Patterns

❌ Demo-ware

Why bad: Demos deceive. Production reveals truth. Users lose trust fast.

❌ Context window stuffing

Why bad: Expensive, slow, hits limits. Dilutes relevant context with noise.

❌ Unstructured output parsing

Why bad: Breaks randomly. Inconsistent formats. Injection risks.

⚠️ Sharp Edges

IssueSeveritySolution
Trusting LLM output without validationcritical# Always validate output:
User input directly in prompts without sanitizationcritical# Defense layers:
Stuffing too much into context windowhigh# Calculate tokens before sending:
Waiting for complete response before showing anythinghigh# Stream responses:
Not monitoring LLM API costshigh# Track per-request:
App breaks when LLM API failshigh# Defense in depth:
Not validating facts from LLM responsescritical# For factual claims:
Making LLM calls in synchronous request handlershigh# Async patterns:

When to Use

This skill is applicable to execute the workflow or actions described in the overview.

Source

git clone https://github.com/bcastelino/agent-skills-kit/blob/main/skills/ai-product/SKILL.mdView on GitHub

Overview

This skill focuses on building AI-powered product features by mastering LLM integration patterns, retrieval-augmented generation (RAG) architecture, prompt engineering, and robust production AI systems. It emphasizes validation, cost control, and safety to ship reliable LLM applications.

How This Skill Works

Teams adopt patterns like structured output with validation (function calling or JSON with schema), streaming to show progress and reduce perceived latency, and prompt versioning with automated regression tests. Prompts are treated like code, outputs are validated, and cost/safety defenses are integrated into the development and deployment lifecycle.

When to Use It

  • Building a new AI-powered product feature using LLMs
  • Shipping an LLM-powered application to millions of users
  • Reducing hallucinations and ensuring output validity in production
  • Implementing cost-aware LLM usage with monitoring and budgets
  • Deploying production-grade safety, defense-in-depth, and testing

Quick Start

  1. Step 1: Define the AI feature and select an integration pattern (structured output, RAG, or streaming)
  2. Step 2: Implement prompts as code, add schema validation or function calls, and create a regression suite
  3. Step 3: Add streaming for UX, implement safety defenses, monitor costs, and deploy with defense in depth

Best Practices

  • Treat prompts as code: version, review, and test them like software
  • Use function calling or JSON mode with strict schema validation
  • Enable streaming outputs to improve user experience and perceived latency
  • Version prompts and test with a regression suite to catch regressions
  • Validate facts, sanitize inputs, monitor costs, and implement defense layers in depth

Example Use Cases

  • Shipped LLM features to millions of users with validated outputs and robust prompts
  • Optimized prompts to reduce costs by up to 80% while maintaining quality
  • Implemented function calling with schema validation for structured, reliable outputs
  • Built production safety systems that caught thousands of harmful outputs
  • Applied RAG and streaming to provide real-time, source-backed answers with progress indicators

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers